1、gdb -p pid 当前进程会挂起
2、pstack -p pid or gstack -p pid
3、gcore [-o filename] pid 然后用gdb调试。