Issues / #2389

#2389 Engine fails to start on WSL2 — "native embedding: cannot pin 322 MiB: no

open · @h8an6s · 0 commentaires · Sur GitHub

BenchmarksServer & APINVIDIA / CUDAModels & quantsSecurityWindowsLinux

Description

Environment: Windows host + WSL2 (Ubuntu, kernel 6.18.54.1-microsoft-standard-WSL2), RTX 4090 24GB,
driver 615.78.05 (CUDA UMD 13.4), CUDA toolkit 12.4 (failed build) / 13.3 (resolved build), GCC 15.2, WSL RAM 56GB.

Bug: Engine 0.1.43.1 / 0.1.44.1 source (built with CUDA 12.4) exits before ready on every start:
  native embedding: cannot pin 322 MiB: no CUDA-capable device is detected, nor place it in VRAM
at src/core/native_head.cpp:151 — cudaHostAlloc(cudaHostAllocMapped | cudaHostAllocPortable) returns
cudaErrorNoDevice on WSL2; the cudaMalloc+memcpy fallback also fails.

Not a system-level CUDA issue: nvidia-smi OK, /dev/dxg exists, plain CUDA programs return count=1,
cuInit OK, cudaHostAlloc(Mapped|Portable, 322MB) succeeds standalone (single / parallel / threaded).
Vision encoder (GPU build) loads fine. Only the engine start path fails. Direct engine run (bypassing
server.py, with --native) reproduces → not server.py env injection (an earlier hypothesis, ruled out).

Community contrast: bench/results/2026-10-09-community-rtx-5060ti-wsl2-iq3_s-0141/ runs on engine
0.1.41 + CUDA 13.0. Repo also has bench/results/2026-10-07-community-rtx-5080-docker-wsl2 with the
same "no CUDA-capable device" log → not isolated to us.

Resolution (verified locally): update source to latest main 296b59d2 (> v0.1.44.1) + rebuild with
CUDA toolkit 13.3 (13.0 + GCC 15.2 hits mathcalls.h rsqrt noexcept conflict; 13.3 fixes it). Engine
then starts fine: 7,671 expert slots cached, decode ~106 tok/s, long-prompt prefill ~1,357 tok/s.

Suggestions:
1. The error message is misleading — the device enumerates fine; only cudaHostAlloc(Mapped|Portable)
   fails on WSL2. Print cudaGetErrorString / device count, and detect WSL2 (e.g. /dev/dxg).
2. Provide a pure host-memory / mmap fallback for native embedding when the WSL2 driver pinned budget
   (~1 GiB, per the author's own comment) is exhausted.
3. Version-regression suspicion: 0.1.41 works, 0.1.43.1/0.1.44.1 fail — please review native_head /
   embedding init changes between 0.1.42 → 0.1.43.

Note: source version and CUDA build version changed together; single-variable isolation not fully
done, but the combination is stably reproducible.

Sur le site

Liens install, modèles, releases.