kvcache-ai / kvcache-ai/ktransformers

启动deepseekv3推理异常

Open
#1,804 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
19.5k
Forks
1.6k
Avg merge
19h 32m
Merged PRs (30d)
27

Description

### Reminder

- [x] I have read the above rules and searched the existing issues.

### System Info

**系统信息:**

**nvidia-smi**
Fri Jan 23 09:00:28 2026
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 570.195.03 Driver Version: 570.195.03 CUDA Version: 12.8 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA L20 Off | 00000000:32:00.0 Off | Off |
| N/A 36C P8 36W / 350W | 22MiB / 49140MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
| 1 NVIDIA L20 Off | 00000000:AC:00.0 Off | 0 |
| N/A 36C P8 34W / 350W | 10MiB / 46068MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| 0 N/A N/A 137613 G /usr/libexec/Xorg 4MiB |
| 0 N/A N/A 137934 G ...c/gnome-remote-desktop-daemon 6MiB |
| 1 N/A N/A 137613 G /usr/libexec/Xorg 4MiB |
+-----------------------------------------------------------------------------------------+

**lscpu**
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 52 bits physical, 57 bits virtual
Byte Order: Little Endian
CPU(s): 208
On-line CPU(s) list: 0-207
Vendor ID: GenuineIntel
BIOS Vendor ID: Intel(R) Corporation
Model name: Intel(R) Xeon(R) Platinum 8470 CPU @2.00GHz
BIOS Model name: Intel(R) Xeon(R) Platinum 8470 CPU @2.00GHz CPU @ 2.0GHz
BIOS CPU family: 179
CPU family: 6
Model: 143
Thread(s) per core: 2
Core(s) per socket: 52
Socket(s): 2
Stepping: 5
CPU(s) scaling MHz: 22%
CPU max MHz: 3800.0000
CPU min MHz: 800.0000
BogoMIPS: 4000.00
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 intel_ppin cdp_l2 ssbdmba ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req vnmi avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear
serialize tsxldtrk pconfig arch_lbr ibt amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities
Virtualization features:
Virtualization: VT-x
Caches (sum of all):
L1d: 4.9 MiB (104 instances)
L1i: 3.3 MiB (104 instances)
L2: 208 MiB (104 instances)
L3: 210 MiB (2 instances)
NUMA:
NUMA node(s): 5
NUMA node0 CPU(s): 0-51,104-155
NUMA node1 CPU(s): 52-103,156-207
NUMA node2 CPU(s):
NUMA node3 CPU(s):
NUMA node4 CPU(s):
Vulnerabilities:
Gather data sampling: Not affected
Itlb multihit: Not affected
L1tf: Not affected
Mds: Not affected
Meltdown: Not affected
Mmio stale data: Not affected
Reg file data sampling: Not affected
Retbleed: Not affected
Spec rstack overflow: Not affected
Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Spectre v2: Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW sequence; BHI BHI_DIS_S
Srbds: Not affected
Tsx async abort: Not affected

**执行命令:**
python -m sglang.launch_server \
--host 0.0.0.0 \
--port 30001 \
--model /home/models/DeepSeekV3 \
--kt-weight-path /home/models/DeepSeekV3-CPU-Int8 \
--kt-cpuinfer 80 \
--kt-threadpool-count 2 \
--kt-num-gpu-experts 2 \
--kt-method AMXINT8 \
--trust-remote-code \
--mem-fraction-static 0.9 \
--served-model-name deepseek3 \
--enable-mixed-chunk \
--tensor-parallel-size 2 \
--enable-p2p-check \
--disable-shared-experts-fusion \
--chunked-prefill-size 4096 \
--max-total-tokens 10000 \
--max-running-requests 10 \
--attention-backend triton

### Reproduction

