[GH-ISSUE #1648] Fail to use strata on opencode due to long prompt. #664

Closed
opened 2026-11-04 01:44:54 +07:00 by bsakaguchi · 9 comments
Owner

Originally created by @RNGMARTIN on GitHub (Oct 9, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1648

I can use smoothly in the web page of strataA(details are in the picture) . However, after connecting to opencode, due to opencode's own build and plan model, which has its own long prompt, the log of strata shows the engine stopped unexpectedly after 60 seconds ... and restart itself, cannot work in opencode. what's the problem?
Image

Originally created by @RNGMARTIN on GitHub (Oct 9, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/1648 I can use smoothly in the web page of strataA(details are in the picture) . However, after connecting to opencode, due to opencode's own **_build_** and **_plan_** model, which has its own long prompt, the log of strata shows **the engine stopped unexpectedly after 60 seconds ...** and restart itself, cannot work in opencode. what's the problem? <img width="874" height="491" alt="Image" src="https://github.com/user-attachments/assets/0a2c8e04-ed5d-4070-828c-22a8be34850f" />
Author
Owner

@Coderx7 commented on GitHub (Oct 9, 2026):

I thought it was only me! the strata webui is blazingly fast but the opencode wouldnt work!

<!-- gh-comment-id:6073755104 --> @Coderx7 commented on GitHub (Oct 9, 2026): I thought it was only me! the strata webui is blazingly fast but the opencode wouldnt work!
Author
Owner

@VenimK commented on GitHub (Oct 9, 2026):

I can use smoothly in the web page of strataA(details are in the picture) . However, after connecting to opencode, due to opencode's own build and plan model, which has its own long prompt, the log of strata shows the engine stopped unexpectedly after 60 seconds ... and restart itself, cannot work in opencode. what's the problem? Image

OpenCode 1.18.35 only reads a provider block (npm, options).

"provider": {
"yourmodelid": {
"name": "your model name",
"npm": "@ai-sdk/openai-compatible",
"options": {
"baseURL": "youbaseurl",
"apiKey": "yourapikey"
},
"models": {
"qwen3.8-flash-next-iq2_xs": {
"name": "Qwen3.8 Flash Next IQ2_XS",
"attachment": true,
"tool_call": true,
"modalities": {
"input": ["text", "image"],
"output": ["text"]
},
"limit": {
"context": 262144,
"input": 262144,
"output": 65536
}
}
}
}
},

<!-- gh-comment-id:6074002999 --> @VenimK commented on GitHub (Oct 9, 2026): > I can use smoothly in the web page of strataA(details are in the picture) . However, after connecting to opencode, due to opencode's own **_build_** and **_plan_** model, which has its own long prompt, the log of strata shows **the engine stopped unexpectedly after 60 seconds ...** and restart itself, cannot work in opencode. what's the problem? <img alt="Image" width="874" height="491" src="https://private-user-images.githubusercontent.com/176381405/669306299-0a2c8e04-ed5d-4070-828c-22a8be34850f.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3OTE1MTg0OTUsIm5iZiI6MTc5MTUxODE5NSwicGF0aCI6Ii8xNzYzODE0MDUvNjY5MzA2Mjk5LTBhMmM4ZTA0LWVkNWQtNDA3MC04MjhjLTIyYThiZTM0ODUwZi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYxMDA5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MTAwOVQwMzU2MzVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT03NDE5YjU3YmI2Y2ExMzMwNmNiNDI2NjU3ODljMjNmNDNhYTY2MGUyMzEzMGQ2Yzc0NjFlZTMyNzEwYjI4YTc2JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.lgltRJwfsu3LPM60gSboaCYm_dim_HkXdx2vPkAvKDg"> OpenCode 1.18.35 only reads a provider block (npm, options). "provider": { "yourmodelid": { "name": "your model name", "npm": "@ai-sdk/openai-compatible", "options": { "baseURL": "youbaseurl", "apiKey": "yourapikey" }, "models": { "qwen3.8-flash-next-iq2_xs": { "name": "Qwen3.8 Flash Next IQ2_XS", "attachment": true, "tool_call": true, "modalities": { "input": ["text", "image"], "output": ["text"] }, "limit": { "context": 262144, "input": 262144, "output": 65536 } } } } },
Author
Owner

@RNGMARTIN commented on GitHub (Oct 9, 2026):

  1. I thought it was only me! the strata webui is blazingly fast but the opencode wouldnt work!

exactly. I dont know why.

<!-- gh-comment-id:6075144738 --> @RNGMARTIN commented on GitHub (Oct 9, 2026): > 1. I thought it was only me! the strata webui is blazingly fast but the opencode wouldnt work! exactly. I dont know why.
Author
Owner

@RNGMARTIN commented on GitHub (Oct 9, 2026):

2. > 我可以在StrataA的网页上顺利使用(详情见图)。然而,连接Opencode后,由于Opencode自身的**构建与计划模型,带有自己的长提示,Strata日志显示引擎在60秒后意外停止......**并自行重启,无法在OpenCode中工作。出了什么问题?图片

OpenCode 1.18.35 只读取提供者块(npm,options )。
“provider”: { “yourmodelid”: { “name”: “your model name”, “npm”: “@ai-sdk/openai-compatible”, “options”: { “baseURL”: “youbaseurl”, “apiKey”: “yourapikey” }, “models”: { “qwen3.8-flash-next-iq2_xs”: { “name”: “Qwen3.8 Flash Next IQ2_XS”, “attachment”: true, “tool_call”: true, “modalities”: { “input”: [“text”, “image”], “output”: [“text”] }, “limit”: { “context”: 262144, “input”: 262144, “output”: 65536 } },

my opencode version is 2.0.26

<!-- gh-comment-id:6075177294 --> @RNGMARTIN commented on GitHub (Oct 9, 2026): > 2\. > 我可以在StrataA的网页上顺利使用(详情见图)。然而,连接Opencode后,由于Opencode自身的**_构建_**与**_计划_**模型,带有自己的长提示,Strata日志显示**引擎在60秒后意外停止......**并自行重启,无法在OpenCode中工作。出了什么问题?<img alt="图片" width="874" height="491" src="https://private-user-images.githubusercontent.com/176381405/669306299-0a2c8e04-ed5d-4070-828c-22a8be34850f.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3OTE1MTg0OTUsIm5iZiI6MTc5MTUxODE5NSwicGF0aCI6Ii8xNzYzODE0MDUvNjY5MzA2Mjk5LTBhMmM4ZTA0LWVkNWQtNDA3MC04MjhjLTIyYThiZTM0ODUwZi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYxMDA5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MTAwOVQwMzU2MzVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT03NDE5YjU3YmI2Y2ExMzMwNmNiNDI2NjU3ODljMjNmNDNhYTY2MGUyMzEzMGQ2Yzc0NjFlZTMyNzEwYjI4YTc2JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.lgltRJwfsu3LPM60gSboaCYm_dim_HkXdx2vPkAvKDg"> > > > OpenCode 1.18.35 只读取提供者块(npm,options )。 > “provider”: { “yourmodelid”: { “name”: “your model name”, “npm”: “@ai-sdk/openai-compatible”, “options”: { “baseURL”: “youbaseurl”, “apiKey”: “yourapikey” }, “models”: { “qwen3.8-flash-next-iq2_xs”: { “name”: “Qwen3.8 Flash Next IQ2_XS”, “attachment”: true, “tool_call”: true, “modalities”: { “input”: [“text”, “image”], “output”: [“text”] }, “limit”: { “context”: 262144, “input”: 262144, “output”: 65536 } }, my opencode version is 2.0.26
Author
Owner

@Coderx7 commented on GitHub (Oct 9, 2026):

  1. I thought it was only me! the strata webui is blazingly fast but the opencode wouldnt work!

exactly. I dont know why.

I also was on the latest opencode, after a few try when I noticed its not working, I ditched it completely and went straight ahead to deepseek harness. its working amazingly well.

<!-- gh-comment-id:6079632213 --> @Coderx7 commented on GitHub (Oct 9, 2026): > > 1. I thought it was only me! the strata webui is blazingly fast but the opencode wouldnt work! > > exactly. I dont know why. I also was on the latest opencode, after a few try when I noticed its not working, I ditched it completely and went straight ahead to deepseek harness. its working amazingly well.
Author
Owner

@Niko1221 commented on GitHub (Oct 10, 2026):

Thanks all. From the log screenshot alone we cannot tell why the engine stops, so we need a few facts. "The engine stopped unexpectedly" means the engine process ended during the request, and the number in brackets (exit code) says how. -9 or 137 means the system killed it for lack of memory; a crash gives another code. The server then starts it again by itself, which looks like a restart loop.

Could one of you who sees this (RNGMARTIN, since you opened the issue) post:

  1. The full text of the line the engine stopped unexpectedly (exit code ...) and the 30 lines of the server window before it.
  2. Strata version, OS, GPU and VRAM, total RAM, and the model and size you set up (the config shows IQ2_XS; is that the file you run?).
  3. The flags or config (strata.json or the command line), especially the context size and --prefill.
  4. The free RAM while it happens (Task Manager / free -h), and on Linux sudo dmesg | grep -i -E 'killed process|out of memory'.
  5. Whether a long prompt from the web page (about the size of OpenCode's, 10-20K tokens) works. If the web page also fails with a prompt that long, the cause is the prompt size and not OpenCode.
  6. If the engine does not die but the client gives up: OpenCode may disconnect after a timeout while the first long prompt is still being read. The server window shows reading the prompt: N of M tokens while it works; please include those lines too.

For reference, Strata's server works with other clients that send long prompts, so this looks specific to a setup or to memory, and the data above should show which.

<!-- gh-comment-id:6099657962 --> @Niko1221 commented on GitHub (Oct 10, 2026): Thanks all. From the log screenshot alone we cannot tell why the engine stops, so we need a few facts. "The engine stopped unexpectedly" means the engine process ended during the request, and the number in brackets (exit code) says how. -9 or 137 means the system killed it for lack of memory; a crash gives another code. The server then starts it again by itself, which looks like a restart loop. Could one of you who sees this (RNGMARTIN, since you opened the issue) post: 1. The full text of the line `the engine stopped unexpectedly (exit code ...)` and the 30 lines of the server window before it. 2. Strata version, OS, GPU and VRAM, total RAM, and the model and size you set up (the config shows IQ2_XS; is that the file you run?). 3. The flags or config (`strata.json` or the command line), especially the context size and --prefill. 4. The free RAM while it happens (Task Manager / `free -h`), and on Linux `sudo dmesg | grep -i -E 'killed process|out of memory'`. 5. Whether a long prompt from the web page (about the size of OpenCode's, 10-20K tokens) works. If the web page also fails with a prompt that long, the cause is the prompt size and not OpenCode. 6. If the engine does not die but the client gives up: OpenCode may disconnect after a timeout while the first long prompt is still being read. The server window shows `reading the prompt: N of M tokens` while it works; please include those lines too. For reference, Strata's server works with other clients that send long prompts, so this looks specific to a setup or to memory, and the data above should show which.
Author
Owner

@RNGMARTIN commented on GitHub (Oct 12, 2026):

Thanks all. From the log screenshot alone we cannot tell why the engine stops, so we need a few facts. "The engine stopped unexpectedly" means the engine process ended during the request, and the number in brackets (exit code) says how. -9 or 137 means the system killed it for lack of memory; a crash gives another code. The server then starts it again by itself, which looks like a restart loop.

Could one of you who sees this (RNGMARTIN, since you opened the issue) post:

  1. The full text of the line the engine stopped unexpectedly (exit code ...) and the 30 lines of the server window before it.
  2. Strata version, OS, GPU and VRAM, total RAM, and the model and size you set up (the config shows IQ2_XS; is that the file you run?).
  3. The flags or config (strata.json or the command line), especially the context size and --prefill.
  4. The free RAM while it happens (Task Manager / free -h), and on Linux sudo dmesg | grep -i -E 'killed process|out of memory'.
  5. Whether a long prompt from the web page (about the size of OpenCode's, 10-20K tokens) works. If the web page also fails with a prompt that long, the cause is the prompt size and not OpenCode.
  6. If the engine does not die but the client gives up: OpenCode may disconnect after a timeout while the first long prompt is still being read. The server window shows reading the prompt: N of M tokens while it works; please include those lines too.

For reference, Strata's server works with other clients that send long prompts, so this looks specific to a setup or to memory, and the data above should show which.
@Niko1221
Re: "The engine stopped unexpectedly" - OpenCode client
Date: 2026-10-12
User: RNGMARTIN

The problem was reproduced today (2026-10-12, 09:22 local time) with engine 0.1.40.3.
A normal request sent through OpenCode hung with no output; the engine then stopped
and the server brought a new engine up (visible in the server window as a restart).
Below are the requested facts.

====================================================================

  1. The full text of the line and the 30 lines of the server window
    before "the engine stopped unexpectedly (exit code ...)"
    ====================================================================

The line the client saw corresponds to this in the server log (strata-iq2_xs.log):

strata serve: no progress for 60 s during a request (reading the prompt
(batched): layer 1 of the prompt chunk from token 0) - stopping the engine
so the server starts it again (issue #29)

The 30 lines immediately before it (abridged only where marked):

strata serve: 1179 MiB of VRAM free with everything loaded
strata verify: capturing the 6-token window (1179 MiB of VRAM free)
strata verify: captured the 6-token window (upload no error, sync no error)
strata verify: capturing the 4-token window (1163 MiB of VRAM free)
strata verify: captured the 4-token window (upload no error, sync no error)
strata verify: capturing the 1-token window (1147 MiB of VRAM free)
strata verify: captured the 1-token window (upload no error, sync no error)
strata verify: capturing the 2-token window (1129 MiB of VRAM free)
strata verify: captured the 2-token window (upload no error, sync no error)
strata verify: capturing the 3-token window (1113 MiB of VRAM free)
strata verify: captured the 3-token window (upload no error, sync no error)
strata serve: prompt 53 tokens = 0 reused + 53 read in 4931 ms (10.7 tok/s),
  72 generated in 6829 ms (10.5 tok/s), drafts accepted 40 of 57, 1 checkpoints
strata serve: decode expert cache hit rate: 93.2% (39703 hits / 42601 lookups);
  1559 more read by the GPU over PCIe or from another GPU (3.5% of all 44160 routed)
strata serve: KV streaming: 98.69% of 29424 block reads hit VRAM, 1.5 MiB read from RAM
strata serve: suffix drafts: 1 windows, 2 of 3 drafts accepted
strata serve: prompt 9357 tokens = 0 reused + 9357 read in 9071 ms (1031.5 tok/s),
  64 generated in 1824 ms (35.1 tok/s), drafts accepted 42 of 48, 1 checkpoints
strata serve: decode expert cache hit rate: 92.4% (30153 hits / 32618 lookups);
  1462 more read by the GPU over PCIe or from another GPU (4.3% of all 34080 routed)
strata serve: KV streaming: 95.25% of 462168 block reads hit VRAM, 88.4 MiB read from RAM
strata serve: suffix drafts: 7 windows, 17 of 21 drafts accepted
strata serve: prompt 588 tokens = 0 reused + 588 read in 16356 ms (35.9 tok/s),
  101 generated in 5795 ms (17.4 tok/s), drafts accepted 55 of 76, 1 checkpoints
strata serve: decode expert cache hit rate: 94.8% (53923 hits / 56902 lookups);
  1658 more read by the GPU over PCIe or from another GPU (2.8% of all 58560 routed)
strata serve: KV streaming: 99.14% of 240996 block reads hit VRAM, 8.3 MiB read from RAM
strata serve: no progress for 60 s during a request (reading the prompt (batched):
  layer 1 of the prompt chunk from token 0) - stopping the engine so the server
  starts it again (issue #29)
strata serve: stall report (engine 0.1.40.3): stage "reading the prompt (batched):
  layer 1 of the prompt chunk from token 0" for 60 s; 0 layers served since the
  last finished step (0 = stopped, more = slow)
  expert pool: epoch 8038, batch epoch 8038: 48 of 48 jobs claimed, 48 done;
    15 of 15 workers parked, 15 sleeping; mode 0
  expert pool threads: w0=sleeping ... w14=sleeping; host idle for 60670 ms
  verify window (last window, not the current stage): 4 tokens at position 684,
    host at layer step 48; the GPU rang 48; flags: served 48, plan (A) 48, copies (B) 48
  memory: 38009 MiB resident, 60047 MiB committed, 5565 MiB RAM available;
    10688578 page faults so far
  2 s later:
  expert pool: epoch 8038, batch epoch 8038: 48 of 48 jobs claimed, 48 done;
    15 of 15 workers parked, 15 sleeping; mode 0
  expert pool threads: w0=sleeping ... w14=sleeping; host idle for 62671 ms
  verify window (last window, not the current stage): 4 tokens at position 684,
    host at layer step 48; the GPU rang 48; flags: served 48, plan (A) 48, copies (B) 48
  memory: 38009 MiB resident, 60047 MiB committed, 5574 MiB RAM available;
    10688582 page faults so far
  wrote the thread stacks to F:\openresource\Strata-main\strata-stall-35772.dmp
    (attach it to the issue)
strata: released the verify window's GPU waits (#267): the GPU finished in 0 ms

Notes:

  • This is a stall (no progress for 60 s), not a crash with an exit code. The engine
    was unresponsive: all 15 expert-pool workers sleeping, host idle for 60 s, in
    "reading the prompt (batched): layer 1 of the prompt chunk from token 0".
  • On earlier days (2026-10-09, 2026-10-10) the Windows Application event log does
    show strata.exe crashes, exception code 0xc0000409 (STATUS_STACK_BUFFER_OVERRUN),
    fault offset 0x4eb1e9 - not an OOM kill (-9/137). Nine stall dump files exist
    (strata-stall-*.dmp); the newest one is from today's reproduction.

====================================================================
2. Strata version, OS, GPU and VRAM, total RAM, model

  • Strata engine: 0.1.40.3 (release build, CUDA 13.0)
  • OS: Windows 11 Home, Chinese edition, 10.0.26200, 64-bit
  • GPU: NVIDIA GeForce RTX 4090 D, 24564 MiB VRAM, driver 610.60
  • CPU: Intel Core Ultra 9 285K (no AVX-512; the log says the expert kernels run on
    AVX-2)
  • Total RAM: 63 GB
  • Model: yes, the running file is IQ2_XS:
    Qwen3.8-Flash-Next-GSQ-RCO-IQ2_XS-00001-of-00002.gguf (36.5 GB) and
    Qwen3.8-Flash-Next-GSQ-RCO-IQ2_XS-00002-of-00002.gguf (26.8 GB), i.e. a 63.3 GB
    model pair, matching the config. An IQ3_XXS pair is also on disk but not used.

====================================================================
3. The command line / config, especially context size and --prefill

Server start (run-iq2_xs.bat):

.venv\Scripts\python.exe serve\server.py --engine strata \
  --config F:\openresource\Strata-main\strata-iq2_xs.json --port 8080 --open

Engine command line exactly as logged by the server:

strata.exe --serve
  --pack F:\openresource\Strata-data\packs\iq2_xs
  --native F:\openresource\Strata-data\models\IQ2_XS\Qwen3.8-Flash-Next-GSQ-RCO-IQ2_XS-00001-of-00002.gguf
  --ple-gguf F:\openresource\Strata-data\models\IQ2_XS\Qwen3.8-Flash-Next-GSQ-RCO-IQ2_XS-00002-of-00002.gguf
  --expert-profile F:\openresource\Strata-main\data\expert-profile.bin
  --expert-cache auto
  --prefill auto
  --spec 4 --spec-min-p 0.5
  --mtp F:\openresource\Strata-data\mtp\rt
  --max-context 131072
  --kv int8 --kv-resident 32768
  --pool-workers 15 --vram-reserve-mib 1500

So: --prefill is "auto" (it chose the batched path, "prompt chunk auto: 8192
tokens"), context size is 131072. The server listens on 0.0.0.0:8080 with an API
key set. One extra detail from the log:
"large pages refused for 35456548864 B (VirtualAlloc error 1314); using 4 KB
pages" - the ~35 GB expert arena runs on 4 KB pages.

====================================================================
4. Free RAM while it happens / OOM check

  • From the engine's own stall report: 38009 MiB resident, 60047 MiB committed,
    5565 MiB RAM available, over 10.6 million page faults so far.
  • System (Task Manager / CIM): 63.4 GB total, free physical memory was
    effectively 0 GB at the time. Working sets: strata.exe 37.2 GB, WSL
    (vmmemWSL) 7.3 GB, PyCharm 2.3 GB, Memory Compression 0.8 GB.
  • This is Windows, so there is no dmesg. The System event log was checked:
    there is no record of the OS killing a process for lack of memory. The engine
    stop is the 60 s stall watchdog (issue #29), not an OOM kill; there is no
    -9/137 exit code involved in today's event.

====================================================================
5. Does a long prompt (about the size of OpenCode's, 10-20K tokens)
work from the web page / API?

Yes, and this is the strange part:

  • 53-token prompt: OK (53 read in 4.9 s, 72 generated in 6.8 s)
  • 9357-token prompt (27,600 characters, built to be of OpenCode scale): OK
    (9357 read in 9.1 s at 1031 tok/s, 64 generated in 1.8 s)
  • 588-token prompt (the OpenCode title request): OK (588 read in 16.4 s)

All of these succeeded back to back. The very next OpenCode request (the actual
conversation prompt, larger than the 588-token one) then froze at "reading the
prompt (batched): layer 1" for 60 s with zero progress and no recovery. So it is
not simply "the prompt is too long" - the failure came after several successful
requests, when free RAM had dropped to ~0 GB.

====================================================================
6. Is the engine dying, or is the client giving up?

The engine side is the problem in today's reproduction: during an in-flight
request the engine made no progress for 60 s (all 15 expert-pool workers
sleeping, host idle 60 s, GPU waits already released). The client (OpenCode)
kept waiting and saw no output; the engine then had to be stopped, which is what
the client reported.

Additional observation from the same log, in case it matters: model loading ran
at 0.15 GiB/s with the hint "~24x below what this hardware streams from a normal
launch" (possible process-priority throttling). This may be related to the stall.

<!-- gh-comment-id:6116165767 --> @RNGMARTIN commented on GitHub (Oct 12, 2026): > Thanks all. From the log screenshot alone we cannot tell why the engine stops, so we need a few facts. "The engine stopped unexpectedly" means the engine process ended during the request, and the number in brackets (exit code) says how. -9 or 137 means the system killed it for lack of memory; a crash gives another code. The server then starts it again by itself, which looks like a restart loop. > > Could one of you who sees this (RNGMARTIN, since you opened the issue) post: > > 1. The full text of the line `the engine stopped unexpectedly (exit code ...)` and the 30 lines of the server window before it. > 2. Strata version, OS, GPU and VRAM, total RAM, and the model and size you set up (the config shows IQ2_XS; is that the file you run?). > 3. The flags or config (`strata.json` or the command line), especially the context size and --prefill. > 4. The free RAM while it happens (Task Manager / `free -h`), and on Linux `sudo dmesg | grep -i -E 'killed process|out of memory'`. > 5. Whether a long prompt from the web page (about the size of OpenCode's, 10-20K tokens) works. If the web page also fails with a prompt that long, the cause is the prompt size and not OpenCode. > 6. If the engine does not die but the client gives up: OpenCode may disconnect after a timeout while the first long prompt is still being read. The server window shows `reading the prompt: N of M tokens` while it works; please include those lines too. > > For reference, Strata's server works with other clients that send long prompts, so this looks specific to a setup or to memory, and the data above should show which. @Niko1221 Re: "The engine stopped unexpectedly" - OpenCode client Date: 2026-10-12 User: RNGMARTIN The problem was reproduced today (2026-10-12, 09:22 local time) with engine 0.1.40.3. A normal request sent through OpenCode hung with no output; the engine then stopped and the server brought a new engine up (visible in the server window as a restart). Below are the requested facts. ==================================================================== 1. The full text of the line and the 30 lines of the server window before "the engine stopped unexpectedly (exit code ...)" ==================================================================== The line the client saw corresponds to this in the server log (strata-iq2_xs.log): strata serve: no progress for 60 s during a request (reading the prompt (batched): layer 1 of the prompt chunk from token 0) - stopping the engine so the server starts it again (issue #29) The 30 lines immediately before it (abridged only where marked): strata serve: 1179 MiB of VRAM free with everything loaded strata verify: capturing the 6-token window (1179 MiB of VRAM free) strata verify: captured the 6-token window (upload no error, sync no error) strata verify: capturing the 4-token window (1163 MiB of VRAM free) strata verify: captured the 4-token window (upload no error, sync no error) strata verify: capturing the 1-token window (1147 MiB of VRAM free) strata verify: captured the 1-token window (upload no error, sync no error) strata verify: capturing the 2-token window (1129 MiB of VRAM free) strata verify: captured the 2-token window (upload no error, sync no error) strata verify: capturing the 3-token window (1113 MiB of VRAM free) strata verify: captured the 3-token window (upload no error, sync no error) strata serve: prompt 53 tokens = 0 reused + 53 read in 4931 ms (10.7 tok/s), 72 generated in 6829 ms (10.5 tok/s), drafts accepted 40 of 57, 1 checkpoints strata serve: decode expert cache hit rate: 93.2% (39703 hits / 42601 lookups); 1559 more read by the GPU over PCIe or from another GPU (3.5% of all 44160 routed) strata serve: KV streaming: 98.69% of 29424 block reads hit VRAM, 1.5 MiB read from RAM strata serve: suffix drafts: 1 windows, 2 of 3 drafts accepted strata serve: prompt 9357 tokens = 0 reused + 9357 read in 9071 ms (1031.5 tok/s), 64 generated in 1824 ms (35.1 tok/s), drafts accepted 42 of 48, 1 checkpoints strata serve: decode expert cache hit rate: 92.4% (30153 hits / 32618 lookups); 1462 more read by the GPU over PCIe or from another GPU (4.3% of all 34080 routed) strata serve: KV streaming: 95.25% of 462168 block reads hit VRAM, 88.4 MiB read from RAM strata serve: suffix drafts: 7 windows, 17 of 21 drafts accepted strata serve: prompt 588 tokens = 0 reused + 588 read in 16356 ms (35.9 tok/s), 101 generated in 5795 ms (17.4 tok/s), drafts accepted 55 of 76, 1 checkpoints strata serve: decode expert cache hit rate: 94.8% (53923 hits / 56902 lookups); 1658 more read by the GPU over PCIe or from another GPU (2.8% of all 58560 routed) strata serve: KV streaming: 99.14% of 240996 block reads hit VRAM, 8.3 MiB read from RAM strata serve: no progress for 60 s during a request (reading the prompt (batched): layer 1 of the prompt chunk from token 0) - stopping the engine so the server starts it again (issue #29) strata serve: stall report (engine 0.1.40.3): stage "reading the prompt (batched): layer 1 of the prompt chunk from token 0" for 60 s; 0 layers served since the last finished step (0 = stopped, more = slow) expert pool: epoch 8038, batch epoch 8038: 48 of 48 jobs claimed, 48 done; 15 of 15 workers parked, 15 sleeping; mode 0 expert pool threads: w0=sleeping ... w14=sleeping; host idle for 60670 ms verify window (last window, not the current stage): 4 tokens at position 684, host at layer step 48; the GPU rang 48; flags: served 48, plan (A) 48, copies (B) 48 memory: 38009 MiB resident, 60047 MiB committed, 5565 MiB RAM available; 10688578 page faults so far 2 s later: expert pool: epoch 8038, batch epoch 8038: 48 of 48 jobs claimed, 48 done; 15 of 15 workers parked, 15 sleeping; mode 0 expert pool threads: w0=sleeping ... w14=sleeping; host idle for 62671 ms verify window (last window, not the current stage): 4 tokens at position 684, host at layer step 48; the GPU rang 48; flags: served 48, plan (A) 48, copies (B) 48 memory: 38009 MiB resident, 60047 MiB committed, 5574 MiB RAM available; 10688582 page faults so far wrote the thread stacks to F:\openresource\Strata-main\strata-stall-35772.dmp (attach it to the issue) strata: released the verify window's GPU waits (#267): the GPU finished in 0 ms Notes: - This is a stall (no progress for 60 s), not a crash with an exit code. The engine was unresponsive: all 15 expert-pool workers sleeping, host idle for 60 s, in "reading the prompt (batched): layer 1 of the prompt chunk from token 0". - On earlier days (2026-10-09, 2026-10-10) the Windows Application event log does show strata.exe crashes, exception code 0xc0000409 (STATUS_STACK_BUFFER_OVERRUN), fault offset 0x4eb1e9 - not an OOM kill (-9/137). Nine stall dump files exist (strata-stall-*.dmp); the newest one is from today's reproduction. ==================================================================== 2. Strata version, OS, GPU and VRAM, total RAM, model ==================================================================== - Strata engine: 0.1.40.3 (release build, CUDA 13.0) - OS: Windows 11 Home, Chinese edition, 10.0.26200, 64-bit - GPU: NVIDIA GeForce RTX 4090 D, 24564 MiB VRAM, driver 610.60 - CPU: Intel Core Ultra 9 285K (no AVX-512; the log says the expert kernels run on AVX-2) - Total RAM: 63 GB - Model: yes, the running file is IQ2_XS: Qwen3.8-Flash-Next-GSQ-RCO-IQ2_XS-00001-of-00002.gguf (36.5 GB) and Qwen3.8-Flash-Next-GSQ-RCO-IQ2_XS-00002-of-00002.gguf (26.8 GB), i.e. a 63.3 GB model pair, matching the config. An IQ3_XXS pair is also on disk but not used. ==================================================================== 3. The command line / config, especially context size and --prefill ==================================================================== Server start (run-iq2_xs.bat): .venv\Scripts\python.exe serve\server.py --engine strata \ --config F:\openresource\Strata-main\strata-iq2_xs.json --port 8080 --open Engine command line exactly as logged by the server: strata.exe --serve --pack F:\openresource\Strata-data\packs\iq2_xs --native F:\openresource\Strata-data\models\IQ2_XS\Qwen3.8-Flash-Next-GSQ-RCO-IQ2_XS-00001-of-00002.gguf --ple-gguf F:\openresource\Strata-data\models\IQ2_XS\Qwen3.8-Flash-Next-GSQ-RCO-IQ2_XS-00002-of-00002.gguf --expert-profile F:\openresource\Strata-main\data\expert-profile.bin --expert-cache auto --prefill auto --spec 4 --spec-min-p 0.5 --mtp F:\openresource\Strata-data\mtp\rt --max-context 131072 --kv int8 --kv-resident 32768 --pool-workers 15 --vram-reserve-mib 1500 So: --prefill is "auto" (it chose the batched path, "prompt chunk auto: 8192 tokens"), context size is 131072. The server listens on 0.0.0.0:8080 with an API key set. One extra detail from the log: "large pages refused for 35456548864 B (VirtualAlloc error 1314); using 4 KB pages" - the ~35 GB expert arena runs on 4 KB pages. ==================================================================== 4. Free RAM while it happens / OOM check ==================================================================== - From the engine's own stall report: 38009 MiB resident, 60047 MiB committed, 5565 MiB RAM available, over 10.6 million page faults so far. - System (Task Manager / CIM): 63.4 GB total, free physical memory was effectively 0 GB at the time. Working sets: strata.exe 37.2 GB, WSL (vmmemWSL) 7.3 GB, PyCharm 2.3 GB, Memory Compression 0.8 GB. - This is Windows, so there is no dmesg. The System event log was checked: there is no record of the OS killing a process for lack of memory. The engine stop is the 60 s stall watchdog (issue #29), not an OOM kill; there is no -9/137 exit code involved in today's event. ==================================================================== 5. Does a long prompt (about the size of OpenCode's, 10-20K tokens) work from the web page / API? ==================================================================== Yes, and this is the strange part: - 53-token prompt: OK (53 read in 4.9 s, 72 generated in 6.8 s) - 9357-token prompt (27,600 characters, built to be of OpenCode scale): OK (9357 read in 9.1 s at 1031 tok/s, 64 generated in 1.8 s) - 588-token prompt (the OpenCode title request): OK (588 read in 16.4 s) All of these succeeded back to back. The very next OpenCode request (the actual conversation prompt, larger than the 588-token one) then froze at "reading the prompt (batched): layer 1" for 60 s with zero progress and no recovery. So it is not simply "the prompt is too long" - the failure came after several successful requests, when free RAM had dropped to ~0 GB. ==================================================================== 6. Is the engine dying, or is the client giving up? ==================================================================== The engine side is the problem in today's reproduction: during an in-flight request the engine made no progress for 60 s (all 15 expert-pool workers sleeping, host idle 60 s, GPU waits already released). The client (OpenCode) kept waiting and saw no output; the engine then had to be stopped, which is what the client reported. Additional observation from the same log, in case it matters: model loading ran at 0.15 GiB/s with the hint "~24x below what this hardware streams from a normal launch" (possible process-priority throttling). This may be related to the stall.
Author
Owner

@RNGMARTIN commented on GitHub (Oct 12, 2026):

@Niko1221 I request in opencode, it automatically start two requests: one is named the title of this request while the other is the actual request. From the log, the title of this request is successfully named(the 588 prompt one). After this, the strata start the process of the actual request(the 8431 prompt one),and after 120s have this problem and restart itself. The basic information and test result is above. Hope to resolve the problem. Thanks a lot.

<!-- gh-comment-id:6116237021 --> @RNGMARTIN commented on GitHub (Oct 12, 2026): @Niko1221 I request in opencode, it automatically start two requests: one is named the title of this request while the other is the actual request. From the log, the title of this request is successfully named(the 588 prompt one). After this, the strata start the process of the actual request(the 8431 prompt one),and after 120s have this problem and restart itself. The basic information and test result is above. Hope to resolve the problem. Thanks a lot.
Author
Owner

@Niko1221 commented on GitHub (Oct 13, 2026):

Thanks for the report. To keep the tracker current we are closing issues older than three days: 0.1.44 is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1.

If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.

<!-- gh-comment-id:6156173067 --> @Niko1221 commented on GitHub (Oct 13, 2026): Thanks for the report. To keep the tracker current we are closing issues older than three days: [0.1.44](https://github.com/Niko1221/Strata/releases/tag/v0.1.44) is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1. If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.
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#664
No description provided.