ReviewOS

zig-utils/zig-js

Threads corpus: stop wakeup can advance N3 owner-add oracle

#127
Closed chris opened this 11 days ago ·
11 days ago

Evidence

Main CI run 29463400611 reported a non-race functional failure in the suppression-free TSan corpus shard:

cve/mc-lock-n3-install-vs-owner-add.js
FAIL ... Error: expected 1500 but got 1501

The final oracle expected foreign.join() to return ROUNDS (1500 under no-GIL). Shutdown stored gate.stop = 1, then stored gate.round = ROUNDS + 1, then notified. A worker that had already passed its loop-head stop load could legally observe the new round, execute one final body iteration, set seen = 1501, and only then exit. The engine result was consistent with the harness ordering; it was not the install-vs-owner-add invariant the case intended to test.

Evidence: https://github.com/zig-utils/zig-js/actions/runs/29463400611/job/87511438279

Fix / acceptance

  • Publish stop = 1 and notify the existing round waiters without advancing the work generation.
  • Retain all 1,500 no-GIL / 5,000 GIL race rounds and every I21 property/index/shape oracle.
  • Pass repeated focused normal and TSan runs with the exact final join result.
  • Keep the suppression-free corpus shard free of both races and functional warnings.

Implemented by f58fec9d; fully verified by CI run 29466730465.

11 days ago

Implemented by f58fec9d.

  • Shutdown now publishes stop = 1 and notifies existing round waiters without advancing the work generation.
  • All 1,500 no-GIL / 5,000 GIL race rounds and the I21 property/index/shape assertions remain intact.
  • The exact case passed 5/5 focused normal runs and 5/5 focused TSan runs with the exact final join result.
  • Replacement CI run 29466730465 passed the complete suppression-free normal and TSan gates, including all four tsan-nogil-corpus shards.

Acceptance is complete.

Sign in to comment on this issue.