lemonade: a failed backend install during serve leaves the spawned lemond running
Maintainer thường phản hồi trong vòng 2 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
- 78/100
Hướng nghiên cứu
Đọc nhánh router sau spawn_lemond trong engines/lemonade/src/lib.rs và so sánh cách xử lý lỗi của nhánh này với install_best_llamacpp_backend trong backend_alignment.rs. Kiểm tra đường phục hồi hiện có cho bước chuẩn bị serve được đề cập trong issue để tìm cách tạo lỗi cài đặt backend. Công việc hoàn tất khi việc kiểm tra trạng thái sẵn sàng hoặc chọn backend thất bại sẽ dừng tiến trình con đã khởi chạy và chờ tiến trình đó kết thúc, đồng thời một bài kiểm thử xác nhận không còn tiến trình lemond nào.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What happens
In the Lemonade engine's serve path (engines/lemonade/src/lib.rs, the router branch after spawn_lemond), two early returns leave the spawned lemond running:
let mut child = crate::process::spawn_lemond(...)?;
...
crate::process::wait_for_lemonade_cli_status(...)
.context("Lemonade server did not become ready")?; // returns, child left running
let backend = crate::backend_alignment::ensure_best_llamacpp_backend(...)
.context("failed to select a supported Lemonade llama.cpp backend")?; // same
The later failure paths in the same function (load_result failing, or the router not reporting the model) do call terminate_pid(child.id(), true) and child.wait() before returning. Its sibling install_best_llamacpp_backend in backend_alignment.rs does the same unconditionally around the same two calls.
Why it matters
When the llama.cpp backend install fails, which is exactly the case rocm serve already retries once and then tells the user to rocm engines install lemonade --reinstall, the engine exits with an error but its lemond keeps running. It still holds the port and its state.
Not verified
Whether anything on the rocm serve side later reaps that lemond, for example a stop through the service record that recorded its pid via write_running_state(..., Some(child.id()), "running"). This was found by reading the code. In the e2e suite the harness's teardown kills it, so no test shows the leak.
Suggested fix
Run both calls inside a closure and terminate the child on its Err, as install_best_llamacpp_backend does. Add a unit or e2e assertion that no lemond survives a failed backend install; @id:serve-lemonade-preparation-recovery already drives that failure with a planted runtime once #351 lands.
Raised in review on #351.
- Ngôn ngữ chính
- Rust
- Star
- 49
- Fork
- 14
- Merge trung bình
- 3 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 183
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
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 ROCm/rocm-cli
-
bug installation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 2 ngày
-
enhancement
Độ 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 2 ngày
-
bug documentation
Độ 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 2 ngày
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Deduplicate the `--yes`/non-interactive-terminal refusal guard (three near-identical copies)Đang mởenhancement ux-opportunities
Độ 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 2 ngày
Tất cả issue của ROCm/rocm-cli
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
dekobon/big-code-analysis#1729 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug help wanted
Độ 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 3 ngày
-
Cline: allowlist capture drops every event because the capture gate ignores `workspaceRoots`Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
akitaonrails/ai-memory#1888 ·
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 72/100
peteonrails/voxtype#941 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
bug priority:medium triage:maintainable
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
ccusage/ccusage#2000 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày