Closed bug report

bounded-all test is flaky: the worker hits its heap limit before the size guard

Colby Knox · ·closed by Colby Knox

test/ops/bounded-all.test.mjs fails about half the time on unchanged code, and it is the only failure in recent full-suite runs.

Evidence (2026-11-06, this container, Node 22.23.4): run back to back on the same commits:

  • 48924f7c: failed, failed, then passed
  • 774ede1e: failed, passed, passed

When it fails, 7 of 16 checks fail together. The reading thread dies with WORKER_ERROR ERR_WORKER_OUT_OF_MEMORY before the size guard can return RESULT_TOO_LARGE, so the error code, the log line naming the thread and statement, and the early stop all come back undefined.

Likely cause: the test builds a result large enough to trip the guard, and it is a race whether the guard's row and byte check fires before the worker's heap limit. The guard needs to trip with more margin before the heap limit, or the test needs a result that is too large by row count but small in bytes.

Why it matters: prod (core-helium-1ta1fx) logged the guard working on 2026-11-06 ("query result too large after 8176 rows" on /api/verifications), so the guard works in production. The flaky test hides that, and makes every suite run look red.

1 Reply

Colby Knox ·

Fixed and live: the guard now budgets against the thread's old generation, which left the 64 MB test thread real margin. 6 of 6 runs green.

Colby Knox closed this ·

Log in to reply.