Scenario
Four failed starts after a pip install
RolesInference EngineeringCustomer AI DeploymentLLM Product Engineering
- Engine
- SGLang 0.5.22 from pip, and vLLM 0.31.0 from a uv install
- Model
- Qwen/Qwen3-8B
- Hardware
- a node with two L4 GPUs, an NVIDIA driver and no CUDA toolkit
Situation
A platform team gets a new node with two L4 cards. The host runs Ubuntu 24.04 with a driver, and nothing else from CUDA is on it. They install SGLang with pip, and the install prints no error. The first sglang serve dies with a C compiler message about a missing header. They repair it and start again. A new error. They repair that one too. After an afternoon, they have four failed starts and four different errors, each from a different component.
The other team on the same node tries vLLM through a uv install. Their server dies with Engine core initialization failed right after a kernel build. Both teams now believe the driver on the node is faulty, and they file a ticket to reimage it. You are asked to review the logs before the node goes down.
Questions
- Four errors name four components. What is the one fact that all four share?
- Why does a serving engine need the Python headers at all, and which part of the stack asked for them?
- The third failure appeared only after the second one was repaired. What did that repair cause?
- The second engine failed on the same host with the same preprocessor check. Is it the same cause, and what is the one-variable workaround for a greedy benchmark?
- What do you tell the team about the reimage ticket, and what is the fix for production?
Commit to a cause after each listing. Write it down before you read the next one.
Evidence
the first two starts: a missing Python header, then no CUDA compiler
Read the first error line under each attempt header. The progress bar line repeats the first error.
=== attempt: out-l4-nopyheaders/server-default.log
<site-packages>/triton/backends/nvidia/driver.c:9:10: fatal error: Python.h: No such file or directory
<site-packages>/triton/backends/nvidia/driver.c:9:10: fatal error: Python.h: No such file or directory
0%| | 0/50 [00:00<?, ?it/s]
Capturing prefill shape (num_tokens=4096 avail_mem=2.28 GB): 0%| | 0/50 [00:00<?, ?it/s]<site-packages>/triton/backends/nvidia/driver.c:9:10: fatal error: Python.h: No such file or directory
=== attempt: out-l4-nonvcc/server-default.log
[2026-10-16 14:21:19] RuntimeError: Could not find nvcc and default cuda_home='/usr/local/cuda' doesn't exist
raise RuntimeError(
RuntimeError: Could not find nvcc and default cuda_home='/usr/local/cuda' doesn't existSource: manuals/sglang-101/capture/gpu/incidents/l4-toolchain-failures.txt, lines 1-8
the third start: the compiler and the headers do not match
The Ninja build of the FlashInfer kernels stops on one preprocessor check in a bundled header.
=== attempt: out-l4-jitmismatch/server-default.log
[2026-10-16 14:23:40] RuntimeError: Ninja build failed. Ninja output:
<site-packages>/flashinfer/data/cccl/libcudacxx/include/cuda/std/__cccl/cuda_toolkit.h:41:8: error: #error "CUDA compiler and CUDA toolkit headers are incompatible, please check your include paths"
41 | # error "CUDA compiler and CUDA toolkit headers are incompatible, please check your include paths"
<site-packages>/flashinfer/data/cccl/libcudacxx/include/cuda/std/__cccl/cuda_toolkit.h:41:8: error: #error "CUDA compiler and CUDA toolkit headers are incompatible, please check your include paths"Source: manuals/sglang-101/capture/gpu/incidents/l4-toolchain-failures.txt, lines 9-13
the fourth start: the linker cannot find the CUDA runtime library
The JIT module of SGLang links against -lcudart and the linker finds no such file.
=== attempt: out-l4-nolibcudart/server-default.log
/usr/bin/ld: cannot find -lcudart: No such file or directory
collect2: error: ld returned 1 exit status
[2026-10-16 14:26:33] RuntimeError: Failed to build JIT module sgl_kernel_jit_fused_rope_true_128_false_bf16_t_bf16_t in /root/.cache/sglang/jit/sm89/sgl_kernel_jit_fused_rope_true_128_false_bf16_t_bf16_t/build-d129ad15216edb50/.staging-45436f7697ff4fd58892a3e6760bd970
/usr/bin/ld: cannot find -lcudart: No such file or directorySource: manuals/sglang-101/capture/gpu/incidents/l4-toolchain-failures.txt, lines 14-18
the other engine on the same host: the sampler choice and the JIT build
The second line names the component that the third line starts to build.
INFO 10-17 16:22:09 [api_utils.py:286] non-default args: {'model_tag': 'Qwen/Qwen3-8B', 'host': '127.0.0.1', 'port': 30000, 'model': 'Qwen/Qwen3-8B', 'max_model_len': 8192, 'gpu_memory_utilization': 0.9, 'num_gpu_blocks_override': 1506}
INFO 10-17 16:22:26 [topk_topp_sampler.py:124] Using FlashInfer for top-p & top-k sampling.
2026-10-17 16:22:39,316 - INFO - core.py:564 - flashinfer.jit: Building JIT module sampling; this can take several minutes on first use.Source: manuals/vllm-101/capture/gpu/incidents/l4-vllm-flashinfer-jit.txt, lines 1-3
the other engine: the engine core fails, and the three packages behind it
Read the versions of the kernel library, the headers and the compiler, which come from three different packages.
RuntimeError: Engine core initialization failed. See root cause above. Failed core proc(s): {}
flashinfer_python-0.7.0.post1.dist-info
nvidia_cuda_cccl-13.3.4.3.1.dist-info
nvidia_cuda_nvcc-13.4.92.dist-infoSource: manuals/vllm-101/capture/gpu/incidents/l4-vllm-flashinfer-jit.txt, lines 5-8
the one fact behind the four failures, and the repair for each
One numbered item per failed start, in the order the starts failed.
All four failures come from one fact. SGLang, Triton, and FlashInfer compile kernels on the target machine at startup, and a compiler needs a complete toolchain.
1. Triton compiles a small C helper against the Python headers. The system Python of Ubuntu has no `Python.h`. We changed to a Python build that includes its headers, from `uv`.
2. SGLang looks for `nvcc` under `/usr/local/cuda`. The pip wheels include `nvcc` 13.4 under `nvidia/cu13` in site-packages, but nothing points to it. We set `CUDA_HOME` to that directory.
3. FlashInfer then compiled its attention kernels with that `nvcc` against its own bundled headers, and the versions did not match. We installed `flashinfer-jit-cache`, which holds kernels compiled in advance for SM 8.9.
4. The JIT kernels of SGLang link with `-lcudart` from `$CUDA_HOME/lib64`. The wheel has only `lib/libcudart.so.13`. We made a `CUDA_HOME` with a `lib64` directory that holds `libcudart.so`.
The fifth start served requests. Our GB10 never had this problem, because its DGX operating system has a full toolkit in `/usr/local/cuda`.Source: manuals/sglang-101/sections/7-1-operating-sglang.md, lines 50-57
the troubleshooting entry for the sampler build on the other engine
The fix line gives the environment variable that skips the sampler build.
### The sampler fails to compile after you set CUDA_HOME
- **Cause:** the toolkit on the host does not match the CUDA build of PyTorch, so the FlashInfer sampler cannot compile. With a host toolkit at nvcc 13.4, we saw this on our L4 node.
- **Check:** the error says `CUDA compiler and CUDA toolkit headers are incompatible`.
- **Fix:** install the toolkit version that matches your PyTorch build. Or start with `VLLM_USE_FLASHINFER_SAMPLER=0`, as [the FP8 KV cache page](#s-fit-more-users-with-an-fp8-kv-cache) does.Source: manuals/vllm-101/sections/7-1-troubleshoot-by-symptom.md, lines 61-65
The answer
Show the walkthrough
- Read the first error of each start, not the traceback. Attempt one stops in
triton/backends/nvidia/driver.conPython.h: No such file or directory. Triton compiles a small C helper against the Python headers when the server starts, and the system Python has none. The manual changed to a Python build that ships its headers, fromuv. Attempt two stops withCould not find nvcc and default cuda_home='/usr/local/cuda' doesn't exist. The pip wheels carry annvccat version 13.4 undernvidia/cu13in site-packages, but nothing points at it, so the manual setCUDA_HOMEto that directory. - See how one repair exposed the next failure. With a compiler in reach, FlashInfer built its attention kernels with that
nvccagainst its own bundled headers, and the versions did not match. The Ninja build stops on one preprocessor line:CUDA compiler and CUDA toolkit headers are incompatible. The manual installedflashinfer-jit-cache, which holds kernels compiled in advance for SM 8.9, so nothing has to compile them on the host. - Read the fourth error as a linker problem. The JIT kernels of SGLang link with
-lcudartfrom$CUDA_HOME/lib64. The wheel has onlylib/libcudart.so.13, soldfinds nolibcudart.so. The manual made aCUDA_HOMEwith alib64directory that holds the library. The fifth start served requests. - Check the second engine against the third failure. vLLM chose FlashInfer for top-p and top-k sampling and started to build the
samplingJIT module. The build stopped on the same header check, and the engine core never came up. The package list under the error gives the cause in three lines: the kernel libraryflashinfer_python-0.7.0.post1, the headersnvidia_cuda_cccl-13.3.4.3.1and the compilernvidia_cuda_nvcc-13.4.92come from three packages with three versions. The vLLM manual gives two fixes: a toolkit that matches the PyTorch build, orVLLM_USE_FLASHINFER_SAMPLER=0, which skips the sampler build and is enough for a greedy benchmark. - Name the one fact. SGLang, Triton and FlashInfer compile kernels on the target machine at startup, and a compiler needs a complete toolchain. The driver was never part of any error. The manual's GB10 never hit this, because its DGX operating system has a full toolkit under
/usr/local/cuda.
Show the resolution
Cancel the reimage. Nothing in the logs names the driver. Every error names a compiler, a header set or a linker, and all of them belong to the kernel build that runs on the first start.
For production, run SGLang from the pinned image, or on a host with a full CUDA toolkit. The pip path works on a host with only a driver after the four repairs above, and the manual warns that each SGLang upgrade can need them again. For vLLM, use the image or a toolkit that matches the PyTorch build; set VLLM_USE_FLASHINFER_SAMPLER=0 only when you need a quick greedy benchmark on a host without one. The proof of the fix is the fifth start, which served requests, and the position in the manual that came out of it: run outside the image only on a host with a full toolkit.
Show the wrong turns
“The driver is broken, reimage the node.”
No error names the driver. The four messages come from a C compiler, the CUDA compiler lookup, a header check and the linker.
“pip install finished without errors, so the install is complete.”
The install does not compile kernels. The first start does, and that is where the toolchain is checked.
“Install the distribution's CUDA toolkit and keep the wheels.”
The toolkit must match the CUDA build of PyTorch. A host toolkit at nvcc 13.4 gave the header mismatch on this node.
“Fix one error and declare the node ready.”
Each repair revealed the next failure. Run a full start and one request before you close the ticket.
Show the general rule
An engine that compiles kernels at startup has a second install step, and it runs on the first start, on the machine you serve from. When that step fails, read the first error line and ask which tool failed: the compiler, the headers it reads, or the linker. Fix the toolchain or use the image that carries it. A driver bug announces itself in the driver's own words, not in a build log.
Taught in
The SGLang manual records the four starts and their repairs in the pip install part of its operating page, and the vLLM manual gives the matching entries for the missing compiler and the sampler build.