-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
[Bug]: local memory embeddings on Apple Silicon can crash gateway in ggml-metal / node-llama-cpp; need official Metal/GPU guidance #44202
Copy link
Copy link
Closed
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Summary
Local memory embeddings on macOS Apple Silicon can crash the gateway in the
node-llama-cpp/ggml-metalpath during restart/shutdown, even when the main chat model is healthy.This report is being filed by
@samersaiboton behalf of Samer Haddad after reproducing and recovering the issue on a Mac Studio. We are also asking for guidance on the ideal supported path for GPU-backed local embeddings on Apple Silicon, because the stable recovery we reached required disabling the Metal path for embeddings.Environment
2026.3.11/opt/homebrew/lib/node_modules/openclawai.openclaw.gateway)v25.6.1/opt/homebrew/opt/node@22/bin/node(v22.22.0)openai-codex/gpt-5.4localhf:ggml-org/embeddinggemma-300m-qat-q8_0-GGUF/embeddinggemma-300m-qat-Q8_0.ggufvec0.dylib)What happened
ggml-metal/node-llama-cpp, not the main model path.Promise.alldeadlock risk, related to Local GGUF memory embeddings can deadlock due to Promise.all concurrency (node-llama-cpp) #7547)25/25files111chunksreadySo the current system is usable again, but the only stable local recovery we found was to avoid the Metal path for embeddings.
Actual crash evidence
From
~/.openclaw/logs/gateway.err.log:Recent matching lines from the live log:
gateway.err.log:29002gateway.err.log:29065gateway.err.log:29116gateway.err.log:29167gateway.err.log:29214These were observed alongside gateway restart/shutdown cycles in
gateway.log, for example:gateway.log:19231/19232(signal SIGTERM received/received SIGTERM; shutting down)gateway.log:19241(gateway listening again after recovery)gateway.log:19456(later healthy restart with main modelopenai-codex/gpt-5.4)Relevant config
{ "agents": { "defaults": { "model": { "primary": "openai-codex/gpt-5.4", "fallbacks": [] }, "memorySearch": { "enabled": true, "provider": "local", "fallback": "none", "local": { "modelPath": "hf:ggml-org/embeddinggemma-300m-qat-q8_0-GGUF/embeddinggemma-300m-qat-Q8_0.gguf" }, "store": { "vector": { "enabled": true } }, "sync": { "watch": true } } } } }Current recovered state
openclaw memory status --deepcurrently shows the recovered local state is healthy:Additional context / likely related issues
Promise.all; we also hit that code path and had to switch batch embedding to sequential locally.node-llama-cppinstall/runtime fragility on Apple Siliconnode-llama-cppinstall/build/update problemsWhy this matters
For users who want local memory on Apple Silicon, the current path appears vulnerable in two ways:
ggml-metalassertion)That combination makes it hard to use the advertised local memory path confidently in production.
Request / questions
ggml-metal-device.m:612assertion a known upstreamnode-llama-cpp/ llama.cpp issue in OpenClaw’s local memory embedding path?Suggested fix directions
If helpful, I can provide a tighter minimal repro based on: