python
system_error
ai_generated
partial
WorkerCrash: 工作进程 0 崩溃,退出码 -6 (SIGABRT)
WorkerCrash: Worker 0 crashed with exit code -6 (SIGABRT)
ID: python/pytest-xdist-worker-crash
80%修复率
85%置信度
0证据数
2024-10-05首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 3.8 | active | — | — | — |
| 3.9 | active | — | — | — |
| 3.10 | active | — | — | — |
| 3.11 | active | — | — | — |
| 3.12 | active | — | — | — |
根因分析
pytest-xdist 中的一个工作进程因段错误或中止而崩溃,通常由 C 扩展错误或内存损坏引起。
English
A worker process in pytest-xdist crashed due to a segmentation fault or abort, often caused by a C extension bug or memory corruption.
解决方案
-
90% 成功率
Run tests with a single worker to isolate the issue: `pytest -p no:xdist` or `pytest -n 0`
-
70% 成功率
Use `pytest --timeout` to detect hanging tests and reduce memory usage, or debug with gdb to find the crash location.
无效尝试
常见但无效的做法:
-
80% 失败
More workers may increase memory pressure and exacerbate the crash, not fix the underlying issue.
-
90% 失败
The crash is likely reproducible and indicates a serious bug; ignoring it leads to unreliable test results.