# Failed: Timeout (>60.0s) from pytest-timeout.
=== 1 failed in 60.12s ===

- **ID:** `python/pytest-timeout-thread-stuck`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A test blocks on a network call, lock, or thread join without a timeout; pytest-timeout's signal method cannot interrupt C-level blocking calls or non-main threads.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 2.3.x | active | — | — |
| 2.4.x | active | — | — |

## Workarounds

1. **** (93% success)
   ```
   import requests
resp = requests.get(url, timeout=5)

# For threads:
thread.join(timeout=5)
assert not thread.is_alive()
   ```
2. **** (88% success)
   ```
   # pyproject.toml
[tool.pytest.ini_options]
timeout = 30
timeout_method = "signal"
# Ensure no test spawns daemon threads that outlive the test
   ```

## Dead Ends

- **** — Merely postpones failure; the underlying hang remains and CI time balloons. Flaky suites still fail on slower machines. (70% fail)
- **** — The thread method cannot kill the stuck thread; it only raises in the main thread, leaving resources leaked and the process hung. (80% fail)
