Repository navigation
Conversation
The || died_silently clause treated 'no error-looking word anywhere in the log' as evidence of a device failure. Any ambiguous engine exit - OOM, external SIGKILL, Studio's own startup timeout - was unrecoverably blacklisting Auto for the rest of the session. describes_device_failure already covers real device faults (cuda error, ggml_cuda_compute_forward, fatal: self-test, devicelost, vk::, etc.), so removing the || clause does not lose any device-fault signal. The died_silently function itself is kept because lost_job_reason and its unit test still use it. Closes timoncool#127.
|
Tracking issue for the underlying cause (health probe timing out during long NAR steps and killing the engine mid-job, which is what triggers the silent exit this PR handles) is #129 — filed separately because there are three viable fix directions (raise the probe timeout, skip probing during active jobs, or make the engine's Fixing #129 would reduce how often this PR's failure mode is triggered at all. This PR just makes the resulting failure mode recoverable. |
|
Thank you! Taken into 3.7.0 (and into MiniMax Music3 Studio and ACE-Step Studio, which share the code), with #129 fixed beside it: https://github.com/timoncool/YuE2-Studio/releases/tag/v3.7.0 |
Don't black-list Auto after an engine exit that didn't name a device fault
Closes #127
Related: #129 (health probe restarts the engine mid-job, which is what triggers the silent exit this PR handles)
What this changes
One logic line in
crates/music-server/src/lib.rs, in the loop that watchesthe engine and restarts it when it stops answering, plus a comment that
explains the reasoning:
died_silentlytreats "no error-looking word anywhere in the log" as evidenceof a device failure. It fires equally for an OOM-killer SIGKILL, an external
pkill, Studio's ownwait_until_healthytimeout on a slow cold start, anda crash that hasn't flushed its last line. Any of those would add the current
device to
failed_devicesand remove it from the Auto chain for the rest ofthe Studio session.
describes_device_failurealready covers the real device faults —cuda error,ggml_cuda_compute_forward,fatal: self-test,devicelost,vk::,etc. The
||clause was strictly broadening the definition without adding anydevice-fault signal.
Why it matters
hardware::hardware().cudais alwaysNone(
crates/music-server/src/hardware.rs:109), soEngineOptions.backendcannot be set to explicit
Cuda.Autois the only GPU path.EngineOptions::device_chain(same file, around line 715) skips devices infailed_devices. OnceAutois blacklisted, every subsequent start in thesession runs on CPU.
Auto failed on this machine; leaving it for this session, which reads asa hardware failure to a user who hasn't read the source.
The observed effect on a healthy NVIDIA GPU: after one silent engine exit,
songs take roughly 3x longer and there is no UI-visible error explaining why.
Repro
Autobackend on an NVIDIA GPU.kill -9 $(pgrep -f 'yue-server' | head -1).Scope
One logic line plus a comment update (5 insertions, 3 deletions in one file).
died_silentlyis left in place becauselost_job_reasonatlib.rs:7861still calls it, and its unit test atlib.rs:9032still pinsit. Removing the function and the test together would be a nicer cleanup but
is out of scope for the smallest change that fixes the bug.
Verification
cargo test -p music-server --release --lib: 335 passed, 0 failed.kill -9on a running engine, next start onCPU, log contains
Auto failed on this machine.kill -9, next start logs[Load] KV backend: CUDA0 (CPU threads: N)and Studio stays onAuto.~11 s (CPU) to ~22 s (CUDA), full pipeline from 697 s to under 6 minutes.
Follow-up
The health probe at
lib.rs:8417uses a 500 ms timeout, which is shorterthan a single NAR step on this engine. Studio restarts the engine mid-job,
and before this patch that restart demoted the session to CPU. After this
patch, the restart stays on CUDA — the job is still lost, but the session
recovers.
Reducing how often the silent exit happens in the first place is tracked
separately in #129. Raising the probe timeout, pausing probing while a job
is running, or making the engine's
/healthnon-blocking would each reducethe frequency; the maintainer can pick the direction.