我正在尝试调试为什么我们的集成测试要花费这么长时间,而且看起来它们还在半途而废。
我登录了我们的测试服务,并看到了以下行为:
root@colossus:~# strace -p 18310
Process 18310 attached - interrupt to quit
futex(0x7f9915c609d0, FUTEX_WAIT, 18313, NULL^C <unfinished ...>
Process 18310 detached
root@colossus:~# strace -p 18313
Process 18313 attached - interrupt to quit
restart_syscall(<... resuming interrupted call ...>^C <unfinished ...>
Process 18313 detached
root@colossus:~# ps -ef | grep 18313
root 19089 19034 0 09:46 pts/0 00:00:00 grep --color=auto 18313
root@colossus:~# ps -p 18313
PID TTY TIME CMD我对这些命令的解释是,18310正在等待它的子18313完成。
Process 18313正在尝试重新启动中断的系统调用。
这是奇怪的地方。虽然我可以附加到18313,但在运行ps时,我无法在当前进程列表中看到它。
有人能帮我了解一下这里发生了什么吗?
发布于 2015-03-25 16:44:22
根据Stéphane的评论,我看到的是一条主线,而不是一个过程。
线程列在ps -L的输出中。
您可以使用strace -f将进程的当前线程和未来线程都捆绑起来。
https://unix.stackexchange.com/questions/126133
复制相似问题