mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #2934] [Bug]: Long sessions: parking evicts every conversation and still refuses (freed memory stays in glibc's heap) #1182
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#1182
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @alfre2v on GitHub (Oct 17, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2934
What happened
After a server has been busy for a while, an agent's main conversation gets read again from scratch after a subagent switch, although parking is on and the budget isn't full. On my box, a 214K-token conversation took 90 s to re-read instead of 11 s. A freshly started server doesn't show it; it appears once many conversations have been parked and evicted.
The engine log shows it like this:
evicted 3, 0 still parked: the RAM check threw away every parked conversation and still refused. A milder form appears too:evicted 3 parked conversations to admit this snapshot, where 1 would have been enough. Another conversation then loses its context for nothing.Cause:
std::vectorsegments (conversation_buffer.hpp);MemAvailable, so evicting a conversation never shows up as free RAM.The comments at
generate.cpp:8322-8324andconversation_cache.hpp:279-281(v0.1.44.1) assume the opposite.Fix: proposed in #2253 (
malloc_trimin the RAM check). Independent test results on this box are in my comment on #2253: it fixes the gate in all three runs, with no prefill cost on short prompts.Workaround until a fix is released: add one line to the
envblock of your run config (strata-<model>.json; the server passes it to the engine), then restart the server:enventries.To reproduce: start the server with parking on (here
--conversation-cache-mib 8192 --conversation-cache-slots 4 --conversation-cache-min-free-mib 3072). Send fresh prompts that park and evict several large conversations (here 32K-250K tokens), then run an agent session where a main conversation grows past about 190K tokens while alternating with subagents. The refusal comes at the main conversation's park. It reproduced on every unpatched run of that sequence.Strata version, GPU, OS
0.1.44.1 (
296b59d, engine built locally with CUDA 13.0) · RTX 3090 24GB, Ryzen 9 3900X, 64 GB RAM · Ubuntu 22.04 (glibc 2.35) · Qwen3.8-Flash-Next IQ3_S,--max-context 262144 --kv int8 --kv-growEngine log
The relevant lines are above. The full test data (ladder, soak and engine logs for unpatched, the workaround and #2253) is summarised in my comment on #2253.
@Niko1221 commented on GitHub (Oct 19, 2026):
Thanks for taking the time to report this.
We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.
@alfre2v commented on GitHub (Oct 19, 2026):
Understood @Niko1221
Thanks for your awesome work!