Skip to content

GGML_ASSERT crash in Metal reranking on Apple Silicon (M1) — qmd query SIGABRT on 2.0.x #388

@adhishthite

Description

@adhishthite

QMD version: 2.0.1 (also reproduced on 2.0.0 — different failure: missing dist files)
Working version: 1.1.6
OS: macOS 15.3.0 (Darwin 25.3.0 arm64) — Apple M1
Node.js: v25.8.1
Runtime: bun 1.3.8 (global install via bun install -g)

Description

qmd query crashes with a GGML_ASSERT failure during the reranking step on Apple Silicon (M1). The assertion fires in ggml_metal_device_free when the process exits after reranking completes.

Steps to reproduce

bun install -g @tobilu/qmd@2.0.1
qmd query "any search term" -n 3

Expected behavior

Query completes and returns ranked results.

Actual behavior

Query expansion, searching, and embedding all succeed. The crash occurs during/after the reranking step:

Reranking 28 chunks...
ggml/src/ggml-metal/ggml-metal-device.m:612: GGML_ASSERT([rsets->data count] == 0) failed
Process exited with signal SIGABRT

Full backtrace shows the assertion fires in ggml_metal_device_init called from ggml_metal_device_free, suggesting a Metal resource cleanup issue on process exit.

Notes

  • qmd search (BM25 only, no reranking) works fine on 2.0.1
  • qmd update and qmd embed work fine on 2.0.1
  • qmd query works perfectly on 1.1.6 (same machine, same index)
  • Likely related to the bundled node-llama-cpp version change between 1.1.6 and 2.0.x

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions