[Engine] 0.2.24: `strata --help` segfaults — unescaped `%` in the `--deterministic` help text

Open Beginner friendly
#7,754 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 4 days

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
86/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
cpp
Domain
cli

Research direction

Read the help fprintf format string in engine/src/program/generate.cpp around line 1409 and compare it with the matching sentence around line 3911. Run strata --help from a source build to reproduce the crash. Done when the help prints fully without a segfault.

Written by the indexing model from the issue text.

Description

What happens

A source build of v0.2.24 (tag 70ac2f246, Linux, CUDA 13, -DCMAKE_CUDA_ARCHITECTURES=120 -DSTRATA_OWN_CPU_QUANT=ON) prints the help
up to the --deterministic entry and then crashes:

$ ./build/strata --help
...
  --deterministic      (or STRATA_DETERMINISTIC=1; off by default) the same prompt and settings give the
                       same answer on every run: every missed expert is computed on the GPU (--pcie-frac 1
                       when you give none) and the prompt does not use CPU exper
Segmentation fault

gdb: SIGSEGV in libc, called from fprintf in main.

Cause

engine/src/program/generate.cpp:1409 (inside the help fprintf format string):

"                       (STRATA_PREFILL_CPU_SHARE=0). Decode about 3% slower with the model mostly cached\n"

% s is a valid conversion (space flag + %s), so fprintf reads a string argument that was never passed.
The same sentence at line 3911 is already written 3%%. Still present on main as of 2026-12-02 (one commit past the tag).

Fix: 3% → 3%% on line 1409.

Impact: anything that runs strata --help as a sanity check of a fresh build fails, e.g. a third-party
updater that refuses to install a binary whose --help crashes. Serving itself is unaffected.

Dominant language
C++
Stars
11.6k
Forks
1k
Avg merge
6d 2h
Merged PRs (30d)
21

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 Niko1221/Strata

All issues in Niko1221/Strata

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.