第一步: ps -eLo pid,lwp,pcpu | grep 进程ID 查找出占用cpu使用率最高的线程。lwp对应线程ID 第二步:gdb attach 进程ID 第三步:thread apply all bt,打印出所有线程ID