Skip to content

fix(deploy): MemoryDenyWriteExecute=true core-dumps Node 24 at V8 isolate init#174

Open
tudorsaitoc wants to merge 1 commit into
gastownhall:mainfrom
tudorsaitoc:fix/deploy-unit-mdwe
Open

fix(deploy): MemoryDenyWriteExecute=true core-dumps Node 24 at V8 isolate init#174
tudorsaitoc wants to merge 1 commit into
gastownhall:mainfrom
tudorsaitoc:fix/deploy-unit-mdwe

Conversation

@tudorsaitoc

Copy link
Copy Markdown

The shipped systemd unit sets MemoryDenyWriteExecute=true, which denies the writable+executable mprotect V8's JIT needs when creating the first isolate. On Node 24 (the documented runtime) the service never reaches main():

# Fatal error in , line 0
# Check failed: 12 == (*__errno_location ()).
...
3: 0x2723e56 v8::base::OS::SetPermissions(...)
8: 0xc30cc6 v8::Isolate::Initialize(...)
...
gas-city-dashboard.service: Main process exited, code=dumped, status=5/TRAP

Hit this deploying the unit verbatim on Ubuntu with Node 24.15.0 (repro: systemctl --user enable --now gas-city-dashboard.service on any host, the service core-dumps before binding). This PR flips the directive to =false with a comment explaining why, so the next operator doesn't have to rediscover it from a core dump. Every other hardening directive is kept.

Sibling data point from the same deploy landed on #88 (cold formulas/feed scan timing).

…t isolate init

The shipped unit sets MemoryDenyWriteExecute=true, which denies the
writable+executable mprotect V8 needs when creating the first isolate.
On Node 24 (the documented runtime) the service never reaches main():

  # Fatal error in , line 0
  # Check failed: 12 == (*__errno_location ()).
  ... v8::base::OS::SetPermissions ... v8::Isolate::Initialize
  Main process exited, code=dumped, status=5/TRAP

Observed deploying the unit verbatim on Ubuntu / Node 24.15.0. Turn the
directive off with a comment explaining why, so the next operator doesn't
rediscover this from a core dump.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant