← Back to Pull requests

precompile: Keep draining worker output when relaying it fails #65059

Closed
unknown closed this pull request without merging on Nov 20, 2026 04:15 UTC
View on GitHub
unknown unknown commented on Nov 18, 2026 14:59 UTC
Author

This came up while investigating CI jobs whose precompile test hung until the job timed out (FreeBSD and Windows i686, e.g. https://buildkite.com/julialang/julia-ci/builds/1639). We could not confirm that those hangs are this bug, because the cores were lost; in that FreeBSD job, two of the four precompile workers only dumped core once their parent was gone, which is consistent with workers blocked writing to an undrained pipe. The hang itself is easy to hit: precompiling a package that prints more than a pipe buffer while stderr goes into something that exits early (julia -e 'using Foo' 2>&1 | head) hangs instead of erroring.

Each precompile worker writes to a pipe that a monitor task drains, relaying the output to the session's io. If relaying threw (e.g. EPIPE because io is a closed pipe), the monitor died, nothing read the pipe any more, and the worker blocked once it filled. The parent kept the read end open and waited for the worker forever, so precompilation hung silently.

A relay failure now only stops relaying for that package: its output is still captured for the final report and the pipe is drained to EOF. If the monitor stops early for any other reason, it closes the read end so the worker fails writing instead of blocking, and releasing the worker slot no longer depends on joining the monitor succeeding. The monitor is joined only in the finally; the extra join in the catch dates from when the failure message embedded the captured output.

Backporting to 1.13 needs a small adaptation: that branch has a closure-based monitor and no cancellation tokens, so only InterruptException is rethrown there. 1.11 and 1.12 have the same hang.

Assisted by: Opus 5.5, Sol 6.2

Diff: 215 lines (+161 / -54) across 2 files Reviewer: maleadt Review duration: 2235m
All Vouch review confidence checks passed
Residual risk 0.13 = Change Risk (0.37) × (1 − Review Confidence (0.64)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 215 lines diff across 2 files
0.37
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 70%
64%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.322
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #65059"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 64% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 36.6% (MEDIUM) · Higher = larger blast radius
36.6%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 64% · Lower = rushed or shallow review
64%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 13.2% · Safe to merge
13.2%