Skip to content

Enable faulthandler from interpreter start (PYTHONFAULTHANDLER=1)#125

Merged
maximusunc merged 1 commit into
mainfrom
claude/omnicorp-worker-pool-error-ytpcn2
Jul 13, 2026
Merged

Enable faulthandler from interpreter start (PYTHONFAULTHANDLER=1)#125
maximusunc merged 1 commit into
mainfrom
claude/omnicorp-worker-pool-error-ytpcn2

Conversation

@maximusunc

Copy link
Copy Markdown
Collaborator

The SIGABRT-on-timeout diagnostic only dumps a stack if faulthandler is active in the target child. We enable it in _init_pool_worker (the pool initializer), which runs AFTER a spawned child re-imports the worker module -- so a child that hangs during that import phase (module-level setup) gets no dump when SIGABRT'd, which is exactly the omnicorp symptom (no "Start omnicorp", no traceback).

Set PYTHONFAULTHANDLER=1 in the CPU-worker images so faulthandler is armed from the very first instruction, covering the import phase too. The next hang's SIGABRT then dumps the exact frame even if the child is stuck in startup.

Claude-Session: https://claude.ai/code/session_01TiiFCcToq8LgiEeaQhQM5e

The SIGABRT-on-timeout diagnostic only dumps a stack if faulthandler is
active in the target child. We enable it in _init_pool_worker (the pool
initializer), which runs AFTER a spawned child re-imports the worker module
-- so a child that hangs during that import phase (module-level setup) gets
no dump when SIGABRT'd, which is exactly the omnicorp symptom (no
"Start omnicorp", no traceback).

Set PYTHONFAULTHANDLER=1 in the CPU-worker images so faulthandler is armed
from the very first instruction, covering the import phase too. The next
hang's SIGABRT then dumps the exact frame even if the child is stuck in
startup.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TiiFCcToq8LgiEeaQhQM5e
@maximusunc
maximusunc merged commit 950dea4 into main Jul 13, 2026
2 checks passed
@maximusunc
maximusunc deleted the claude/omnicorp-worker-pool-error-ytpcn2 branch July 13, 2026 17:07
@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.04%. Comparing base (ac19722) to head (5e83926).
⚠️ Report is 24 commits behind head on main.


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ac19722...5e83926. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants