mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #828] Heap corruption (munmap_chunk: invalid pointer) at startup in Prefill::init — crashes with 1/2/4 GPUs #369
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#369
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 @wehooper4 on GitHub (Oct 4, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/828
Crash
Engine crashes at startup with
munmap_chunk(): invalid pointer(heap corruption) during prompt path initialization. Happens consistently, 100% reproducible.Log (last lines before crash)
With default settings (no STRATA_SPLIT_OWN), it crashes at:
System
6f32ec0, latest main as of 2026-10-04)What I've tried
Analysis
The crash is inside
Prefill::init()(src/prefill/prefill.cpp). Theborrowbuffer (fromExpertCache::device_slot()) is valid — I verified the slot index is in-bounds and the pointer is non-null. The corruption happens afterPrefill::initreceives the borrow buffer.The #583 "byte-budget ring" changes are the likely culprit (all recent changes to prefill.cpp are from #583), but
STRATA_RING_BYTES=0does not fully disable the code path.This is different from Issue #70 (which crashes mid-decode after successfully serving). This crashes at startup, before serving any requests.
@wehooper4 commented on GitHub (Oct 4, 2026):
Note: this is NOT the same as #133.
#133 is VRAM exhaustion on the GPU (
fatal: Memory allocation failure/cublasCreate failed) — the GPU runs out of memory during prompt prefill init.#828 (this issue) is host heap corruption (
munmap_chunk(): invalid pointer) — glibc detects corrupted heap metadata on the CPU side. The GPU memory is fine; it's the host-sidePrefill::init()that's corrupting the heap.Different failure modes, different root causes. The "prompt path borrows/allocates" log line appears in both, but that's just the last thing printed before two different crashes.
@Niko1221 commented on GitHub (Oct 6, 2026):
We could not find this one by reading. 0.1.40 adds STRATA_TEST_PAGEABLE=1, which forces the pageable fallbacks of the prompt path on a PC that can pin memory (it ran clean on Windows here, but Windows has no heap checker). Could you run with MALLOC_CHECK_=3 under gdb (bt), send 'ulimit -l' from inside the container, and try once outside LXC? Pinned allocations failing under the container's memlock limit is our main suspect.
@Niko1221 commented on GitHub (Oct 7, 2026):
Please run the engine with MALLOC_CHECK_=3 under gdb and send the backtrace of the munmap_chunk invalid pointer, with ulimit -l and the output of nvidia-smi. A run outside LXC would also help us tell the container apart. 0.1.40 has an STRATA_TEST_PAGEABLE=1 test switch if you want to compare.
@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.