Skip to content

馃Х test: Retain the Contention Lock Owner Through Garbage Collection - #283

Merged
danny-avila merged 1 commit into
mainfrom
lia/lock-contention-readiness
Oct 2, 2026
Merged

danny-avila merged 1 commit into
mainfrom
lia/lock-contention-readiness

Conversation

@lia-by-librechat

@lia-by-librechat lia-by-librechat Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Fix the Node 24 contention fixture, not production locking.
  • Replace its orphaned promise with a timer-backed wait that retains the lock-owning async frame.
  • Force GC before an exact locked IPC handshake. Capture bounded child stdout/stderr and exit status. Keep the competing-acquisition rejection and verify crash release after SIGKILL.

Cause

The old interval kept the process alive but did not retain the pending promise's resolver. Forced GC reproduced Missing expected rejection after the exact stdout marker: Node closed the lock's FileHandle on GC while the owner remained alive. Descriptor inspection confirmed the lock fd disappeared. A timer-backed resolver preserved the descriptor under the same GC control.

Readiness alone is not the fix. Replacing only the corrected wait with the original orphaned promise still fails the strengthened test with the same assertion and GC warning.

Verification

  • Node 24.16.0 focused GC test passes; orphan-promise negative control fails as expected.
  • 100/100 focused GC repetitions pass on Node 24.16.0 with four concurrent runs.
  • Code workspace tsc --noEmit, build, touched-file Prettier, and git diff --check pass.
  • CI Code Package Tests pass on Node 20.11.0, 22.21.0, and 24.16.0.
  • Additional local worktrees.test.js is blocked by the sandbox remapping / to uid 65534, rejected by storage ownership checks. No bypass or production change was applied.
  • No runtime lock implementation changes.

Follow-up to #282. GitHub denied its failed-lane retry with 403 Resource not accessible by integration; it has not been rerun. A passing retry on its unchanged head would not establish the root cause.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: 73742a8028c0de2bad6a708f8324471c169b8514.

Test-only fix for the Node 24 lock contention failure. Forces GC before an exact IPC readiness marker, retains the lock-owning wait, and preserves contention and crash-release assertions. Independent review and focused checks are running for this head.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Independent review complete for 73742a8028c0de2bad6a708f8324471c169b8514: no findings. The reviewer independently reproduced descriptor collection with the original wait and retention with the corrected wait on Node 24.16.0. Native contention and crash release were verified by focused local checks and the passing Node 20/22/24 CI lanes.

@danny-avila
danny-avila merged commit 05bad85 into main Oct 2, 2026
11 checks passed
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