Gufo
View on GitHub
Pages
Home / Documentation / v0.37.0

Troubleshooting

Start with gufo diagnose, then read the server log. This page explains both, the common failures, and what to include in a bug report.

Check the setup

gufo diagnose
gufo diagnose --section gpu        # platform, gpu, npu, inventory or extensions
gufo diagnose --json               # for scripts and bug reports

diagnose checks the driver, device permissions, memory and the extensions compiled in, without loading a model. It runs as a separate process, so it can’t see the state of a server that is already running; use /health and /ready for that.

The GPU isn’t found

  • Your user must be in the video and render groups; log out and back in after adding them. Check with id and ls -l /dev/kfd /dev/dri/renderD*.

  • In rootless Podman, --group-add keep-groups needs the crun runtime. Groups named video or render inside the container are not your host groups.

  • On Fedora and other SELinux hosts, ROCm can report “Memory critical” when SELinux blocked mapping /dev/kfd. Look for denials on the host:

    sudo ausearch -m avc -ts recent | grep -E '/dev/kfd|hsa_device_t'

    Podman’s documented fix, sudo setsebool -P container_use_devices true, lets every container on the host use the devices passed to it; review that scope before enabling it.

The NPU isn’t found

  • Check that the kernel’s amdxdna driver created the node: ls -l /dev/accel/accel0. Your user needs access to it, usually through the render group.
  • In a container, pass --device /dev/accel/accel0.
  • On Windows, install AMD’s NPU driver; it supplies XRT (xrt_coreutil.dll in System32). Remove any xrt_coreutil.dll beside gufo.exe and unset XILINX_XRT: either makes XRT look for the driver’s device plugin in the wrong folder.

The server stops with device_lost

A GPU reset leaves the process unable to use the GPU again. Gufo returns 503 device_lost, logs event=device_lost remedy=restart, and exits with status 75. Run it under a supervisor that restarts it; see health and restarts. If generation hangs instead of failing, --stall-timeout-ms 120000 turns the hang into the same exit.

Requests are slow

  • Every turn processes the whole conversation: check timings.cache_n in the responses. If it’s near zero, something early in the prompt changes between turns; see what breaks reuse.
  • Requests wait: each --sessions slot runs one request; others queue. /slots shows what each session is doing. When sessions share memory (more than fit at full context), a request also waits until its tokens fit; the log shows event=state_wait and event=state_wait_end, and /metrics gufo_shared_state_*. A request stopped with memory_pressure (503) can be retried; insufficient_memory_permanent (507) means the prompt never fits.
  • Requests fail with insufficient_memory (503) while another program runs: the host has less than about 2 GiB of available memory. Gufo finishes running requests, then gives RAM-cache memory back (the log shows event=host_pressure_release); retry, or close the other program.
  • Prefill seems stuck: start the server with --log-progress to log each prefill chunk and every 50 decoded tokens, with speeds.

Client notes

  • Codex with Qwen models sends developer messages in the middle of a conversation. Qwen’s template allows one system message at the start, so Gufo moves them there; the request that adds one processes the conversation again, and later requests reuse it.
  • Claude Code with Qwen models isn’t supported: it adds a new system message on every turn, so every request processes the whole history again.

Logs

The server logs to stderr. Each request gets an X-Request-ID response header that matches its request=rN log lines. The completion line reports the finish reason, queue and first-token time, speeds, reused tokens and, on a cache miss, cache_miss_reason.

--log-level sets the detail:

LevelAdds
errorServer errors only.
warnRefused requests (4xx), cache and capacity warnings.
info (default)Startup, loading, and one line per request.
debug (-v)Resolved options, queue decisions, and why each cache checkpoint was skipped.

At warn and error the startup line is hidden too, so check /ready to confirm the server started. No level logs prompts or replies, but debug logs client IP addresses.

Content trace

When the problem is in the text itself, such as tool-call markup leaking into the answer, start the server with --trace trace.jsonl. Every text request writes three JSON lines: the request as received, the prompt as the model saw it with the raw output, and the response as sent. To read one request:

jq 'select(.request == "r12")' trace.jsonl

Warning: The trace holds whole conversations, tool results included. Treat it like the conversations themselves and delete it when you’re done; Gufo never rotates or truncates it.

Reporting a bug

Open an issue at gufo-org/gufo with:

  • gufo --version and gufo diagnose --json;
  • the full command line, and the model files with their revisions;
  • the server log around the failure, at --log-level debug if you can reproduce it;
  • for wrong output, the trace records of the request, after removing anything private.

Synced from docs/troubleshooting.md at v0.37.0, 2026-11-25.