# WorkerCrash: 工作进程 0 崩溃，退出码 -6 (SIGABRT)

- **ID:** `python/pytest-xdist-worker-crash`
- **领域:** python
- **类别:** system_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

pytest-xdist 中的一个工作进程因段错误或中止而崩溃，通常由 C 扩展错误或内存损坏引起。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 3.8 | active | — | — |
| 3.9 | active | — | — |
| 3.10 | active | — | — |
| 3.11 | active | — | — |
| 3.12 | active | — | — |

## 解决方案

1. **** (90% 成功率)
   ```
   Run tests with a single worker to isolate the issue: `pytest -p no:xdist` or `pytest -n 0`
   ```
2. **** (70% 成功率)
   ```
   Use `pytest --timeout` to detect hanging tests and reduce memory usage, or debug with gdb to find the crash location.
   ```

## 无效尝试

- **** — More workers may increase memory pressure and exacerbate the crash, not fix the underlying issue. (80% 失败率)
- **** — The crash is likely reproducible and indicates a serious bug; ignoring it leads to unreliable test results. (90% 失败率)
