[GH-ISSUE #5188] [Engine] --prefill-head-alias on an 8 GB card: the second request fails with "the output head was reloaded at another address" and the engine exits #3088

Open
opened 2026-11-07 14:37:58 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @acmebiella-spec on GitHub (Nov 4, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5188

Area

[Engine] (speed, kernels, models, the server and API)

Desktop app, Terminal or source?

Terminal (the strata command)

What happened

With --prefill-head-alias on an RTX 4060 8 GB, the engine starts and answers the launcher's own first request (53 tokens). The next request fails with HTTP 400:

{"error": {"type": "invalid_request_error", "message": "--prefill-head-alias: the output head was reloaded at another address, so the captured verify graphs would read freed memory"}}

In the start where I sent one more request, that one got:

{"error": {"type": "server_error", "message": "the engine stopped unexpectedly (exit code 1); the next request restarts it"}}

and the server log said:

[strata] the engine stopped unexpectedly (exit code 1). The engine exited (code 1) after it reported: --prefill-head-alias: the output head was reloaded at another address, so the captured verify graphs would read freed memory - please report it at github.com/Niko1221/Strata/issues with the log

It happened in 3 of 3 starts, each time at the second request. Both requests were short: the launcher's check (53 tokens), then a one-line chat message.

Expected: the request is answered. The flag is described for 8 GB cards in docs/PREFILL_HEAD_ALIAS.md, which lists a moved head as an open question ("We never saw this happen").

A larger reserve did not help. The first start warned "only 119 MiB of VRAM free at the start of this request ... Add --vram-reserve-mib 1152". With --vram-reserve-mib 1152, 971 MiB were free after loading and 583 MiB when the 1-token window was captured, and the second request failed the same way.

Related: #2724 reported this safety stop on an RTX 5080 16 GB with 0.1.44.1, together with a prefill slowdown. It was closed in the 0.2.0-beta tracker reset, and its title has no area prefix, so I opened this one for the current release. #4098 is the same flag with a different error: there the head upload runs out of memory. Here the head is restored ("output head restored in 143.4 ms before decode") but at another address.

Smallest steps or command that reproduce it

My preset's command as the launcher prints it ("same as"), plus the settings of these starts:

strata launch --model iq3_s --context 128k --vision cpu --tune skip --access lan --port 8080 \
  --set STRATA_PREFILL_CPU_SHARE=auto --drafting mtp --set prefill-head-alias=on --set short-read=0 \
  --yes --no-tui

The launcher's own check request is answered. Then any short chat request fails, for example (API key header left out):

curl -s http://127.0.0.1:8080/v1/chat/completions -H 'Content-Type: application/json' \
  -d '{"model":"strata","messages":[{"role":"user","content":"Ciao! Presentati in tre frasi."}],"max_tokens":64,"temperature":0}'

Third start: the same, plus --set vram-reserve-mib=1152.

Not tested: other cards, a start without STRATA_PREFILL_CPU_SHARE=auto, long prompts (the failure came before any).

Reproduction status

Reproduced locally

Strata version

strata 0.2.10 (build 0.1.56), engine 0.1.56-linux-x86_64-cuda-cuda13

Graphics card, memory and system

RTX 4060 8 GB (PCIe 3.0 x8, driver 595.91 server open) · 39 GiB RAM, 2x Xeon E5-2620 v3 · Ubuntu 26.04.1, kernel 7.0.0-42, iommu=pt

Model, size and settings

Qwen3.8-Flash-Next IQ3_S, 128K context, pictures on (CPU reader), MTP drafter, experts via mmap (the low-RAM mode setup picked)

Logs

First start (default reserve, 700 MiB):

strata generate: --prefill-head-alias: the 521472000-byte output head is prompt workspace
strata generate: expert cache 707 slots, 1.37 GiB of VRAM; policy is
strata serve: prompt chunk auto: 1536 tokens, a 8-slot ring
strata serve: prompt chunk head alias: 2048 tokens with 1397 MiB borrowed and 959 MiB free
strata serve: 661 MiB of VRAM free with everything loaded
strata serve: --prefill-head-alias: output head restored in 143.4 ms before decode
strata verify: capturing the 1-token window (133 MiB of VRAM free)
strata serve: WARNING: only 119 MiB of VRAM free at the start of this request (below 512 MiB): ... Add --vram-reserve-mib 1152 to the config's args, ...
strata serve: --prefill-head-alias: prompt workspace rebuilt in 55.5 ms
[strata] the engine reported an error: --prefill-head-alias: the output head was reloaded at another address, so the captured verify graphs would read freed memory
[strata] 400 invalid request: --prefill-head-alias: the output head was reloaded at another address, so the captured verify graphs would read freed memory

Third start (--vram-reserve-mib 1152):

strata generate: expert cache 503 slots, 0.98 GiB of VRAM; policy is
strata serve: prompt chunk head alias: 2048 tokens with 997 MiB borrowed and 1409 MiB free
strata serve: 971 MiB of VRAM free with everything loaded
strata serve: --prefill-head-alias: output head restored in 123.1 ms before decode
strata verify: capturing the 1-token window (583 MiB of VRAM free)
strata serve: --prefill-head-alias: prompt workspace rebuilt in 54.8 ms
[strata] the engine reported an error: --prefill-head-alias: the output head was reloaded at another address, so the captured verify graphs would read freed memory
[strata] 400 invalid request: --prefill-head-alias: the output head was reloaded at another address, so the captured verify graphs would read freed memory

Prepared with an AI assistant (Claude Code). The runs and log lines are real.

Originally created by @acmebiella-spec on GitHub (Nov 4, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/5188 ### Area [Engine] (speed, kernels, models, the server and API) ### Desktop app, Terminal or source? Terminal (the `strata` command) ### What happened With `--prefill-head-alias` on an RTX 4060 8 GB, the engine starts and answers the launcher's own first request (53 tokens). The next request fails with HTTP 400: ```json {"error": {"type": "invalid_request_error", "message": "--prefill-head-alias: the output head was reloaded at another address, so the captured verify graphs would read freed memory"}} ``` In the start where I sent one more request, that one got: ```json {"error": {"type": "server_error", "message": "the engine stopped unexpectedly (exit code 1); the next request restarts it"}} ``` and the server log said: ```text [strata] the engine stopped unexpectedly (exit code 1). The engine exited (code 1) after it reported: --prefill-head-alias: the output head was reloaded at another address, so the captured verify graphs would read freed memory - please report it at github.com/Niko1221/Strata/issues with the log ``` It happened in 3 of 3 starts, each time at the second request. Both requests were short: the launcher's check (53 tokens), then a one-line chat message. Expected: the request is answered. The flag is described for 8 GB cards in docs/PREFILL_HEAD_ALIAS.md, which lists a moved head as an open question ("We never saw this happen"). A larger reserve did not help. The first start warned "only 119 MiB of VRAM free at the start of this request ... Add --vram-reserve-mib 1152". With `--vram-reserve-mib 1152`, 971 MiB were free after loading and 583 MiB when the 1-token window was captured, and the second request failed the same way. Related: #2724 reported this safety stop on an RTX 5080 16 GB with 0.1.44.1, together with a prefill slowdown. It was closed in the 0.2.0-beta tracker reset, and its title has no area prefix, so I opened this one for the current release. #4098 is the same flag with a different error: there the head upload runs out of memory. Here the head is restored ("output head restored in 143.4 ms before decode") but at another address. ### Smallest steps or command that reproduce it My preset's command as the launcher prints it ("same as"), plus the settings of these starts: ```bash strata launch --model iq3_s --context 128k --vision cpu --tune skip --access lan --port 8080 \ --set STRATA_PREFILL_CPU_SHARE=auto --drafting mtp --set prefill-head-alias=on --set short-read=0 \ --yes --no-tui ``` The launcher's own check request is answered. Then any short chat request fails, for example (API key header left out): ```bash curl -s http://127.0.0.1:8080/v1/chat/completions -H 'Content-Type: application/json' \ -d '{"model":"strata","messages":[{"role":"user","content":"Ciao! Presentati in tre frasi."}],"max_tokens":64,"temperature":0}' ``` Third start: the same, plus `--set vram-reserve-mib=1152`. Not tested: other cards, a start without `STRATA_PREFILL_CPU_SHARE=auto`, long prompts (the failure came before any). ### Reproduction status Reproduced locally ### Strata version strata 0.2.10 (build 0.1.56), engine `0.1.56-linux-x86_64-cuda-cuda13` ### Graphics card, memory and system RTX 4060 8 GB (PCIe 3.0 x8, driver 595.91 server open) · 39 GiB RAM, 2x Xeon E5-2620 v3 · Ubuntu 26.04.1, kernel 7.0.0-42, `iommu=pt` ### Model, size and settings Qwen3.8-Flash-Next IQ3_S, 128K context, pictures on (CPU reader), MTP drafter, experts via mmap (the low-RAM mode setup picked) ### Logs First start (default reserve, 700 MiB): ```text strata generate: --prefill-head-alias: the 521472000-byte output head is prompt workspace strata generate: expert cache 707 slots, 1.37 GiB of VRAM; policy is strata serve: prompt chunk auto: 1536 tokens, a 8-slot ring strata serve: prompt chunk head alias: 2048 tokens with 1397 MiB borrowed and 959 MiB free strata serve: 661 MiB of VRAM free with everything loaded strata serve: --prefill-head-alias: output head restored in 143.4 ms before decode strata verify: capturing the 1-token window (133 MiB of VRAM free) strata serve: WARNING: only 119 MiB of VRAM free at the start of this request (below 512 MiB): ... Add --vram-reserve-mib 1152 to the config's args, ... strata serve: --prefill-head-alias: prompt workspace rebuilt in 55.5 ms [strata] the engine reported an error: --prefill-head-alias: the output head was reloaded at another address, so the captured verify graphs would read freed memory [strata] 400 invalid request: --prefill-head-alias: the output head was reloaded at another address, so the captured verify graphs would read freed memory ``` Third start (`--vram-reserve-mib 1152`): ```text strata generate: expert cache 503 slots, 0.98 GiB of VRAM; policy is strata serve: prompt chunk head alias: 2048 tokens with 997 MiB borrowed and 1409 MiB free strata serve: 971 MiB of VRAM free with everything loaded strata serve: --prefill-head-alias: output head restored in 123.1 ms before decode strata verify: capturing the 1-token window (583 MiB of VRAM free) strata serve: --prefill-head-alias: prompt workspace rebuilt in 54.8 ms [strata] the engine reported an error: --prefill-head-alias: the output head was reloaded at another address, so the captured verify graphs would read freed memory [strata] 400 invalid request: --prefill-head-alias: the output head was reloaded at another address, so the captured verify graphs would read freed memory ``` Prepared with an AI assistant (Claude Code). The runs and log lines are real.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#3088
No description provided.