Worker-exit test: Iris's threads start with no --import, as an installed server's do - #831
Merged
Merged
Conversation
…led server's do The fixture ran as `node --import tsx`, and a worker thread inherits its process's --import, so the "dist" cells started every thread with tsx's loader. On Node 24 such a thread can crash the process as it ends, in Node's own teardown of the thread (nodejs/node#65778, fixed in 26.10.0, backport to 24.x pending). An installed server's threads have no loader. The harness now starts the fixture with no --import (Node strips its types itself) and the fixture registers tsx on its main thread only, for the "src" cells. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Iris gate — 1 of 2 tripped
|
| Trace | Verdict | Basis | Rules, classes or missing inputs | Evidence |
|---|---|---|---|---|
93f5920c0f94ec14f5e2c3a899940dc5 |
failed | detector_veto + risk_over_loss |
no_pii, pii_leak, credential_leak | no_pii: AWS Access Key (output 45–65) |
| Verdict basis | Traces |
|---|---|
detector_veto |
2 |
clean |
1 |
Unjudged questions: task_completed (3), tool_use_correct (3) — a trace that did not carry what a rule needs.
tests/fixtures/ci-gate/traces.ndjson · 3 evaluated · dataset release-gate: 2 in the gate · exit 1 · what the bases mean
Iris gate — 1 stored, nothing tripped
|
| Verdict basis | Traces |
|---|---|
clean |
1 |
Unjudged questions: task_completed (1), tool_use_correct (1) — a trace that did not carry what a rule needs.
tests/fixtures/ci-gate/clean.ndjson · 1 evaluated · exit 0 · what the bases mean
It is a Node.js bug in a thread's teardown (nodejs/node#65778), which the job reached by starting its threads with tsx's loader; it is not close() ending a checkpoint thread inside a statement. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What this changes
The worker-exit job's Windows, Node 24 cell has failed twice on
main. Each time, one process in the "iris dist native checkpoint-kill" scenario exited with an access violation (#804). This finds the cause. It is a Node.js bug, and the test reached it through a configuration an installed server never runs.The crash is in Node, not in Iris or SQLite
Eight crash dumps, symbolized against Node 24.21.0's published symbols, fault at the same instruction. The fault comes as the thread is disposed of (
node_worker.cc,~WorkerThreadData):node::contextify::ContextifyScript.This is the use-after-free in nodejs/node#65778:
The thread's environment has already been freed when this happens, and better-sqlite3 closes a thread's connections as its environment is freed. The databases left behind by the eleven processes that crashed during this work all pass
PRAGMA integrity_check.The test put tsx's loader in the threads; a server does not
The fixture ran as
node --import tsx iris-workers.ts, and a worker thread inherits its process's--import(checked on Node 22.23.3 and 24.21.0). So in the "dist" cells, which are meant to start Iris's threads as an installed server does, every thread also started with tsx's loader.On Windows with Node 24.21.0,
checkpoint-killfrom the build, 24 processes at a time, with six more processes writing and syncing 4 MB files to load the disk:--import tsx, as the job did--import, as a server doessourceThread, which registers tsx inside the thread.The change
stress.cjsstartsiris-workers.tswith no--import. Node strips the file's types itself; a Node that does not do this by default gets--experimental-strip-types.iris-workers.tsregisters tsx on its own main thread, and only for the "src" cells. The "dist" cells' threads now loadcheckpoint-worker.jsandsearch-worker.jswith no loader, as the fixture's comment always said they did.source-thread.ts: a comment said a thread does not take--import. It does; the comment now says why the thread still registers tsx itself.worker-exit.yml: a note on the above.CHANGELOG.mdand the website's copy of it: the 0.20.0 entry said the crash came "whenclose()ended a checkpoint thread inside a statement". It now names the cause. The release page carries only that entry's lead, so it needs no change.No product code changes.
Checks
node:sqlite(this machine's better-sqlite3 is built for Node 24).lint,typecheckandtypecheck:testspass.WORKER_EXIT_SEARCH=1 node stress.cjs), run locally on Windows with Node 24.21.0: all 30 rows clean, 10 of 10 processes each. That covers every raw ending on both drivers, and Iris's two workers from the sources and from the build.changelog:checkconfirms the website's copy matches.🤖 Generated with Claude Code