Repository navigation
Collect garbage before the java-web command exits, which avoids a hang in node's exit teardown - #44
Conversation
…g in node's exit teardown, and run BitLengthOverflow in CI again
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
There was a problem hiding this comment.
The java-web command now forces garbage collection via globalThis.gc?.() immediately before process.exit, so node's exit teardown does not have to free large array buffers itself. This eliminates the hang observed in CI on x64 runners.
review-bot, model nvidia/nemotron-3.5-lightning:free, verdict approve
java/math/BigInteger/BitLengthOverflow.javatimed out at 600 s in about one CI run in three, so #40 took it out ofpassing.txt. The test is fine. Thejava-webprocess hangs while exiting.On GitHub's x64 runners, running the test four at a time as a CI shard does:
Overflow reported by ArithmeticException, as expected), somainhad returned, and then the process never exited.node-MainThread,node-V8WorkerandSignalInspector, all asleep infutex_do_wait, and did not answer a diagnostic report signal. It is stuck in node's own exit teardown, afterprocess.exit. The test leaves several hundred MB ofBigIntegerarrays (array buffers) alive at exit.The
java-webcommand now runs a full collection just beforeprocess.exit, so node's teardown does not have to free those buffers itself. Same runners, 20 runs each:gcexposed at node startup instead of at runtimeprocess.exit(this PR)--trace-exit(for comparison)The collection only runs in the command's exit path. Library use (
runNode,startLibrary) is unchanged.BitLengthOverflowgoes back intopassing.txtandtimes.tsv.Checks:
System.exit(0),1and2.pnpm typecheckpasses. CI runs every OpenJDK test, since the PR changessrc/node.ts.