Repository navigation
Description
What happened?
deploy/Dockerfile pins its base image to a floating tag:
ARG NODE_IMAGE=docker.io/library/node:24-alpine
ARG RUNTIME_IMAGE=docker.io/library/node:24-alpineNode 24.19.0 was released on 2026-08-03. Any image rebuilt after that date picks it up — and on 24.19.0 the daemon is killed by a native assertion mid-run:
# node[7]: void node::RemoveEnvironmentCleanupHook(v8::Isolate*, CleanupHook, void*) at ../src/api/hooks.cc:142
# Assertion failed: (env) != nullptr
----- Native stack trace -----
(nothing follows)
The process aborts, restart: always brings it back ~4s later, and every request proxied during that window fails. The user-visible symptom is an intermittent 500 Internal Server Error and a run that dies partway through.
I rebuilt our image on 08-04 without touching the Open Design version, and it went from zero crashes to 17 of 21 runs killed (81%). Nothing in the error points at Node, so this cost a full day to track down — hence writing it up.
Steps to reproduce
- Build the daemon image from
deploy/Dockerfileon/after 2026-08-03 so the floatingnode:24-alpineresolves to 24.19.0 (verify withdocker run --rm --entrypoint node <image> -v). - Start a run that streams for more than a minute (any agent — reproduced with both
claudeandcodex). - The daemon aborts with the assertion above. It reproduced every 1.5–20 minutes of active run time for us.
Expected behavior
A rebuild of the same Open Design source should produce a working image. Build output should be determined by its inputs, not by the date it was built.
Likely root cause
Node 24.19.0 includes src: add cleanup hooks to node::ObjectWrap (nodejs/node#63642). better-sqlite3 (12.10.0) and node-pty (1.1.0) are NAN-style ObjectWrap addons, which is exactly the surface that PR touches. The assertion fires from RemoveEnvironmentCleanupHook — a cleanup hook being removed after the Environment is already gone.
Evidence that Node is the variable rather than Open Design:
- dependency versions are byte-identical between the working and broken builds (
[email protected],[email protected]in both) - the only delta between our last good base image and the broken one is Node 24.18.0 → 24.19.0
- rebuilding the same Open Design source with
--build-arg NODE_IMAGE=node:24.18.0-alpinefixes it: runs that previously died 15-out-of-18 times in one project now complete,RestartCountstays 0
Not memory — the container sat at 148MB against a 1024MB heap cap, OOMKilled=false, host had 4.4GB free and untouched swap.
Suggested fix
Pin the Node minor in deploy/Dockerfile (e.g. node:24.18.0-alpine) and bump it deliberately. Same reasoning as any lockfile: a rebuild shouldn't silently change the runtime underneath the app. Happy to send a PR if that's the direction you'd want.
Diagnostic note for anyone hitting this
--report-on-fatalerror / --report-uncaught-exception will not capture this one. Generating the report itself needs the Environment, and it's already nullptr — so the report never lands and the native stack prints empty (same root cause for both). We enabled both, crashed twice, and the report directory stayed empty. Don't lose time there like we did.
Open Design version
0.17.0
Platform
Linux (self-hosted Docker, amd64)
Activity
open-design-bot commentedon Aug 5, 2026
🎉 ✨ Welcome to Open Design, @jiulongche!
🌱 Every contribution adds energy to the project. Thanks for showing up and helping Open Design grow.
💛 Thanks for helping Open Design grow. Keep building in the open. 🚀
🔗 Share on X (English) · 分享到 X(中文)
lefarcen commentedon Aug 5, 2026
Hi @jiulongche! 👋
This is a strong report. The floating
node:24-alpinetags indeploy/Dockerfileare real, and your write-up narrows the regression down in a way that's immediately actionable.From the repo side,
deploy/Dockerfilecurrently builds and runs ondocker.io/library/node:24-alpine, while the daemon/runtime path still relies on native modules likebetter-sqlite3andnode-pty. That makes your Node24.18.0 -> 24.19.0delta a credible working hypothesis rather than just a coincidence.We haven't confirmed the exact upstream addon teardown path yet, so I'm treating that part as a working hypothesis for now, but the build reproducibility problem itself is clear. A PR that pins both Docker base args to a known-good Node image and documents why would be welcome here.
Thanks for including the repro rate, the
RestartCountcomparison, and the note about fatal-error reports staying empty - that saves a lot of dead-end debugging.lefarcen commentedon Aug 5, 2026
PR #6467 is now up with the narrow reproducibility fix: it pins both
deploy/Dockerfilebase-image args tonode:24.18.0-alpineand documents why the floatingnode:24-alpinetag caused rebuilds from unchanged source to drift into the crashing runtime. Keeping this issue open until that PR lands, since the underlying user-facing regression here is the intermittent daemon crash loop on rebuilt self-hosted images.fix(deploy): pin the Node base image so rebuilds stay reproducible
fix(ci): pin Node to 24.18.0, avoiding 24.19.0's native-addon cleanup…
Pin release.yml verify job to Node 24.18.0, matching ci.yml
fix(runtime): pin Node to 22.x — 24.19.0 aborts the process on every GC
fix(deploy): pin the Node base image so rebuilds stay reproducible
Fixar versão do Node (20.x) — corrige crash nativo do better-sqlite3