• Stefy Lanza (nextime / spora )'s avatar
    make an embedding request visible to the evictor · e227e7f5
    Stefy Lanza (nextime / spora ) authored
    An engine took SIGSEGV mid-sweep and every model resident on it died with it.
    _is_key_busy() is what stops eviction unloading a model under a live request —
    its docstring says so — and it reads two sources: the instance pool's ref counts
    and external_busy. An embedding request appeared in NEITHER. It takes no pool
    ref, and nothing on that path called external_busy, whose only caller in the
    whole codebase was the lipsync engine. To the evictor, an embedding model was
    permanently idle.
    
        12:27:41  Loading Qwen3.6-14B-A3B: need 9.3 GB, have 4.8 GB free — evicting
        12:27:41  [req] POST /v1/embeddings model=Qwen3-Embedding-4B
        12:27:42  Response status: 200
        12:27:42  On-request VRAM eviction: unloading ACTIVE model
                  'embedding:…Qwen3-Embedding-4B-Q4_K_M.gguf'  backend.model=None
        12:27:44  engine#1 exited (code -11)
    
    code -11 is a segfault, not the -9 OOM-kill everything else this week has been
    about: the native model was freed while a request was still dereferencing it.
    The 502s on /v1/embeddings that had been appearing for hours were this.
    
    The guard wraps the whole region from having the model to being done with it,
    not each inference call: there are three such functions across seven call sites
    and several early returns, and the window that must be protected is the whole of
    it. The key is request_model's `<model_type>:<resolved_name>`, which is exactly
    what the evictor logs and _is_key_busy looks up — marking busy under any other
    spelling would be a no-op that reads like a fix.
    
    A test asserts every inference call sits inside the guard. Its first version
    matched substrings and flagged `_may_embed_images` — a name-and-config
    capability check that runs before the model is even loaded — so it now matches
    exact names.
    Co-Authored-By: 's avatarClaude Opus 5 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_014T3rZozi1Ehk96NG1WesgC
    e227e7f5
Name
Last commit
Last update
..
__init__.py Loading commit data...
_film_net.py Loading commit data...
_rife_ifnet.py Loading commit data...
acestep_worker.py Loading commit data...
app.py Loading commit data...
archive.py Loading commit data...
audio_backends.py Loading commit data...
audio_clean.py Loading commit data...
audio_gen.py Loading commit data...
audio_stems.py Loading commit data...
audiocraft_worker.py Loading commit data...
canary_worker.py Loading commit data...
characters.py Loading commit data...
chunking.py Loading commit data...
colibri_worker.py Loading commit data...
compose.py Loading commit data...
context_overflow.py Loading commit data...
crisperwhisper_worker.py Loading commit data...
custom_pipelines.py Loading commit data...
diarization.py Loading commit data...
ds4_kv_janitor.py Loading commit data...
ds4_worker.py Loading commit data...
embeddings.py Loading commit data...
environments.py Loading commit data...
faceswap.py Loading commit data...
fastlog.py Loading commit data...
h3_worker.py Loading commit data...
host_worker.py Loading commit data...
hub_compat.py Loading commit data...
images.py Loading commit data...
k3_worker.py Loading commit data...
kt_worker.py Loading commit data...
lang_codes.py Loading commit data...
lipsync.py Loading commit data...
lipsync_engines.py Loading commit data...
log.py Loading commit data...
longcat_worker.py Loading commit data...
loop_watch.py Loading commit data...
lora_archs.py Loading commit data...
loras.py Loading commit data...
melotts_worker.py Loading commit data...
model_test.py Loading commit data...
models_transfer.py Loading commit data...
moderation.py Loading commit data...
mux_remote.py Loading commit data...
ocr.py Loading commit data...
parler_worker.py Loading commit data...
pipelines.py Loading commit data...
pod_http.py Loading commit data...
pod_telemetry.py Loading commit data...
pod_tls.py Loading commit data...
podlog.py Loading commit data...
prompt_cache.py Loading commit data...
pyannote_worker.py Loading commit data...
ratelimit.py Loading commit data...
remote_gateway.py Loading commit data...
request_progress.py Loading commit data...
rerank.py Loading commit data...
runpod_client.py Loading commit data...
runpod_fleet_share.py Loading commit data...
runpod_ledger.py Loading commit data...
runpod_worker.py Loading commit data...
serving_load.py Loading commit data...
spatial.py Loading commit data...
speaker_embeddings.py Loading commit data...
speaker_registry.py Loading commit data...
state.py Loading commit data...
stt_backends.py Loading commit data...
text.py Loading commit data...
thread_pool.py Loading commit data...
transcriptions.py Loading commit data...
tts.py Loading commit data...
tts_backends.py Loading commit data...
uploads.py Loading commit data...
urlutils.py Loading commit data...
venv_env.py Loading commit data...
video.py Loading commit data...
vllm_worker.py Loading commit data...
voice_clone.py Loading commit data...
voice_convert.py Loading commit data...
vpr_salad_server.py Loading commit data...
xtts_worker.py Loading commit data...