A multithreaded application hangs and it is not responding to any commands. I have tried following things without luck:
- Attach a process to gdb (error: (gdb) attach 6026 Attach开发者_如何学运维ing to process 6026 ptrace: Operation not permitted.)
- gstack (gstack just hangs like that)
Is there any good way to debug this process?
Thanks for all your response. The problem is at kernel level. we used echo t > /proc/sysrq-trigger, which logs the stack of all the running process in /var/log/messages. This stack trace helped to analyze the problem.
From the stack trace, file system posted some waited event on behalf of the application process to other process (which is in defunct state) and waiting for the response indefinitely. Which results in hung state.
Most likely somebody else already tracing this process. To find out who is doing it look at proc file system.
cat /proc/6026/status|grep TracerPid
精彩评论