How to debug multithreaded process in Linux?

A multi-threaded application freezes and does not respond to any commands. I tried the following things with no luck:

  • Attach process to gdb (error: (gdb) attach 6026 Attach to process 6026 ptrace: operation not allowed.)
  • gstack (gstack just hangs)

Is there a good way to debug this process?

+5
source share
2 answers

Thanks for your reply. The problem is at the kernel level. we used echo t> / proc / sysrq-trigger, which registers the stack of the entire running process in / var / log / messages. This stack trace helped analyze the problem.

( ) . .

+6

, - . , , proc.

cat /proc/6026/status|grep TracerPid
+1

All Articles