[GH-ISSUE #161] Crash: Strata v0.1.25: short request succeeds, batched prefill exits with cuBLAS status 13 on RTX 5090M Laptop / Linux LXC #87

Closed
opened 2026-11-04 01:39:45 +07:00 by bsakaguchi · 4 comments
Owner

Originally created by @leonbollerup on GitHub (Sep 29, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/161

Strata v0.1.25: short request succeeds, batched prefill exits with cuBLAS status 13 on RTX 5090 Laptop / Linux LXC

Summary

Latest release and main checked at reproduction time: v0.1.25, commit 8fc40dde5e8897a097ec0ea6ea27f9313d171268. Startup and a 28-token arithmetic prompt succeed. A subsequent synthetic prompt (100 repetitions of a short sentence) fails before output with HTTP 503 and engine exit code 1.

Environment

  • Proxmox unprivileged Ubuntu 24.04 LXC; NVIDIA devices and host driver libraries passed through.
  • NVIDIA RTX 5090 Laptop GPU, 24,463 MiB; host driver 595.58.03.
  • Native Release build: CUDA 13.0.88, GCC 13.3, sm_120; bundled build dependency selected via STRATA_GGML_DIR.
  • GPU used only by this engine during reproduction.
  • Container 64 GiB RAM, no swap; service limit 56 GiB with service swap disabled.
  • Model: Qwen3.8-Flash-Next GSQ-RCO IQ2_XS, existing two-shard conversion and MTP assets.
  • Context 131072, INT8 KV, 32768 resident KV cells; prefill 2048; spec 4, spec-min-p 0.5; text-only.
  • Existing local expert profile ranks 8000 entries; expert-cache auto loads those 8000 (10.72 GiB).
  • Approximately 7.4 GiB VRAM free after startup in observed runs.
  • Local changes: setup download URLs pinned to revisions and compile-job cap; custom 8000-entry expert profile. No local engine-source patch in this build.

Reproduce

Start the server with the configuration above. Submit the attached short-request.json, then prefill-request.json:

curl http://127.0.0.1:8080/v1/chat/completions \
  -H 'Content-Type: application/json' --data-binary @short-request.json
curl http://127.0.0.1:8080/v1/chat/completions \
  -H 'Content-Type: application/json' --data-binary @prefill-request.json

The longer prompt is generated as:

text = 'The sensor reading is stable.\n' * 100 + '\nReply with only READY.'

Both requests use temperature 0, reasoning_effort none, max_tokens 128. The long prompt's exact API token count is unavailable because the request fails before usage is returned.

Actual results

  1. Short request: HTTP 200, answer 323, normal stop; 28 input / 4 completion tokens.
  2. Longer request: HTTP 503, the engine stopped unexpectedly (exit code 1); the next request restarts it.
  3. Engine log: prefill gemm: cublasGemmEx: cuBLAS status 13 (execution failed).
  4. Frontend remains running; engine exits. No service OOM or memory-limit events recorded (all memory.events counters zero). No matching OOM/Xid entries found in the checked recent host kernel-log window.

Expected result

The longer request completes, or a recoverable diagnostic identifies the failing operation without terminating the engine.

  • Earlier v0.1.25 runs also produced cuBLAS status 14 and intermittent cublasCreate initialization failure.
  • Separately built v0.1.24 reproduced a related failure: cublasGemmEx f16: cuBLAS status 13 on a longer synthetic prompt. This is not proven unique to v0.1.25.
  • An alternate fork also hit cublasCreate at startup; not included as a controlled upstream comparison.
  • The successful short prompt falls below the default 64-token short-read threshold and does not validate batched prefill.
  • CUDA work is asynchronous: the failing GEMM may be where an earlier kernel failure surfaces. No synchronized diagnostic or compute-sanitizer reproduction has yet established the first failing instruction.
  • Old and new binaries resolve the same CUDA/cuBLAS libraries. This does not rule out a driver/library interaction.
  • Preserved v0.1.14 has not been retested in this reproduction session.
  • This is a bug reproduction, not a performance or quality benchmark.

Request for guidance

Which synchronized diagnostics or prefill feature-disable switches would best isolate this on sm_120 in LXC? Is this combination of CUDA 13.0/cuBLAS, KV streaming and borrowed expert-cache prefill buffers known to be problematic?

Attachments

Synthetic request JSONs, response bodies, engine log tail, service log, environment information and recent kernel-error search output (empty if no matches). No user conversation content included.

engine-tail.txt
environment.txt
kernel-errors.txt
prefill-response.txt
service-log.txt
short-response.txt
prefill-request.json
short-request.json

Originally created by @leonbollerup on GitHub (Sep 29, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/161 # Strata v0.1.25: short request succeeds, batched prefill exits with cuBLAS status 13 on RTX 5090 Laptop / Linux LXC ## Summary Latest release and main checked at reproduction time: v0.1.25, commit `8fc40dde5e8897a097ec0ea6ea27f9313d171268`. Startup and a 28-token arithmetic prompt succeed. A subsequent synthetic prompt (100 repetitions of a short sentence) fails before output with HTTP 503 and engine exit code 1. ## Environment - Proxmox unprivileged Ubuntu 24.04 LXC; NVIDIA devices and host driver libraries passed through. - NVIDIA RTX 5090 Laptop GPU, 24,463 MiB; host driver 595.58.03. - Native Release build: CUDA 13.0.88, GCC 13.3, sm_120; bundled build dependency selected via STRATA_GGML_DIR. - GPU used only by this engine during reproduction. - Container 64 GiB RAM, no swap; service limit 56 GiB with service swap disabled. - Model: Qwen3.8-Flash-Next GSQ-RCO IQ2_XS, existing two-shard conversion and MTP assets. - Context 131072, INT8 KV, 32768 resident KV cells; prefill 2048; spec 4, spec-min-p 0.5; text-only. - Existing local expert profile ranks 8000 entries; expert-cache auto loads those 8000 (10.72 GiB). - Approximately 7.4 GiB VRAM free after startup in observed runs. - Local changes: setup download URLs pinned to revisions and compile-job cap; custom 8000-entry expert profile. No local engine-source patch in this build. ## Reproduce Start the server with the configuration above. Submit the attached `short-request.json`, then `prefill-request.json`: ```sh curl http://127.0.0.1:8080/v1/chat/completions \ -H 'Content-Type: application/json' --data-binary @short-request.json curl http://127.0.0.1:8080/v1/chat/completions \ -H 'Content-Type: application/json' --data-binary @prefill-request.json ``` The longer prompt is generated as: ```python text = 'The sensor reading is stable.\n' * 100 + '\nReply with only READY.' ``` Both requests use temperature 0, reasoning_effort none, max_tokens 128. The long prompt's exact API token count is unavailable because the request fails before usage is returned. ## Actual results 1. Short request: HTTP 200, answer `323`, normal stop; 28 input / 4 completion tokens. 2. Longer request: HTTP 503, `the engine stopped unexpectedly (exit code 1); the next request restarts it`. 3. Engine log: `prefill gemm: cublasGemmEx: cuBLAS status 13` (execution failed). 4. Frontend remains running; engine exits. No service OOM or memory-limit events recorded (all memory.events counters zero). No matching OOM/Xid entries found in the checked recent host kernel-log window. ## Expected result The longer request completes, or a recoverable diagnostic identifies the failing operation without terminating the engine. ## Related observations / limitations - Earlier v0.1.25 runs also produced cuBLAS status 14 and intermittent cublasCreate initialization failure. - Separately built v0.1.24 reproduced a related failure: `cublasGemmEx f16: cuBLAS status 13` on a longer synthetic prompt. This is not proven unique to v0.1.25. - An alternate fork also hit cublasCreate at startup; not included as a controlled upstream comparison. - The successful short prompt falls below the default 64-token short-read threshold and does not validate batched prefill. - CUDA work is asynchronous: the failing GEMM may be where an earlier kernel failure surfaces. No synchronized diagnostic or compute-sanitizer reproduction has yet established the first failing instruction. - Old and new binaries resolve the same CUDA/cuBLAS libraries. This does not rule out a driver/library interaction. - Preserved v0.1.14 has not been retested in this reproduction session. - This is a bug reproduction, not a performance or quality benchmark. ## Request for guidance Which synchronized diagnostics or prefill feature-disable switches would best isolate this on sm_120 in LXC? Is this combination of CUDA 13.0/cuBLAS, KV streaming and borrowed expert-cache prefill buffers known to be problematic? ## Attachments Synthetic request JSONs, response bodies, engine log tail, service log, environment information and recent kernel-error search output (empty if no matches). No user conversation content included. [engine-tail.txt](https://github.com/user-attachments/files/32820375/engine-tail.txt) [environment.txt](https://github.com/user-attachments/files/32820371/environment.txt) [kernel-errors.txt](https://github.com/user-attachments/files/32820372/kernel-errors.txt) [prefill-response.txt](https://github.com/user-attachments/files/32820376/prefill-response.txt) [service-log.txt](https://github.com/user-attachments/files/32820377/service-log.txt) [short-response.txt](https://github.com/user-attachments/files/32820373/short-response.txt) [prefill-request.json](https://github.com/user-attachments/files/32820378/prefill-request.json) [short-request.json](https://github.com/user-attachments/files/32820374/short-request.json)
Author
Owner

@Niko1221 commented on GitHub (Sep 29, 2026):

Thanks for the very thorough report. Status 13 means the GPU program failed to run, and since it hits different GEMMs (and 0.1.24 too), it's most likely an earlier kernel fault showing up late, or the container's driver setup. Could you:

  1. run the long request with CUDA_LAUNCH_BLOCKING=1 (and compute-sanitizer if you can);
  2. on 0.1.26, try --no-prefill-borrow, --prefill 0 and STRATA_PREFILL_MMQ=0, one at a time;
  3. post the host's dmesg Xid lines and the container's NVIDIA library version (it must match host driver 595.58.03 exactly)?

We'll also make the engine report the underlying CUDA error before it exits.

<!-- gh-comment-id:5898202707 --> @Niko1221 commented on GitHub (Sep 29, 2026): Thanks for the very thorough report. Status 13 means the GPU program failed to run, and since it hits different GEMMs (and 0.1.24 too), it's most likely an earlier kernel fault showing up late, or the container's driver setup. Could you: 1. run the long request with `CUDA_LAUNCH_BLOCKING=1` (and `compute-sanitizer` if you can); 2. on 0.1.26, try `--no-prefill-borrow`, `--prefill 0` and `STRATA_PREFILL_MMQ=0`, one at a time; 3. post the host's `dmesg` Xid lines and the container's NVIDIA library version (it must match host driver 595.58.03 exactly)? We'll also make the engine report the underlying CUDA error before it exits.
Author
Owner

@leonbollerup commented on GitHub (Sep 30, 2026):

i managed to fix it.. problem with nvidia driver.. weird shit.. :)

Either way, thanx mate

<!-- gh-comment-id:5903943029 --> @leonbollerup commented on GitHub (Sep 30, 2026): i managed to fix it.. problem with nvidia driver.. weird shit.. :) Either way, thanx mate
Author
Owner

@leonbollerup commented on GitHub (Sep 30, 2026):

I'm optimizing the setup.


v0.1.26: prefill 2,048 → 8,192
Medians of three runs, each generating 256 tokens:

~2K input

• PP: 1,902 → 1,933 tok/s (+1.6%)
• TG: 105.3 → 105.0 tok/s
• First token: 1.079 → 1.062 seconds

~8K input

• PP: 2,231 → 2,722 tok/s (+22.0%)
• TG: 105.4 → 105.3 tok/s
• First token: 3.577 → 2.938 seconds — 18% sooner
• Total request: 5.996 → 5.356 seconds


engine: Strata v0.1.26
model: Qwen3.8-Flash-Next GSQ-RCO IQ2_XS

context_tokens: 131072
prefill_tokens: 8192
kv_cache: int8
kv_resident_cells: 32768

expert_cache: auto
expert_profile_entries: 8000
speculation_depth: 4
speculation_min_probability: 0.5
mtp_runtime: /opt/strata/mtp/rt

service_memory_limit: 56 GiB
service_swap_limit: 0
cuda: 13.0
nvidia_driver: 595.58.03
jit_library_path: /opt/strata-driver-595.58.03

--- start options..

/opt/strata-v0.1.26/build/strata
--serve
--pack /opt/strata/packs/iq2_xs
--native /opt/strata/models/IQ2_XS/Qwen3.8-Flash-Next-GSQ-RCO-IQ2_XS-00001-of-00002.gguf
--ple-gguf /opt/strata/models/IQ2_XS/Qwen3.8-Flash-Next-GSQ-RCO-IQ2_XS-00002-of-00002.gguf
--expert-profile /opt/strata/data/expert-profile.bin
--expert-cache auto
--prefill 8192
--spec 4
--spec-min-p 0.5
--mtp /opt/strata/mtp/rt
--max-context 131072
--kv int8
--kv-resident 32768


Anything i can optimize here ?

• GPU: RTX 5090 Laptop
• Total VRAM: 24,463 MiB
• Used: 16,740 MiB

I have memory free on the GPU..

<!-- gh-comment-id:5906597799 --> @leonbollerup commented on GitHub (Sep 30, 2026): I'm optimizing the setup. --- v0.1.26: prefill 2,048 → 8,192 Medians of three runs, each generating 256 tokens: ~2K input • PP: 1,902 → 1,933 tok/s (+1.6%) • TG: 105.3 → 105.0 tok/s • First token: 1.079 → 1.062 seconds ~8K input • PP: 2,231 → 2,722 tok/s (+22.0%) • TG: 105.4 → 105.3 tok/s • First token: 3.577 → 2.938 seconds — 18% sooner • Total request: 5.996 → 5.356 seconds --- engine: Strata v0.1.26 model: Qwen3.8-Flash-Next GSQ-RCO IQ2_XS context_tokens: 131072 prefill_tokens: 8192 kv_cache: int8 kv_resident_cells: 32768 expert_cache: auto expert_profile_entries: 8000 speculation_depth: 4 speculation_min_probability: 0.5 mtp_runtime: /opt/strata/mtp/rt service_memory_limit: 56 GiB service_swap_limit: 0 cuda: 13.0 nvidia_driver: 595.58.03 jit_library_path: /opt/strata-driver-595.58.03 --- start options.. /opt/strata-v0.1.26/build/strata \ --serve \ --pack /opt/strata/packs/iq2_xs \ --native /opt/strata/models/IQ2_XS/Qwen3.8-Flash-Next-GSQ-RCO-IQ2_XS-00001-of-00002.gguf \ --ple-gguf /opt/strata/models/IQ2_XS/Qwen3.8-Flash-Next-GSQ-RCO-IQ2_XS-00002-of-00002.gguf \ --expert-profile /opt/strata/data/expert-profile.bin \ --expert-cache auto \ --prefill 8192 \ --spec 4 \ --spec-min-p 0.5 \ --mtp /opt/strata/mtp/rt \ --max-context 131072 \ --kv int8 \ --kv-resident 32768 ---- Anything i can optimize here ? • GPU: RTX 5090 Laptop • Total VRAM: 24,463 MiB • Used: 16,740 MiB I have memory free on the GPU..
Author
Owner

@Niko1221 commented on GitHub (Sep 30, 2026):

Glad it was the driver setup. About the ~7 GB of unused VRAM: the automatic expert cache never grows past the size of the expert profile, and your custom profile has 8,000 entries. With the shipped data/expert-profile.bin (24,576 pairs) or a larger profile, it fills the free VRAM: more hits, faster output. Closing; please reopen if the crash comes back.

<!-- gh-comment-id:5908100931 --> @Niko1221 commented on GitHub (Sep 30, 2026): Glad it was the driver setup. About the ~7 GB of unused VRAM: the automatic expert cache never grows past the size of the expert profile, and your custom profile has 8,000 entries. With the shipped `data/expert-profile.bin` (24,576 pairs) or a larger profile, it fills the free VRAM: more hits, faster output. Closing; please reopen if the crash comes back.
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#87
No description provided.