python - 在 futex(..., FUTEX_WAIT_BITSET_PRIVATE|...) 中查看挂起 Python 的堆栈跟踪

标签 python debugging freeze futex

Python 进程在 futex() 中挂起:

root@pc:~# strace -p 9042
strace: Process 9042 attached
futex(0x1e61900, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, NULL, ffffffff

如果挂起进程,我想查看堆栈跟踪。

不幸的是,ctrl-c 不起作用:-(

如果 Python 像这样挂起,我如何查看堆栈跟踪?

最佳答案

  1. 如果您的系统需要,请安装 gdb python 扩展(例如,请参阅 here,或查看您的发行版文档)
  2. 将 gdb 附加到挂起的进程
  3. 运行

    (gdb) py-bt
    

    代替常规 bt 获取 Python 回溯

关于python - 在 futex(..., FUTEX_WAIT_BITSET_PRIVATE|...) 中查看挂起 Python 的堆栈跟踪,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39506737/

相关文章:

用于框架的python selenium "Explicit Waits"

python - 我可以通过带有 LinearRegressor 的钩子(Hook)记录训练损失吗?

python - 任务猫抛出 "no suitible partition"错误

java - Windows 上的 Helios Eclipse java 调试器突出显示源代码非常慢

java - 带 Tomcat 的 Eclipse $$EnhancerByCGLIB$$ 'Unable to install breakpoint'

ios - 更改不同类的 CCSpeed Action ?

python - 如何使用 paramiko 查看(日志)文件传输进度?

.net - 如何在 .NET 中调试 stackoverflowexception

c++ - 使用 boost::timed_join 和 FreeLibrary 时崩溃

android - ProgressDialog 在异步任务中卡住