[Engine] 0.1.73 (v0.2.25): --serve without --expert-profile segfaults in the adaptive tier on the first request (host_res is empty)
Maintainer thường phản hồi trong vòng 4 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 72/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- cpp
- Lĩnh vực
- backend, performance
Hướng nghiên cứu
Bắt đầu tại engine/src/program/generate.cpp, ở điều kiện adaptive-tier được báo cáo quanh dòng 15138; sau đó đọc adapt() quanh dòng 15502 và phần thiết lập graph_hits/profile quanh dòng 11124. Tái hiện lỗi với --expert-cache và không có --expert-profile, rồi kiểm tra điều kiện --expert-profile-save hiện có để xác định cách xử lý profile như mong đợi. Hoàn tất khi cùng yêu cầu đó không còn gây segfault và trường hợp thiếu profile được xử lý bằng thông báo rõ ràng hoặc giữ cho quá trình thích ứng ở trạng thái tắt.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Version: Strata v0.2.25, engine 0.1.73-metal (the released binary; also a self-built one from the v0.2.25 tag)
Hardware: Mac Studio, Apple M5 Ultra, 96 GB unified memory, macOS 27
What happens
A hand-written run config that has --expert-cache N but no --expert-profile starts fine, then the engine dies with SIGSEGV on the first request (the server answers 503):
strata metal: crashed (signal 11 at address 0x0) - the call stack:
0 strata metal_crash + 64
1 libsystem_platform.dylib _sigtramp + 56
2 strata std::__thread_proxy<... main::$_341> + 104
Repro
The released engine with a Qwen3.8-Flash-Next IQ3_S pack, the usual arguments minus --expert-profile:
--pack <pack> --native <shard1> --ple-gguf <shard2> --expert-cache 64 --prefill auto --max-context 262144 --mmap-experts
Any chat request then crashes it. Adding --expert-profile terminal/data/expert-profile.bin (or --adapt-swaps 0) makes it run.
Cause
With a RelWithDebInfo build and the faulting pc from the signal context, the crash is in adapt() at engine/src/program/generate.cpp:15502 (v0.2.25):
const int32_t* r = host_res.data() + l * g.n_expert;
...
if (r[e] < 0) { // host_res is empty -> null read
host_resis only built whengraph_hitsis true, andgraph_hitsneeds!profile.empty()(line 11124).- The adaptive tier is switched on at line 15138 without looking at it:
if (o.adapt_every > 0 && o.adapt_swaps > 0 && !all_experts_resident && live_gpu_slots > 0) drive.d.usage.assign(...)
(all_experts_residentis false whenhost_resis empty). - So with no profile and a cache of at least one slot, the first adapt round reads a null table.
--expert-profile-save already checks for this case (drive.d.usage.empty() || host_res.empty() -> "needs ... --expert-profile"), the tier itself does not.
Suggested fix
Either && !host_res.empty() on line 15138 (the tier stays off, one log line saying it needs --expert-profile), or refuse the start with that message. setup never hits this because it always passes a profile (the neutral one for other shapes), so it only bites hand-written configs.
- Ngôn ngữ chính
- C++
- Star
- 11.6k
- Fork
- 1k
- Merge trung bình
- 6 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 21
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Niko1221/Strata
-
[Engine] 0.2.24: `strata --help` segfaults — unescaped `%` in the `--deterministic` help textĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Niko1221/Strata#7746 · 2 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 4 ngày
-
[Other] tune run --mode api --hold <size> renders the literal "None" into the worker command line, engine exits with code 2Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Niko1221/Strata#7719 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Niko1221/Strata#7684 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Niko1221/Strata#7670 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
Tất cả issue của Niko1221/Strata
Issue tương tự
-
MusicXML import hangs on `<other-notation>` without a `smufl` attribute (regression from 3.x)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 78/100
azahar-emu/azahar#2944 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[request] md4qt/5.5.0Đang mởupstream update
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
conan-io/conan-center-index#31637 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
Maintainer thường phản hồi trong vòng 1 ngày