Repository navigation
Flaky crash on worker-addon-exit test #63923
Copy link
Copy link
Closed
Labels
flaky-testIssues and PRs involving tests that fail intermittently in CI.Issues and PRs involving tests that fail intermittently in CI.
Description
Test
worker-addon-exit
Platform
No response
Console output
=== release test ===
Path: addons/worker-addon-exit/test
Error: --- stderr ---
# out/Release/node[101420]: void node::RemoveEnvironmentCleanupHook(v8::Isolate*, CleanupHook, void*) at ../../src/api/hooks.cc:130
# Assertion failed: (env) != nullptr
----- Native stack trace -----
1: 0xaacfbe1b7978 node::DumpNativeBacktrace(_IO_FILE*) [out/Release/node]
2: 0xaacfbe37374c node::Assert(node::AssertionInfo const&) [out/Release/node]
3: 0xaacfbe0e209c node::RemoveEnvironmentCleanupHook(v8::Isolate*, void (*)(void*), void*) [out/Release/node]
4: 0xffe7f81e2338 MyObject::~MyObject() [/home/runner/work/_temp/node-v27.0.0-nightly2026-06-14a8b15d8975-slim/test/addons/worker-addon-exit/build/Release/binding.node]
5: 0xffe7f81e2390 MyObject::~MyObject() [/home/runner/work/_temp/node-v27.0.0-nightly2026-06-14a8b15d8975-slim/test/addons/worker-addon-exit/build/Release/binding.node]
6: 0xaacfbead1f78 [out/Release/node]
7: 0xaacfbeb80558 [out/Release/node]
8: 0xaacfbeb80e90 [out/Release/node]
9: 0xaacfbeb839c4 [out/Release/node]
10: 0xaacfbf32d240 [out/Release/node]
11: 0xaacfbeb817ac [out/Release/node]
12: 0xaacfbeb4e4d4 [out/Release/node]
13: 0xaacfbeb4e90c [out/Release/node]
14: 0xaacfbeb1f840 [out/Release/node]
15: 0xaacfbf500298 [out/Release/node]
16: 0xaacfc1072c8c [out/Release/node]
Command: out/Release/node /home/runner/work/_temp/node-v27.0.0-nightly2026-06-14a8b15d8975-slim/test/addons/worker-addon-exit/test.js
--- CRASHED (Signal: 6) ---
===
=== 1 tests failed
=== 1 tests CRASHED
===Build links
- https://github.com/nodejs/node/actions/runs/27484637939/job/81288175786?pr=63902
- https://ci.nodejs.org/job/node-test-commit-linux-containered/56784/nodes=ubuntu2404_sharedlibs_icu_x64/console
- https://ci.nodejs.org/job/node-test-commit-linux/70495/nodes=alpine-last-latest-x64/console
Additional information
Looking at https://github.com/nodejs/reliability/issues?q=is%3Aissue%20state%3Aopen%20addons%2Fworker-addon-exit%2Ftest, it seems to be happening since June 6th
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
flaky-testIssues and PRs involving tests that fail intermittently in CI.Issues and PRs involving tests that fail intermittently in CI.
Activity
aduh95 commentedon Jun 15, 2026
It was also reported in #63642 (comment), the PR that introduced this test. Looks like the test failed in that PR (https://ci.nodejs.org/job/node-test-commit-linux-containered/56671/nodes=ubi81_sharedlibs_openssl111fips_x64/console) but it wasn't noticed during review unfortunately
[-]Falky crash on worker-addon-exit test[/-][+]Flaky crash on worker-addon-exit test[/+]addaleax commentedon Jun 15, 2026
600k runs without a reproduction 😓 It would be lovely to get a better stack trace here for actually pinpointing where this is coming from. I guess the simplest fix would be to use an async cleanup hook instead of the synchronous one, where the current
Environment*isn't required to be on-context, but this does admittedly point to a bit of a usability problem with cleanup hooks in their current formsantigimeno commentedon Jun 16, 2026
Happened to have a debug build around and could reproduce it with:
tools/test.py -j32 --repeat=128 addons/worker-addon-exit/test.js. It seems to me your assessment is correct: when gc runs we're not in-context anymore. Here's the bt: https://gist.github.com/santigimeno/0cb38039629aeca161c8656442aca96f. Let me know if you need more info (I have the coredump)addaleax commentedon Jun 18, 2026
#63985 should hopefully address this
src: keep global list of addon-provided cleanup hooks
src: keep global list of addon-provided cleanup hooks
test_runner: re-run CI (unrelated flaky nodejs#63923)
qmd embed stack on linux-aarch64 + shared ssh key source
test: add regression test for cleanup hook UAF
test: add regression test for cleanup hook UAF
test: add regression test for cleanup hook UAF
test: add regression test for cleanup hook UAF
src: keep global list of addon-provided cleanup hooks
src: keep global list of addon-provided cleanup hooks
src: keep global list of addon-provided cleanup hooks
feat(torrent): drop autotorrent2, inject cross-seed finds directly in…