```text
TP Load from loader
[2026-01-23 09:10:36 TP0] Load weight end. type=DeepseekV3ForCausalLM, dtype=torch.bfloat16, avail mem=33.80 GB, mem usage=13.06 GB.
[2026-01-23 09:10:36 TP0] Using KV cache dtype: torch.bfloat16
[2026-01-23 09:10:36 TP0] KV Cache is allocated. #tokens: 10000, KV size: 0.65 GB
[2026-01-23 09:10:36 TP0] Memory pool end. avail mem=33.08 GB
[2026-01-23 09:10:36 TP1] KV Cache is allocated. #tokens: 10000, KV size: 0.65 GB
[2026-01-23 09:10:36 TP1] Memory pool end. avail mem=30.11 GB
[2026-01-23 09:10:37 TP1] Capture cuda graph begin. This can take up to several minutes. avail mem=30.10 GB
[2026-01-23 09:10:37 TP0] Capture cuda graph begin. This can take up to several minutes. avail mem=33.07 GB
[2026-01-23 09:10:37 TP0] Capture cuda graph bs [1, 2, 4, 8, 10]
Capturing batches (bs=10 avail_mem=33.05 GB): 0%| | 0/5 [00:00", line 0, in start_thread
File "", line 0, in __GI___clone3
File "", line 0, in 0xffffffffffffffff

!!!!!!! Segfault encountered !!!!!!!
File "../../../../../libstdc++-v3/src/c++11/thread.cc", line 104, in execute_native_thread_routine
File "", line 0, in start_thread
File "", line 0, in __GI___clone3
File "", line 0, in 0xffffffffffffffff

[2026-01-23 09:10:40] Rank 0 scheduler is dead. Please check if there are relevant logs.
[rank1]:[W123 09:10:40.029953638 TCPStore.cpp:125] [c10d] recvValue failed on SocketImpl(fd=59, addr=[localhost]:48516, remote=[localhost]:30573): Connection reset by peer
Exception raised from recvBytes at /pytorch/torch/csrc/distributed/c10d/Utils.hpp:679 (most recent call first):
frame #0: c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string, std::allocator >) + 0x80 (0x7f6d9797cb80 in /home/miniconda3/envs/kt-kernel-main/lib/python3.11/site-packages/torch/lib/libc10.so)
frame #1: + 0x5ffc5b1 (0x7f6d813fc5b1 in /home/miniconda3/envs/kt-kernel-main/lib/python3.11/site-packages/torch/lib/libtorch_cpu.so)
frame #2: + 0x5ffda13 (0x7f6d813fda13 in /home/miniconda3/envs/kt-kernel-main/lib/python3.11/site-packages/torch/lib/libtorch_cpu.so)
frame #3: + 0x5ffe55a (0x7f6d813fe55a in /home/miniconda3/envs/kt-kernel-main/lib/python3.11/site-packages/torch/lib/libtorch_cpu.so)
frame #4: c10d::TCPStore::check(std::vector, std::allocator >, std::allocator, std::allocator > > > const&) + 0x31e (0x7f6d813f927e in /home/miniconda3/envs/kt-kernel-main/lib/python3.11/site-packages/torch/lib/libtorch_cpu.so)
frame #5: c10d::ProcessGroupNCCL::HeartbeatMonitor::runLoop() + 0x3c8 (0x7f6d3fe55868 in /home/miniconda3/envs/kt-kernel-main/lib/python3.11/site-packages/torch/lib/libtorch_cuda.so)
frame #6: + 0xef5e4 (0x7f6f206ef5e4 in /home/miniconda3/envs/kt-kernel-main/bin/../lib/libstdc++.so.6)
frame #7: + 0x875d5 (0x7f6f308875d5 in /lib64/libc.so.6)
frame #8: + 0x1091bc (0x7f6f309091bc in /lib64/libc.so.6)

[rank1]:[W123 09:10:45.052344965 ProcessGroupNCCL.cpp:1771] [PG ID 0 PG GUID 0 Rank 1] Failed to check the "should dump" flag on TCPStore, (maybe TCPStore server has shut down too early), with error: Broken pipe
[rank1]:[W123 09:10:46.052467520 TCPStore.cpp:106] [c10d] sendBytes failed on SocketImpl(fd=59, addr=[localhost]:48516, remote=[localhost]:30573): Broken pipe
Exception raised from sendBytes at /pytorch/torch/csrc/distributed/c10d/Utils.hpp:653 (most recent call first):
frame #0: c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string, std::allocator >) + 0x80 (0x7f6d9797cb80 in /home/miniconda3/envs/kt-kernel-main/lib/python3.11/site-packages/torch/lib/libc10.so)
frame #1: + 0x5ffc5b1 (0x7f6d813fc5b1 in /home/miniconda3/envs/kt-kernel-main/lib/python3.11/site-packages/torch/lib/libtorch_cpu.so)
frame #2: + 0x5ffce42 (0x7f6d813fce42 in /home/miniconda3/envs/kt-kernel-main/lib/python3.11/site-packages/torch/lib/libtorch_cpu.so)
frame #3: + 0x5ffe94e (0x7f6d813fe94e in /home/miniconda3/envs/kt-kernel-main/lib/python3.11/site-packages/torch/lib/libtorch_cpu.so)
frame #4: c10d::TCPStore::check(std::vector, std::allocator >, std::allocator, std::allocator > > > const&) + 0x30e (0x7f6d813f926e in /home/miniconda3/envs/kt-kernel-main/lib/python3.11/site-packages/torch/lib/libtorch_cpu.so)
frame #5: c10d::ProcessGroupNCCL::HeartbeatMonitor::runLoop() + 0x3c8 (0x7f6d3fe55868 in /home/miniconda3/envs/kt-kernel-main/lib/python3.11/site-packages/torch/lib/libtorch_cuda.so)
frame #6: + 0xef5e4 (0x7f6f206ef5e4 in /home/miniconda3/envs/kt-kernel-main/bin/../lib/libstdc++.so.6)
frame #7: + 0x875d5 (0x7f6f308875d5 in /lib64/libc.so.6)
frame #8: + 0x1091bc (0x7f6f309091bc in /lib64/libc.so.6)

[rank1]:[W123 09:10:50.071078888 ProcessGroupNCCL.cpp:1771] [PG ID 0 PG GUID 0 Rank 1] Failed to check the "should dump" flag on TCPStore, (maybe TCPStore server has shut down too early), with error: Broken pipe
[rank1]:[W123 09:10:51.071184731 TCPStore.cpp:106] [c10d] sendBytes failed on SocketImpl(fd=59, addr=[localhost]:48516, remote=[localhost]:30573): Broken pipe
Exception raised from sendBytes at /pytorch/torch/csrc/distributed/c10d/Utils.hpp:653 (most recent call first):
frame #0: c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string, std::allocator >) + 0x80 (0x7f6d9797cb80 in /home/miniconda3/envs/kt-kernel-main/lib/python3.11/site-packages/torch/lib/libc10.so)
frame #1: + 0x5ffc5b1 (0x7f6d813fc5b1 in /home/miniconda3/envs/kt-kernel-main/lib/python3.11/site-packages/torch/lib/libtorch_cpu.so)
frame #2: + 0x5ffce42 (0x7f6d813fce42 in /home/miniconda3/envs/kt-kernel-main/lib/python3.11/site-packages/torch/lib/libtorch_cpu.so)
frame #3: + 0x5ffe94e (0x7f6d813fe94e in /home/miniconda3/envs/kt-kernel-main/lib/python3.11/site-packages/torch/lib/libtorch_cpu.so)
frame #4: c10d::TCPStore::check(std::vector, std::allocator >, std::allocator, std::allocator > > > const&) + 0x30e (0x7f6d813f926e in /home/miniconda3/envs/kt-kernel-main/lib/python3.11/site-packages/torch/lib/libtorch_cpu.so)
frame #5: c10d::ProcessGroupNCCL::HeartbeatMonitor::runLoop() + 0x3c8 (0x7f6d3fe55868 in /home/miniconda3/envs/kt-kernel-main/lib/python3.11/site-packages/torch/lib/libtorch_cuda.so)
frame #6: + 0xef5e4 (0x7f6f206ef5e4 in /home/miniconda3/envs/kt-kernel-main/bin/../lib/libstdc++.so.6)
frame #7: + 0x875d5 (0x7f6f308875d5 in /lib64/libc.so.6)
frame #8: + 0x1091bc (0x7f6f309091bc in [/lib64/libc.so.6)](url)

[rank1]:[W123 09:10:55.089077747 ProcessGroupNCCL.cpp:1771] [PG ID 0 PG GUID 0 Rank 1] Failed to check the "should dump" flag on TCPStore, (maybe TCPStore server has shut down too early), with error: Broken pipe
[rank1]:[W123 09:10:56.089180871 TCPStore.cpp:106] [c10d] sendBytes failed on SocketImpl(fd=59, addr=[localhost]:48516, remote=[localhost]:30573): Broken pipe
Exception raised from sendBytes at /pytorch/torch/csrc/distributed/c10d/Utils.hpp:653 (most recent call first):
frame #0: c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string, std::allocator >) + 0x80 (0x7f6d9797cb80 in /home/miniconda3/envs/kt-kernel-main/lib/python3.11/site-packages/torch/lib/libc10.so)
frame #1: + 0x5ffc5b1 (0x7f6d813fc5b1 in /home/miniconda3/envs/kt-kernel-main/lib/python3.11/site-packages/torch/lib/libtorch_cpu.so)
frame #2: + 0x5ffce42 (0x7f6d813fce42 in /home/miniconda3/envs/kt-kernel-main/lib/python3.11/site-packages/torch/lib/libtorch_cpu.so)
frame #3: + 0x5ffe94e (0x7f6d813fe94e in /home/miniconda3/envs/kt-kernel-main/lib/python3.11/site-packages/torch/lib/libtorch_cpu.so)
frame #4: c10d::TCPStore::check(std::vector, std::allocator >, std::allocator, std::allocator > > > const&) + 0x30e (0x7f6d813f926e in /home/miniconda3/envs/kt-kernel-main/lib/python3.11/site-packages/torch/lib/libtorch_cpu.so)
frame #5: c10d::ProcessGroupNCCL::HeartbeatMonitor::runLoop() + 0x3c8 (0x7f6d3fe55868 in /home/miniconda3/envs/kt-kernel-main/lib/python3.11/site-packages/torch/lib/libtorch_cuda.so)
frame #6: + 0xef5e4 (0x7f6f206ef5e4 in /home/miniconda3/envs/kt-kernel-main/bin/../lib/libstdc++.so.6)
frame #7: + 0x875d5 (0x7f6f308875d5 in /lib64/libc.so.6)
frame #8: + 0x1091bc (0x7f6f309091bc in /lib64/libc.so.6)

[rank1]:[W123 09:10:56.092644748 ProcessGroupNCCL.cpp:1771] [PG ID 0 PG GUID 0 Rank 1] Failed to check the "should dump" flag on TCPStore, (maybe TCPStore server has shut down too early), with error: Broken pipe
[2026-01-23 09:10:56] Exit code: -11
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/home/code/sglang/python/sglang/launch_server.py", line 32, in
run_server(server_args)
File "/home/code/sglang/python/sglang/launch_server.py", line 25, in run_server
launch_server(server_args)
File "/home/code/sglang/python/sglang/srt/entrypoints/http_server.py", line 1697, in launch_server
_launch_subprocesses(
File "/home/code/sglang/python/sglang/srt/entrypoints/engine.py", line 996, in _launch_subprocesses
scheduler_infos = _wait_for_scheduler_ready(scheduler_pipe_readers, scheduler_procs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/code/sglang/python/sglang/srt/entrypoints/engine.py", line 830, in _wait_for_scheduler_ready
data = scheduler_pipe_readers[i].recv()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/miniconda3/envs/kt-kernel-main/lib/python3.11/multiprocessing/connection.py", line 250, in recv
buf = self._recv_bytes()
^^^^^^^^^^^^^^^^^^
File "/home/miniconda3/envs/kt-kernel-main/lib/python3.11/multiprocessing/connection.py", line 430, in _recv_bytes
buf = self._recv(4)
^^^^^^^^^^^^^
File "/home/miniconda3/envs/kt-kernel-main/lib/python3.11/multiprocessing/connection.py", line 399, in _recv
raise EOFError
EOFError

```

### Others

_No response_

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with the provided sglang.launch_server command on the listed L20 and CUDA setup. Start at CUDA graph capture and inspect the PyTorch Inductor worker traceback in torch/_inductor/compile_worker/subproc_pool.py, along with the missing FP8 configuration paths under sglang/srt/layers/quantization/configs. Done means the DeepSeekV3 server starts without the segmentation fault when the command is rerun.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
ai, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.