You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: avoid Node shutdown deadlock in ownership fixture - #2078
Run the ownership fixture's child Node processes with --single-threaded. Node 24.21.0 can deadlock inside process.exit() while joining V8 background workers that need a main-thread GC. The duplicate cockpit then prints its refusal but never exits, failing main CI despite correct ownership behavior.
This avoids the upstream runtime defect only in the fixture. Production flags and exit behavior, test assertions and timeouts stay unchanged. The fixture still starts real cockpit processes and checks refusal, aliases, independent repositories, dead-owner recovery and competing restarts.
Evidence
Source CI: run 40713039005 attempt 1, job 122904314069 step 14, commit 28c01509d2f45c474b0593372e36638071399b25. The refusal prints before the original duplicate assertion at line 65 times out. The aggregate job starts after cancellation and is a consequence, not another defect.
Upstream: nodejs/node#64274 and proposed fixnodejs/node#66171 (still open). The upstream report includes this runtime and failure shape. The original CI process has no native stack, so attribution is supported by the controlled reproduction rather than a recovered CI backtrace.
proof_base=19284ba7bbd729bc398a78ab89019c517a9ca437. In a disposable checkout with its own dependencies, concurrent allocation pressure plus a bounded threadpool job at process.exit(1) makes the existing fixture fail at the same duplicate check: 1 failed / 1 total, refusal printed, exit entered, no exit observed for the unchanged bound. With --single-threaded the same pressured fixture passes 1/1. The direct refusal probe also hangs 3/3 without the flag and exits 3/3 with it. Full reproduction script and results are recorded in the repair summary's comments.
Design decision
Direct track under the user's instruction to proceed autonomously. This is a bounded test-runtime workaround in one fixture, with no dependency or public behavior change. The load-bearing guarantees are the existing refusal/exit-code assertions and recovery checks; all remain unchanged. V8 background compilation is outside the ownership mechanism being tested. The guard is not extended and no failure is retried or ignored.
Node 24.21.0 normal final built ownership fixture → 1 passed / 1 total.
Disposable allocation-pressure proof → old fixture 1 failed / 1 total; fixed fixture 1 passed / 1 total. Ten earlier normal ownership passes were inconclusive; these controlled red/green results establish the workaround.
Code-quality check on final 76d01ff04: PASS, 1/1 changed functions; start: complexity 1, body line coverage 100%, CRAP 1. Collected native Node V8 coverage with its built-in whitespace-preserving type stripping, converted with installed ast-v8-to-istanbul, then passed --coverage to the repository checker. Its built-in Node collector rejects TypeScript; no missing coverage was treated as a pass.
Citation check and git diff --check → passed.
No production TypeScript changed. CI owns the full verification gate; no local full-suite pass is claimed.
Covered by this combined repair; closing reference above; keep open until merge
Left undone
The upstream Node runtime fix remains external. This PR does not change production runtime threading or claim to repair Node itself. The unrelated environment-sensitive packaged tool-list test remains tracked in #1505.
Need help on this PR? Tag @codesmith-bot with what you need.
The combined repair is verified and ready for human review in #2078.
At head 76d01ff04340fc5b4ba80575e42b6537c52e4d0f, CI run 40759620474 passed all three Vitest shards, all four cockpit browser shards, typecheck, unit/build/package and the required verification aggregate. Automated Code Review passed with “No issues found”; there are no review threads. The PR is MERGEABLE/CLEAN. GitHub's readiness workflow marked it ready; this task did not undraft or merge it.
The repair adds --single-threaded only to ownership fixture child Node processes to avoid the upstream Node shutdown deadlock. The controlled allocation-pressure regression fails without the flag and passes with it. Production flags, assertions and test bounds remain unchanged. The complete proof is in #2048 (comment).
Remains OPEN; verified closing reference in PR #2078; human review/merge owns closure
No other occurrence was saved on the diagnostic report at the final review. No unresolved member is being closed. Both reports remain open until the repair merges. No merge or CI rerun was performed by this task. The investigation claim is released at handoff; PR review and merge remain with the owner.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2048
Closes #2047
Summary
Run the ownership fixture's child Node processes with
--single-threaded. Node 24.21.0 can deadlock insideprocess.exit()while joining V8 background workers that need a main-thread GC. The duplicate cockpit then prints its refusal but never exits, failing main CI despite correct ownership behavior.This avoids the upstream runtime defect only in the fixture. Production flags and exit behavior, test assertions and timeouts stay unchanged. The fixture still starts real cockpit processes and checks refusal, aliases, independent repositories, dead-owner recovery and competing restarts.
Evidence
Source CI: run 40713039005 attempt 1, job 122904314069 step 14, commit
28c01509d2f45c474b0593372e36638071399b25. The refusal prints before the original duplicate assertion at line 65 times out. The aggregate job starts after cancellation and is a consequence, not another defect.Upstream: nodejs/node#64274 and proposed fix nodejs/node#66171 (still open). The upstream report includes this runtime and failure shape. The original CI process has no native stack, so attribution is supported by the controlled reproduction rather than a recovered CI backtrace.
proof_base=19284ba7bbd729bc398a78ab89019c517a9ca437. In a disposable checkout with its own dependencies, concurrent allocation pressure plus a bounded threadpool job atprocess.exit(1)makes the existing fixture fail at the same duplicate check: 1 failed / 1 total, refusal printed, exit entered, no exit observed for the unchanged bound. With--single-threadedthe same pressured fixture passes 1/1. The direct refusal probe also hangs 3/3 without the flag and exits 3/3 with it. Full reproduction script and results are recorded in the repair summary's comments.Design decision
Direct track under the user's instruction to proceed autonomously. This is a bounded test-runtime workaround in one fixture, with no dependency or public behavior change. The load-bearing guarantees are the existing refusal/exit-code assertions and recovery checks; all remain unchanged. V8 background compilation is outside the ownership mechanism being tested. The guard is not extended and no failure is retried or ignored.
Experience
N/A — no UI change.
Verification
npm run build→ passed; check:pack: 1204 files, 97 cockpit assets.76d01ff04: PASS, 1/1 changed functions;start: complexity 1, body line coverage 100%, CRAP 1. Collected native Node V8 coverage with its built-in whitespace-preserving type stripping, converted with installedast-v8-to-istanbul, then passed--coverageto the repository checker. Its built-in Node collector rejects TypeScript; no missing coverage was treated as a pass.git diff --check→ passed.Report resolution
Left undone
The upstream Node runtime fix remains external. This PR does not change production runtime threading or claim to repair Node itself. The unrelated environment-sensitive packaged tool-list test remains tracked in #1505.
Need help on this PR? Tag
@codesmith-botwith what you need.