ruflo neural train crashes with libc++abi mutex lock failed on macOS arm64 (GitHub Actions macos-latest)
ruflo neural train crashes with libc++abi: mutex lock failed: Invalid argument on macOS arm64 (GitHub Actions macos-latest)
Summary
ruflo neural train -p coordination -e 50 reliably crashes the Node process on macos-latest GitHub Actions runners (Apple Silicon) with an uncaught C++ exception, right after the embedding model loads. Reproduced across 2 consecutive nightly runs (2026-07-30, 2026-07-31) in pacphi/agentic-kit's nightly-live canary workflow, which installs ruflo@latest fresh each night specifically to catch this kind of upstream regression.
Environment
ruflo 3.33.0(latest at time of failure)agentic-qe 3.13.3- Node
22.23.1(arm64), viaactions/setup-node@v7 - Runner: GitHub Actions
macos-latest(Apple Silicon) - Global install:
npm install -g --allow-scripts=ruflo,agentic-qe,@claude-flow/cli,better-sqlite3,hnswlib-node,agentdb,agentic-flow,argon2,onnxruntime-node,sharp,protobufjs,@google/genai,tldjs,vibium ruflo@latest agentic-qe@latest
Steps to reproduce
npm install -g --allow-scripts=ruflo,agentic-qe,@claude-flow/cli,better-sqlite3,hnswlib-node,agentdb,agentic-flow,argon2,onnxruntime-node,sharp,protobufjs,@google/genai,tldjs,vibium ruflo@latest agentic-qe@latest
mkdir /tmp/repro && cd /tmp/repro
ruflo neural train -p coordination -e 50Observed output
learning — train a cycle in an isolated dir, assert patterns persist
[ruvector] WASM backend unavailable (Cannot find module '@ruvector/learning-wasm/ruvector_learning_wasm_bg.wasm'
Require stack:
- .../ruflo/node_modules/@claude-flow/cli/dist/src/services/ruvector-training.js), using JS fallback
✅ Using native better-sqlite3
dtype not specified for "model". Using the default dtype (fp32) for this device (cpu).
libc++abi: terminating due to uncaught exception of type std::__1::system_error: mutex lock failed: Invalid argumentProcess exits non-zero immediately after that abort — no patterns/stats are written to .claude-flow/neural/.
Notes
- The crash happens specifically with native
better-sqlite3loaded alongside the transformers.js/onnxruntime embedding path (Xenova/all-MiniLM-L6-v2, CPU backend, invoked as the fallback once@ruvector/learning-wasm's.wasmfile isn't resolved — see the "WASM backend unavailable" line above, which may be a separate but related packaging issue: the.wasmasset doesn't appear to ship/resolve correctly). - A separate local repro (Apple Silicon, non-CI) where the native
better-sqlite3build was unavailable and the SQLite backend fell back tosql.js(WASM) instead did not crash — same[email protected], same host arch. That points at a thread-safety/mutex-reinit issue when both native addons (better-sqlite3 + onnxruntime-node) are loaded in the same process on this platform, rather than a pure onnxruntime issue in isolation. live (ubuntu-latest)passed on the same commit/run, so this looks macOS-arm64-specific.- CI run showing the failure with this exact trace: https://github.com/pacphi/agentic-kit/actions/runs/30613986990/job/91102855478
- Prior occurrence (before better diagnostics were in place, only "ruflo neural train failed" with no detail): https://github.com/pacphi/agentic-kit/actions/runs/30612324523
Happy to provide more detail or test a fix candidate — this is caught nightly by an upstream-drift canary so we'll see immediately if a future release resolves it.
Source: ruvnet/ruflo