Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

lemonade: a failed backend install during serve leaves the spawned lemond running

Abierto Apto para principiantes
#729 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
78/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
rust
Área
backend, devtools

Línea de trabajo

Lee la rama del router después de spawn_lemond en engines/lemonade/src/lib.rs y compara su gestión de errores con install_best_llamacpp_backend en backend_alignment.rs. Revisa la ruta de recuperación existente para la preparación de serve mencionada en el issue, para encontrar una forma de provocar un fallo en la instalación del backend. La tarea está terminada cuando una comprobación de disponibilidad o una selección de backend fallida detiene y espera al proceso hijo iniciado, y una prueba confirma que no queda ningún proceso lemond.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Rust
Estrellas
49
Forks
14
Merge medio
3 d 6 h
PR fusionados (30 d)
183

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de ROCm/rocm-cli

Todos los issues de ROCm/rocm-cli

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.