ReviewOS

zig-utils/zig-js

Test: remove timeout race from mid-GC asyncHold waiter oracle

#110
Closed chris opened this 9 days ago ·
9 days ago

Problem

The final tsan-threadfuzz-midgc job in main run https://github.com/zig-utils/zig-js/actions/runs/29384313843/job/87254333183 failed for seed 1 with:

worker terminate/ThreadLocal asyncHold waiters did not reject after midgc release

This resembles #107 but has a different cause. The witness gives its property waiter a 12-second timeout under TSan, then performs allocation and parallel-GC pressure before the deliberate release. A loaded runner can let that wait time out and reject early. beforeWaiterReject includes the early rejection, so the later delta oracle incorrectly waits for two additional waiter rejections even though only the condition waiter remains.

The exact focused TSan seed passes locally, consistent with a machine-speed-dependent test race rather than a deterministic runtime regression.

Scope

  • make the mid-GC property/TLS waits indefinite and rely on the existing bounded per-case watchdog
  • assert that no rejection settled before the deliberate release
  • replay the exact focused TSan seed
  • run the relevant formatter/build check and use the next combined main gate for the expensive full matrix

Discovered while validating #109; benchmark/runtime behavior is unchanged.

9 days ago

Implemented on main as e0bcf59 (test(midgc): remove waiter timeout race (#110)). The mid-GC script/module Worker ThreadLocal/asyncHold waiters now use Infinity and are bounded by the existing host-side per-case watchdog; the oracle also asserts zero pre-release rejection settlements. Focused validation: TSan script replay seeds 1-3 passed, TSan module replay seeds 1-3 passed, both non-mid-GC finite-timeout variants passed, zig fmt --check, git diff --check, and bun run docs:build are green. The superseding combined main CI gate will provide the expensive full-matrix result.

9 days ago

Completed by e0bcf59. The final main gate is fully green: https://github.com/zig-utils/zig-js/actions/runs/29385360583. The exact previously failing tsan-threadfuzz-midgc job passed, as did non-TSan mid-GC, lifecycle, all TSan corpus shards, and the rest of the 33-job workflow.

Sign in to comment on this issue.