Skip to content

fix(deps): update napi to avoid the shutdown detach race - #11268

Closed
dprotaso wants to merge 3 commits into
rolldown:mainfrom
dprotaso:fix/napi-shutdown
Closed

dprotaso wants to merge 3 commits into
rolldown:mainfrom
dprotaso:fix/napi-shutdown

Conversation

@dprotaso

Copy link
Copy Markdown

Summary

  • Update the locked napi dependency to 3.15.0, including the shutdown fix in fix(napi): join the Tokio runtime threads at env teardown napi-rs/napi-rs#3592 and its required napi-sys 3.4.1 update.
  • This avoids the normal Tokio detach-on-exit path that can segfault in pthread_detach on affected glibc versions. Shutdown waits up to 100 ms; threads can still be detached after the timeout.
  • Regression tests live in the upstream fix. No Rolldown API or dependency-range changes.

Validation

  • just lint-rust and cargo build -p rolldown_binding --locked on macOS arm64, using Apple clang.
  • 100/100 sequential native-binding load/exit runs passed with Node 24.15.0 and TOKIO_WORKER_THREADS=32.
  • NEEDS_EXTENDED=false just test-rust: integration suite had 2,155 passes and five failures from missing JS dependencies/test262 submodule. Node suite and high-CPU Linux stress testing remain pending.

Notes

  • AI-assisted contribution. Please enable ci: webcontainer for this manual napi update.

@dprotaso
dprotaso marked this pull request as ready for review October 22, 2026 14:27
@codspeed

codspeed Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

1 warning

⚠️ 4 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 7 untouched benchmarks
⏩ 10 skipped benchmarks1


Comparing dprotaso:fix/napi-shutdown (93d597f) with main (8eaa7f3)

Open in CodSpeed

Footnotes

  1. 10 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@dprotaso

Copy link
Copy Markdown
Author

Any chance we can merge this dep bump for Wednesday's release it pulls in a SEGFAULT fix

@shulaoda shulaoda self-assigned this Oct 28, 2026
@shulaoda

Copy link
Copy Markdown
Member

Thanks for the contribution! This is now covered by #11287, which will ship in this release.

@shulaoda shulaoda closed this Oct 28, 2026
@dprotaso

Copy link
Copy Markdown
Author

Thanks!

IWANABETHATGUY added a commit that referenced this pull request Oct 28, 2026
…umer's entries load (#11293)

The runtime could be placed in a chunk that a runtime consumer's entries
never load, so loading that consumer also ran the host chunk. After
#11257, the `src/cli/logger` chunk of `@rolldown/browser` imported
`__exportAll` from the `binding-*.d.mts` chunk, which broke the
WebContainer suite ([CI
run](https://github.com/rolldown/rolldown/actions/runs/39795658288/job/119912668403?pr=11268)):

```
Error [ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING]: Stripping types is currently unsupported for files under node_modules, for "file:///home/n2ixzueuvg3ulsv6tc9vnscfoy40oq-aurr/node_modules/.pnpm/file+rolldown-browser.tgz/node_modules/@rolldown/browser/dist/shared/binding-DPNoioF9.d.mts"
```

The two `perf(rolldown_utils)` commits make `BitSet::is_subset` faster,
because the new check calls it in a loop.

requires #11298
refs #11268
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants