fix(silero): bump onnxruntime-node to 1.24.3 to fix libc++abi mutex abort (#1375)#1377
Merged
toubatbrian merged 1 commit intolivekit:mainfrom May 4, 2026
Conversation
…bort on shutdown (macOS arm64) Loading the Silero VAD plugin and exiting Node aborts with "libc++abi: terminating due to uncaught exception of type std::__1::system_error: mutex lock failed" on macOS arm64. The abort fires inside ~unique_ptr<OrtEnv> in libonnxruntime.1.21.0.dylib's static destructor while LiveKit's tokio runtime threads are still alive — a static-destructor race present in onnxruntime-node 1.21.0..1.23.2 and fixed upstream in 1.24.1. Bumping the pin to 1.24.3 (and matching onnxruntime-common) resolves the crash. Verified via the minimal repro in livekit#1375.
🦋 Changeset detectedLatest commit: c609294 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
Author
|
Upstream root cause confirmed. The bisect range matches the documented upstream regression and fix:
That matches the lldb trace in #1375 (frame |
toubatbrian
approved these changes
May 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #1375.
@livekit/agents-plugin-sileropinsonnxruntime-nodeto1.21.0exactly. That version (and 1.21.x..1.23.x) has a static-destructor race that aborts the Node process on shutdown when LiveKit's tokio runtime threads are still alive at exit — a 100%-reproducible crash on macOS arm64 with a libc++abi mutex error.The bug was fixed upstream in
onnxruntime-node@1.24.1. This PR bumps the pin (and the matchingonnxruntime-commondevDep) to1.24.3.Bisect
Same minimal repro, only changing the
onnxruntime-nodeversion:Native stack trace at the abort
10
tokio-rt-workerthreads fromrtc-node.darwin-arm64.nodeare still alive at the moment of abort (parked in__psynch_cvwait/kevent). Full lldb trace and bisection in #1375.Test plan
pnpm installresolves cleanly (lockfile regenerated, only the silero workspace is affected)pnpm --filter @livekit/agents buildsucceedspnpm --filter @livekit/agents-plugin-silero buildsucceedssilero.VAD.load() + process.exit(0)) exits cleanly with status 0 against the new versionpnpm -w format:writeandpnpm -w lint:fixproduce no new warnings (existing 120 warnings inagents/src/voice/generation_tools.test.tsare unrelated)onnxruntime-node1.21 → 1.24 is a minor bump within the same major. The exposed API surface used bysilero/src/onnx_model.ts(InferenceSession.create,Tensor, run-options) is unchanged across this range, and the silero plugin's own build + types pass.