Linux: How to debug when the application program hangs and the result cannot be run

Article directory

debugging method

The usual way is to use

  1. strace, check whether the current program has executed sleep, network event waiting; https://mzhan017.blog.csdn.net/article/details/117440913
  2. Use gcore to generate a core file analysis analysis

example

Here is a situation where virsh hangs. The reason is that data is sent to the socket, but there is no response, which causes it to wait forever. In this case, you can use strace to find the reason easily
https://bugzilla.redhat.com/show_bug.cgi?id=2225667

Guess you like

Origin blog.csdn.net/qq_36428903/article/details/129432410