Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

llama.cpp kills itself on gpu

Open
#374 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
macos, rust

Research direction

Start by reproducing the first GPU compute request with llama.cpp b11827, after following the report's steps to skip the failing fa_tensor library. Inspect the Metal driver path involved in command buffer submission and the reported nvmtlAdvancePart crash. Done means Metal initialization and the first /v1/embeddings request complete without the reported failures.

Written by the indexing model from the issue text.

Description

bug
Send logs report ID

N/

Where does it go wrong?

Building or writing the USB stick (1401 on Windows)

What happens

running llama.cpp on the gpu through metal kills the process on the first real compute request. desktop is fine, just the app dies. 7 out of 7 runs.

  1. fa_tensor wont translate
    llama.cpp compiles all its metal libraries at startup. the fa_tensor one (flash attention, metal 4 tensor api) fails:
    MTLLibraryErrorDomain Code=3 "newLibraryWithData: translation produced nothing"
    llama.cpp treats any failed library as fatal so metal init dies before anything runs. GGML_METAL_TENSOR_DISABLE=1 doesnt skip it. i patched llama.cpp locally to skip fa_tensor when it fails, which gets past this. probably fine to just not support it, but the translator returning nothing instead of an error explaining why made it hard to tell what was going on.

  2. crash in nvmtlAdvancePart
    with fa_tensor skipped, the server starts, model loads, gpu shows up as MTL0 with 12227 MiB. first /v1/embeddings request:

EXC_BAD_ACCESS / SIGBUS, KERN_PROTECTION_FAILURE (write into a protected page)

0  libsystem_platform  _platform_memmove$VARIANT$Haswell + 268
1  NVMTLDriver         -[NVMTLCommandBuffer(EventSubmission) nvmtlAdvancePart] + 2126   (+0x67c2e)
2  NVMTLDriver         __nvmtl_pump_buffers_block_invoke_2 + 1039                       (+0xa433f)
3  libdispatch         _dispatch_call_block_and_release
...

NVMTLDriver uuid 10f101a6-00ef-353e-add9-54f27fdbf919

fault address always ends in 0x5a0 into a page (0x122ac95a0, 0x11d9ff5a0, 0x121f845a0), so it looks like a copy running off the end of a buffer into the next page rather than random garbage.

Written by you
  • I wrote this report myself. AI-written issues are closed without review (see CONTRIBUTING.md).
App or game (if it is one)

llama.cpp b11827 (970b51c)

Did you change anything yourself?
  • extra boot-args: -lilubetaall, -nvrmnobootscreen, alcid=28
  • debug.nvrmfb_flip_latch=2 set at boot
Dominant language
Rust
Stars
2.5k
Forks
233
Avg merge
21h 20m
Merged PRs (30d)
3

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nullmoth/nvidia-macos-driver

All issues in nullmoth/nvidia-macos-driver

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.