Skip to content

third_party: bump llama.cpp to db7b34770 — a failed mtmd chunk returns instead of continuing into a null slot.task (Fixes #1489) - #1512

Merged
bong-water-water-bong merged 1 commit into
mainfrom
1bit/pin-1489
Nov 8, 2026
Merged

bong-water-water-bong merged 1 commit into
mainfrom
1bit/pin-1489

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

Fixes #1489. The engine pin was 6ea38d045 (fork #243), which predates the fix, so the crash that issue reports still reached every user of the
engine: a failed CLIP image encode printed its error, sent the HTTP 500, and then SIGSEGV'd.

engine main   third_party/llama.cpp = 6ea38d045   (fork #243)
git merge-base --is-ancestor db7b34770 6ea38d045  → false     # the fix is NOT in the pin

What the bump carries

db7b34770  server: return instead of continuing after a failed mtmd chunk, because release() nulls slot.task (engine #1489) (#246)
c94b3cc97  hrx: chunk a batched prefill matmul above the tile's 2048-token range (#244)

Verified before bumping, not assumed

Same repro as the issue (Qwen3-VL-2B Q4_K_M + mmproj-Qwen3VL-2B-Instruct-F16, one 64×64 PNG, -ngl 99 --device HRX0, one gpu-hold ticket per arm), on a build of the
tree that carries the fix:

arm error path client process
without the fix ROPE matcher rejected → sched_graph_compute failed -1 → failed to encode mtmd batch … res = 1 → send_error HTTP 500 SIGSEGV, exit 139, #0 pre_decode()::{lambda(server_slot&)#5}+6858
with the fix byte-identical log lines HTTP 500 with the same body alive, no fault

The fault itself, for the record: release() reaches reset(), which does task_prev = std::move(task); task.reset();, so slot.task becomes null; the error
branch then continued into a loop whose head reads slot.task->n_tokens(). The disassembly at the fault offset shows exactly that — call server_slot::release(),
then mov 0xf0(%rbx),%r14, then mov 0x9e0(%r14),%rcx faulting with r14 == null.

Registry

scripts/registry-regen.sh after the bump: one line changes (the pin), counts stay hrx 298 / npu 9 / mapped 298, and none of the 34 reviewed significant
classes becomes mapped without a reason. tools/check_pins.py origin/main → ok third_party/llama.cpp: 6ea38d045 -> db7b34770 is ahead. tools/copyright.py --check
clean. Two files, two lines.

Not in this PR

No regression test: the repro needs a GPU and ~2 GB of weights, so it is not a ctest row as written. I have the script with the acceptance assertions in it
(HTTP 5xx and process alive) at ~/work/zarch/proof/i1489-repro.sh, and offered in #1489 to land the device_route.sh-style version if the server lane wants
one — deliberately not bundled here, because a pin bump should be a pin bump.

Refs #1489, #1467 (the capability gap that triggers it, untouched here)

…s instead of continuing into a null slot.task (Fixes #1489)

The pin was at 6ea38d045 (fork #243), which predates the fix, so the crash this issue reports still reached every engine user: a
failed CLIP image encode printed its error, sent the HTTP 500, and then SIGSEGV'd, because the error branch called
`slot.release()` (which nulls `slot.task` through `reset()`) and then `continue`d into a loop whose head dereferences
`slot.task->n_tokens()`.

Two fork commits since the old pin:

  db7b34770  server: return instead of continuing after a failed mtmd chunk, because release() nulls slot.task (engine #1489) (#246)
  c94b3cc97  hrx: chunk a batched prefill matmul above the tile's 2048-token range (#244)

Verified before this bump, on the repro in #1489 (Qwen3-VL-2B + mmproj, 64x64 PNG, -ngl 99 --device HRX0): with the fix the same
failure path delivers HTTP 500 and the server stays alive; without it the process dies with exit 139 in
`pre_decode()::{lambda(server_slot&)#5}`.
@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

#1512 ready for review at e2c9b29b6 (base main; two files, two lines; ls-remote confirms).

Three things worth a reviewer's attention:

  1. This is a user-facing gap, not tidiness. The engine main pins 6ea38d045 = fork serve: --parallel 1 starts llama-server with one slot #243, and git merge-base --is-ancestor db7b34770 6ea38d045 is false, so the SIGSEGV in hrx: a failed CLIP image encode returns its error correctly and then the server SIGSEGVs before answering (found measuring #1467) #1489 still reached everyone running the engine from main even though the fork had the fix. That is why it is worth a bump on its own rather than waiting for a larger one.
  2. The bump carries two fork commits, not one: db7b34770 (RFC: census-watch workflow with issues: write #246, this fix) and c94b3cc97 (serve: one slot for Qwen3.5/3.8 on HRX when --parallel is not given #244, hrx batched-prefill chunking). Both are merged in the fork line and both carry their own PR evidence; this PR does not re-derive them.
  3. Verified before bumping: the repro from hrx: a failed CLIP image encode returns its error correctly and then the server SIGSEGVs before answering (found measuring #1467) #1489 was run on a build carrying the fix and on one without it — identical failure path, HTTP 500 in both, and the only difference is that the unpatched binary dies with exit 139 in pre_decode()::{lambda(server_slot&)#5}. The instruction at the fault offset is call server_slot::release() → mov 0xf0(%rbx),%r14 → mov 0x9e0(%r14),%rcx with r14 == null, which is the null slot.task the fix stops dereferencing.

No regression test in this PR on purpose: the repro needs a GPU and ~2 GB of weights, so it is not a ctest row as written; the script with the acceptance assertions is at ~/work/zarch/proof/i1489-repro.sh and I offered the device_route.sh-style version in #1489.

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT: READY at e2c9b29b6d531726fe7108754796327d7f730248

third_party/llama.cpp          6ea38d0457 -> db7b34770fda2e956b7adc0cc3df8b57d973576d
registry/architectures.json    same, so --check-pins stays honest
db7b34770  "server: return instead of continuing after a failed mtmd chunk, because …"

That is #246 — the release() → null slot.task → SIGSEGV fix I verdicted an hour ago, now merged into the fork branch and pinned. Both files move together, which is the property that keeps the registry's provenance meaningful.

A crash fix is the right reason to move a pin promptly, and this one is a two-line change to the server, so the bump carries a small delta rather than a branch resync.

Not run: a build at the new pin (it is a pin file; the commit it names is the reviewed one).

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.

hrx: a failed CLIP image encode returns its error correctly and then the server SIGSEGVs before answering (found measuring #1467)

1 participant