feat: upgrade llama.cpp from b10902 to b10903 - #431
Conversation
Upstream b10903 is a single commit (#28705) touching two Vulkan GLSL shaders and nothing else: argsort.comp and argsort_large.comp get an out-of-bounds read fixed (a padded column no longer reads data_a past p.ncols) and a data race removed (the compare-exchange body moves inside the ixj > col guard, so only one thread of each pair touches the two shared-memory slots). No C++, no header, no build-system file changed, so every row of the API-compatibility review table is vacuously satisfied and the three mechanical tools/server contract greps have no input. The change reaches only the three Vulkan classifier artifacts, where glslc compiles the shaders at build time; the default JAR and every other classifier are unaffected. All nine patches apply untouched -- no patch target is in the range. The three standing drop-checks were still run against the pristine tag, since the fail-loud applier detects "does not apply" but never "upstream already fixed this": 0001 (common_params_parse_main absent from arg.h, override still at arg.cpp:1282), 0010 (vocab_type still emitted uncast at server-context.cpp:4554) and 0012 (bare splits[i] /= split_sum at llama-model.cpp:1491) are all still required. Verified from a fresh configure: stamp head 481c65f0 with all nine SHA-256 lines, build clean, ctest 537/537, extraction 138/57/15, nm -D 40 Java_* exports and 0 mangled, NativeLibraryLoadSmokeTest 4/4 after a clean, mvn test 1755/0, SpotBugs 0, spotless and javadoc clean. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AnNYn8W1xuVxVJtyL34GyH
|
Three checks are red on 1. 2. Zero cost, empty No re-run spent. A re-run is for confirming a failure is non-deterministic. Seven consecutive failures across six branches over two days, plus a 1-second Generated by Claude Code |
|
|
A fourth check has since gone red — It is red on Cause: CodeQL's Kotlin extractor does not support Kotlin 2.4.20. The failing run writes the diagnostic file
Proposed patch — not pushed here, because it is unrelated to a llama.cpp pin bump and belongs in its own change. The targeted fix is to let the Java extractor skip Kotlin rather than abort, in - uses: github/codeql-action/init@v4
env:
# CodeQL 2.27.0's Kotlin extractor rejects llama-kotlin's Kotlin 2.4.20
# ("kotlin-version-too-new"), which aborts the whole java analysis.
# Skipping Kotlin keeps Java coverage; drop this once the bundled
# extractor supports 2.4.20.
CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN: "true"
with: { languages: java, queries: +security-and-quality }That trades Kotlin coverage (six files in No re-run spent here either, for the same reason as above: a failure that reproduces on the base branch is established as non-transient by that fact, and the rules reserve the re-run for confirming the opposite. Generated by Claude Code |



Summary
Bumps the pinned llama.cpp version from
b10902tob10903across all four pin sites, and appends the upgrade range to the breaking-changes history.Upstream is one commit, two Vulkan GLSL shaders, 3 KiB — #28705, "vulkan: fix data race and OOB access in argsort(large)". It fixes two defects in the Vulkan bitonic argsort:
value.yat 0 for a padded column instead of readingdata_a[row_offset + col]pastp.ncols(both shaders).ixj > colguard. Previously both threads of each pair ran the read-modify-write ondst_row[idx_0]/dst_row[idx_1]and only the final store was guarded, so the partner thread read those slots concurrently with its own unsynchronised write.The review surface is empty, not merely small. No C++, no header, no build-system file, no Python pin changed. Zero files under
common/,include/,tools/server/ortools/mtmd/, so every row of the API-compatibility table inCLAUDE.mdis vacuously satisfied and the three mechanicaltools/server/contract greps (request-field set,set_hard_limitsbounds, emitted response keys) have no input to compare. Second bump running with that property. Well under the 100 KiB chunking threshold, so no chunking question arises.Where it does land:
glslccompiles GLSL underggml/src/ggml-vulkan/vulkan-shaders/at build time and embeds it, so the change reaches exactly the three Vulkan classifier artifacts —vulkan-linux-x86-64,vulkan-linux-aarch64,vulkan-windows-x86-64. All three are build-only jobs on GPU-less runners, so CI proves the shaders still compile, not that the race is fixed; that needs real Vulkan hardware, which no job here has. The default JAR and every non-Vulkan classifier are unaffected by this range.Patches: all nine apply untouched, and the intersection with
patches/is empty by inspection — the two changed files are Vulkan shaders, which no patch in this repo touches. The three standing drop-checks were run against the pristine tag anyway rather than waved through on that basis: the fail-loud applier detects "does not apply" but never "upstream already fixed this", and a drop-check firing is a reason to delete a patch, which no amount of "the diff is small" substitutes for.0001common_params_parse_mainincommon/arg.h#ifdef _WIN32count-guardedargv = utf8.ptrs.data()override is still atcommon/arg.cpp:1282→ still required0010{"vocab_type", meta.model_vocab_type}inserver-context.cppserver-context.cpp:4554→ still required0012split_sumguard insrc/llama-model.cppsplits[i] /= split_sum;atllama-model.cpp:1491, no zero-sum guard → still requiredAll three line numbers are identical to b10902, which is what a byte-unchanged file looks like.
Test plan
test_model_split.cppfor0012,test_utils.cpp'sContentOnlyParseUtf8for0011,NativeLibraryLoadSmokeTestfor the version-constant ↔ linked-binary pin).Verified locally on Linux x86_64 from a fresh configure (build directory removed first, so the patch applier took its clean-tree path and wrote a fresh stamp):
481c65f091f74c5e7089dd0a3a1cc6b50cced31e(=b10903) plus all nine patch SHA-256s; no "does not apply cleanly" abort.cmake --build --config Release, zero errors.ctest: 537/537 passing, matching the documented total.OAI_LAYERreader sweep re-run against b10903's sources.nm -D libjllama.so: 40Java_*exports, 0 C++-mangled ones.NativeLibraryLoadSmokeTest— 4/4, 0 skipped, run with acleanfirst sonativeBuildInfoMatchesPinnedVersionConstantactually compared the rebuilt binary'sb10903-481c65f0against the new constant rather than a stale class (javac inlinesLLAMA_CPP_VERSIONand Maven's incremental compile cannot see that dependency).mvn test: 1755 run, 0 failures, 0 errors (269 skipped — the model-gated classes; no GGUF in this sandbox).spotless:checkclean (243 files);javadoc:jarBUILD SUCCESS.Related issues
None.
Checklist
mvn spotless:applyrun for Java changes) — no.javaformatting changes; the one Java file touched is a constant plus javadoc.README.mdbadge/link,CLAUDE.mdpinned-version line (plus three incidental version mentions: the WebUI local-build recipe, the sccache section, the FetchContent source-tree section), and a newb10902–b10903pair of rows indocs/history/llama-cpp-breaking-changes.md(one for the upstream change, one recording the patch + drop-check verification).Files changed (5)
llama/CMakeLists.txtGIT_TAG b10902→b10903llama/src/main/java/net/ladenthin/llama/value/LlamaCppVersion.javaLLAMA_CPP_VERSIONconstant + 3 javadoc mentionsREADME.mdCLAUDE.mddocs/history/llama-cpp-breaking-changes.mdCHANGELOG.mdis deliberately untouched: it does not record llama.cpp pin bumps (b10902 does not appear in it either).🤖 Generated with Claude Code
https://claude.ai/code/session_01AnNYn8W1xuVxVJtyL34GyH
Generated by Claude Code