This document is relevant for: Trn2, Trn3

Troubleshooting: SGLang-Neuron#

Note

SGLang-Neuron is in public preview. Features, APIs, and supported models can change in later releases.

Overview#

This page helps you find and fix common problems when you run SGLang-Neuron from the container image. It covers the compile cache, the container options, the Neuron driver, and prefill-decode (PD) disaggregated serving over EFA.

The plug-in checks each launch and refuses a feature or a layout that it does not serve. The refusal message names the setting that caused it. If a launch stops with such a message, see Reference: SGLang-Neuron feature compatibility.

Common symptoms and solutions#

Symptom

Cause

Solution

A server exits at start with the compile cache ... was built from other NKI kernel sources.

The cache directory belongs to a different image version.

Give this image its own cache directory.

Failed to load the backend extension: torch_neuronx

A volume is mounted at /workspace, or Python started in /workspace.

Mount your data at a different path, and keep the working directory out of /workspace.

Neuron runtime errors on a host that just started.

The Neuron driver of the host is not ready.

Wait until ls /dev/neuron* lists the devices on the host.

EFA or libfabric errors at start, or requests that stop in the KV transfer.

The EFA devices, IPC_LOCK, or memlock are missing from the container.

Start the container with the PD options in Container options.

The decode server cannot reach the prefill server, and requests fail or time out.

HOST is wrong, or traffic between the nodes is blocked.

Give each server an address that the other node reaches. Allow all traffic between the nodes in one security group.

A server refuses its peer at the first request.

The two nodes run different image builds.

Run the same image on both nodes.

The prefill server and the decode server cannot exchange the KV cache.

nixl or nixl-cu13 was installed or upgraded with pip. The PyPI wheel replaces the patched NIXL of the image.

Do not pip install or upgrade nixl or nixl-cu13. Start a new container from the image.

A request to /v1/responses fails.

The /v1/responses endpoint is off in this image.

Use /v1/chat/completions, /v1/completions, or /generate.

A sampled request is refused.

The server uses the default greedy sampler.

Set temperature to 0 in the request, or start the server with SGLANG_NEURON_SAMPLER=temperature or SGLANG_NEURON_SAMPLER=topk_topp.

A Kimi-K3 text request fails.

The request went to the balancer. The Kimi-K3 prefill server accepts token IDs only.

Send chat requests to the chat front on port 8021.

Diagnostic steps#

  1. Check the host devices. On the host, run ls /dev/neuron*. The command lists one device for each Neuron chip.

  2. Check the devices in the container. Run docker run --rm $DEVICES $IMAGE neuron-ls. The output lists the same devices as on the host.

  3. Check the installed versions. Run this command to print the versions of the packages in the image:

    docker run --rm $DEVICES $IMAGE python3 -c '
    import importlib.metadata as m
    for p in ("sglang", "sglang-neuron", "torch", "torch-neuronx", "neuronx-cc", "nixl"): print(p, m.version(p))'
    
  4. Check what the image was built from. Run docker inspect -f '{{json .Config.Labels}}' $IMAGE. The labels show the plug-in revision, the Neuron SDK release, and the SGLang commit.

  5. Read the server log. For a server that runs in the background, run docker logs -f <name>. A server is ready when its log shows The server is fired up and ready to roll!.

Known issues and workarounds#

  • Long first start. The first start of a model on a new compile cache compiles its programs. Later starts with the same cache directory load them.

  • pip check reports missing requirements. The image leaves out the SGLang GPU stack and nixl-cu12 on purpose. You can ignore these lines.

  • The GSM8K client prints a deprecation notice. The notice points to the SGLang sgl-eval tool, which the image does not install. The client works as before.

  • docker stop does not drain servers that you start in a container shell. The servers run under the shell of the container, and the shell does not send the signal to them. Press Ctrl+C in the shell of each server. For a server that is the main process of its container, run docker stop -t 120 <name>.

  • Pinned SGLang revision. The plug-in runs only on SGLang commit 43881a7. On a different SGLang revision, the plug-in stops the launch.