Skip to content

fix(node): bump napi-rs to fix crash on concurrent response-body read errors#499

Merged
barjin merged 1 commit into
masterfrom
claude/issue-498-investigation-0bcfiq
Jul 14, 2026
Merged

fix(node): bump napi-rs to fix crash on concurrent response-body read errors#499
barjin merged 1 commit into
masterfrom
claude/issue-498-investigation-0bcfiq

Conversation

@barjin

@barjin barjin commented Jul 14, 2026

Copy link
Copy Markdown
Member

Fixes #498

… errors (#498)

napi-rs 3.8.4's ReadableStream pull-callback (used by ImpitResponse's
body streaming) could drop its resolver closure on a tokio worker
thread when the underlying stream yielded Err, releasing a
FunctionRef's V8 global handle off the JS thread. Under concurrent
body-read errors (e.g. simultaneous read timeouts) this raced V8's
GlobalHandles and crashed the process with SIGTRAP/SIGSEGV/SIGBUS.

Bumping napi to 3.10.5 (and napi-derive/napi-build to their matching
latest patch releases) resolves it — verified with the reporter's
concurrent-timeout repro (8/8 clean 30s runs at 5 workers, previously
crashing in ~1 of 5 runs).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014Jom9tSWtRxejUjvo53QpU
@barjin barjin self-assigned this Jul 14, 2026
@barjin
barjin requested a review from B4nan July 14, 2026 11:34
@barjin

barjin commented Jul 14, 2026

Copy link
Copy Markdown
Member Author

Running the repro script from the issue

Before the fixes from this branch:

image

After:

image

@barjin
barjin merged commit fdb650c into master Jul 14, 2026
52 checks passed
@barjin
barjin deleted the claude/issue-498-investigation-0bcfiq branch July 14, 2026 11:37
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.

[node] Process crashes (SIGTRAP/SIGSEGV) when multiple response body reads fail concurrently (e.g. read timeouts)

4 participants