Skip to content

bug(ci): llama-server segfault cascade in quality job #1388

Closed

Description

@ajbozarth

Problem

The quality CI job intermittently segfaults llama-server, cascading into ~56 ollama test failures:

ollama._types.ResponseError: llama-server process has terminated: signal: segmentation fault (core dumped)

It's intermittent — clean runs finish ~17 min, segfaulting runs drag to 40+ min and stall the whole merge queue behind them.

Not the parallel setting

#1381 tried OLLAMA_NUM_PARALLEL=1 and has been reverted (#1387). Two runs with the setting active: one passed clean in 17:05, one segfaulted 56 tests in 40:25. Serialization doesn't fix the crash and adds runtime.

Cause

  • llama-server SIGSEGVs under memory pressure on the shared ollama serve (memory-limited CPU runners; unpinned Ollama installer tracks latest llama.cpp).
  • The backend's retry only catches httpx.TimeoutException/ConnectError (ollama.py:245); a dead server returns ollama.ResponseError (HTTP 500), so there's no fast-fail or restart — every later test hits the dead server and the run grinds.

Possible fixes

  • Treat ollama.ResponseError/HTTP 500 as server-death: fast-fail or restart ollama serve mid-job.
  • Reduce memory pressure (OLLAMA_MAX_LOADED_MODELS=1, keep-alive, smaller model).
  • Pin the Ollama installer version for reproducibility.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions