Skip to content

Misc. bug: llama-server with --mlock throws GGML_ASSERT(addr) on Mac #18152

Closed

Description

@wsomm

Name and Version

b7440.

Operating systems

Mac

Which llama.cpp modules do you know to be affected?

llama-server

Command line

/opt/homebrew/bin/llama-server --model ~/.llama.cpp/gpt-oss-20b-Q4_0.gguf --mlock

Problem description & steps to reproduce

The error occurs with all local models (gpt-oss variants and Qwen3 variants).

As soon as the --mlock switch is set, the llama-server crashes.
When I delete it, everything runs fine. Other switches have no influence.

Machine is a Mac Studio M3U.

First Bad Commit

7410 is the first version with the error. 7406 is ok.

Relevant log output

/private/tmp/llama.cpp-20251217-5441-bznlmx/src/llama-mmap.cpp:565: GGML_ASSERT(addr) failed
WARNING: Using native backtrace. Set GGML_BACKTRACE_LLDB for more info.
WARNING: GGML_BACKTRACE_LLDB may cause native MacOS Terminal.app to crash.
See: https://github.com/ggml-org/llama.cpp/pull/17869
0   libggml-base.0.9.4.dylib            0x0000000102d653bc ggml_print_backtrace + 276
1   libggml-base.0.9.4.dylib            0x0000000102d655a8 ggml_abort + 156
2   libllama.0.0.7440.dylib             0x0000000102b5a9cc _Z14llama_path_maxv + 0
3   libllama.0.0.7440.dylib             0x0000000102b92188 _ZN11llama_model12load_tensorsER18llama_model_loader + 167640
4   libllama.0.0.7440.dylib             0x0000000102b15578 _ZL31llama_model_load_from_file_implRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERNS_6vectorIS5_NS3_IS5_EEEE18llama_model_params + 1116
5   libllama.0.0.7440.dylib             0x0000000102b150b0 llama_model_load_from_file + 76
6   libllama.0.0.7440.dylib             0x0000000102b16474 _ZL28llama_get_device_memory_dataPKcPK18llama_model_paramsPK20llama_context_paramsRNSt3__16vectorIP19ggml_backend_deviceNS7_9allocatorISA_EEEERjSF_SF_14ggml_log_level + 168
7   libllama.0.0.7440.dylib             0x0000000102b128fc llama_params_fit + 184
8   llama-server                        0x0000000102397060 _ZN18common_init_resultC2ER13common_params + 232
9   llama-server                        0x0000000102397fa8 _Z23common_init_from_paramsR13common_params + 76
10  llama-server                        0x00000001022ae250 _ZN19server_context_impl10load_modelERK13common_params + 180
11  llama-server                        0x000000010223d530 main + 9032
12  dyld                                0x00000001821f5d54 start + 7184
Abort trap: 6

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions