트러블슈팅과 FAQ
트러블슈팅과 FAQ
기여를 환영해요. 자유롭게 내용을 추가해 주세요.
1. PD 분리에서 GLOO op.preamble.length <= op.nbytes 엔진 컨텍스트 손상
오류 메시지
[2026-04-07 13:24:13 TP0] Decode batch, #running-req: 10, #token: 485248, token usage: 0.94, pre-allocated usage: 0.51, #prealloc-req: 1, #transfer-req: 12, #retracted-req: 0, npu graph: True, gen throughput (token/s): 259.82, #queue-req: 0
[2026-04-07 13:24:13 TP0] Context corruption detected: Request 3b5dcfe1575d4e1f9b18c953de878a93 (bootstrap_room=7451500070298748792) received metadata from bootstrap_room=4125156593077881415. Metadata buffer index: 1. This indicates metadata buffer index collision.
[2026-04-07 13:24:13] INFO: 127.0.0.1:59272 - "POST /v1/chat/completions HTTP/1.1" 200 OK
[2026-04-07 13:24:13] INFO: 127.0.0.1:34000 - "POST /v1/chat/completions HTTP/1.1" 200 OK
terminate called after throwing an instance of 'gloo::EnforceNotMet'
what(): [enforce fail at /pytorch/third_party/gloo/gloo/transport/tcp/pair.cc:456] op.preamble.length <= op.nbytes. 4 vs 3
Fatal Python error: Aborted
Thread 0x0000fff873f6f120 (most recent call first):
File "/usr/local/python3.11.14/lib/python3.11/site-packages/sglang/srt/disaggregation/mooncake/conn.py", line 1499 in heartbeat_checker
원인
(아마 정확히 파악되진 않았지만) 고동시성의 긴 시퀀스가 전송 버퍼를 가득 채워 버퍼 인덱스 충돌과 데이터 손상을 일으켜요.
해결 방법
- Prefill 노드에서
--disable-overlap-schedule로 오버랩 스케줄링을 끄세요. PD 분리의 Prefill 노드는 오버랩을 켜면 안 돼요. 오버랩을 켜면 타이밍 문제가 생겨 Decode 노드가 순서에 어긋난 데이터를 받을 수 있어요. - 오버랩을 꺼도 멀티-Prefill 노드의 고동시성 긴 시퀀스 시나리오에서는 낮은 확률로 이 문제가 여전히 나타날 수 있어요. 아직 해결되지 않은 알려진 이슈예요.
2. 그래프 모드에서 aclnnInplaceFillScalar 오류
오류 메시지
(SGLangEngine pid=3872176) [rank0]:[E414 12:14:41.204711510 compiler_depend.ts:444] operator():build/CMakeFiles/torch_npu.dir/compiler_depend.ts:26 NPU function error:
call aclnnInplaceFillScalar failed, error code is 507000
(SGLangEngine pid=3872176) [ERROR] 2026-04-14-12:14:41 (PID:3874122, Device:0, RankID:-1) ERR00100 PTA call acl api failed
(SGLangEngine pid=3872176) [Error]: An internal error occurs in the runtime module on the host.
(SGLangEngine pid=3872176) Rectify the fault based on the error information in the ascend log.
(SGLangEngine pid=3872176) [PID: 3874122] 2026-04-14-12:14:41.897.548 AclNN_Runtime_Error(EZ9903): aclrtLaunchKerneWithHostArgs failed, return: 507000
(SGLangEngine pid=3872176) Solution: In this scenario, collect the plog when the fault occurs and locate the fault based on the plog.
...
(큰 오류 로그는 생략 — 전체 원문은 출처에서 확인)
원인
캡처된 그래프가 너무 많아서 그래프 모드의 업데이트 스트림에서 충돌이 발생해요. 각 그래프는 별도 스트림에 배치되지만 스트림 수는 제한되어 있어요. 그래프를 너무 많이 캡처하면 충돌이 생겨요.
해결 방법
- CANN 8.5 + TorchNPU 2.8 버전이면 이 문제가 해결됐어야 해요.
- 버전이 맞지 않으면 캡처된 그래프 수를 10개 이하로 줄이세요.
3. alloc_extend_kernel 오류
오류 메시지
[ERROR] RUNTIME(164629,):2026-04-14-05:34:12.383.929 [stream.cc:1335]170327 GetError:[AIC_INFO] after execute:args print end
[ERROR] RUNTIME(164629,):2026-04-14-05:34:12.383.936 stream.cc:13351170327 GetError: DFX INFO1Aicore kernel execute failed, device id=13, stream id=43, report stream id=43, task id=13145, tlip num=56,
fault kernel_name=alloc_extend_kernel_18, ault kernel info ext=alloc_extend_kernel, program id=141, hash=14069671779787989248.
[ERROR] RUNTIME(164629,):2026-04-14-05:34:12.383.943 [stream.cc:3549]170327 EnterFailureAbort:stream id=43 enter failure abort.
[ERROR] RUNTIME(164629,):2026-04-14-05:34:12.383.973 [stars_engine.cc:1427]170327 StarsResumeRtsa:stop scheduling in abort failure mode: stream id=43, sq id=6,sq head=801, task id=13145, taskType=66.
[ERROR] RUNTIME(164629,):2026-04-14-05:34:12.383.972 [stream.cc:1463]164629 SynchronizeExecutedTask:context is abort, status=0x715005e.
[ERROR] RUNTIME(164629,):2026-04-14-05:34:12.383.978 [stream.cc:1516]164629 Synchronizelmpl:failed, stream_id=43, error=0x715005e
[ERROR] RUNTIME(164629,):2026-04-14-05:34:12.383.982 [api error.cc:1015]164629 StreamSynchronize:Stream synchronize failed, stream_id=43, timeout=-1ms.
[ERROR] RUNTIME(164629,):2026-04-14-05:34:12.383.991 [apic stream.cc:154]164629 rtStreamSynchronize:ErrCode=507035, desc=[vector core exception], InnerCode=0x715005e
[ERROR] RUNTIME(164629,):2026-04-14-05:34:12.383.997 [error_message_manage.cc:61]164629 FuncErrorReason:rtStreamSynchronize execution failed, reason=vector core exception
[ERROR] ASCENDCL(164629,):2026-04-14-05:34:12.384.269 [stream.cpp:140]164629 acIrtSynchronizeStreamImpl:synchronize stream failed, runtime result = 507035
핵심 로그 라인을 전달하면 이렇게 보여요.
fault kernel_name=alloc_extend_kernel_18— 실패한 커널이alloc_extend_kernel이라는 뜻RuntimeError: ACL stream synchronize failed, error code:507035— vector core 예외로 스트림 동기화 실패aivec error— 디바이스의 벡터 코어에서 오류 발생
원인
alloc_extend_kernel 연산자에 메모리 할당 문제가 있는 것으로 보여요. 아직 해결 전이에요.
해결 방법
sglang/srt/hardware_backend/npu/allocator_npu.py를 수정해서 문제가 있는 분기를 주석 처리하고 대신 else 분기를 사용하세요.
def alloc_extend(
self,
prefix_lens: torch.Tensor,
prefix_lens_cpu: torch.Tensor,
seq_lens: torch.Tensor,
seq_lens_cpu: torch.Tensor,
last_loc: torch.Tensor,
extend_num_tokens: int,
num_new_pages: int = None,
):
...
if num_new_pages_item > len(self.free_pages):
return None
# if num_new_pages_item < 200:
# from sgl_kernel_npu.mem_cache.allocator import alloc_extend_kernel
# out_indices = torch.empty(
# (extend_num_tokens,),
# dtype=torch.int64,
# device=self.device,
# )
# max_num_extend_tokens = next_power_of_2(extend_num_tokens)
# bs = prefix_lens.shape[0]
# alloc_extend_kernel[(bs,)](
# prefix_lens,
# seq_lens,
# last_loc,
# self.free_pages,
# out_indices,
# next_power_of_2(bs),
# self.page_size,
# max_num_extend_tokens,
# )
# else:
out_indices = torch.empty(
(extend_num_tokens,),
dtype=torch.int32,
device=self.device,
)
...
즉, 커널 기반의 alloc_extend_kernel 호출 분기를 주석 처리하고, 순수 PyTorch 방식(else 분기)으로 대체하면 메모리 할당 문제를 우회할 수 있어요.
4. NPU 메모리 부족 (Out of NPU memory)
File "/home/code/sglang/python/sglang/srt/model_executor/pool_configurator.py", line 175, in calculate_pool_sizes
return MemoryPoolConfig(max_total_num_tokens=max_total_num_tokens)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<string>", line 8, in __init__
File "/home/code/sglang/python/sglang/srt/model_executor/pool_configurator.py", line 44, in __post_init__
raise RuntimeError(msg)
RuntimeError: Not enough memory. Please try to increase --mem-fraction-static.
해결 방법
먼저 npu-smi info 명령으로 NPU 메모리 사용량을 확인하세요.
NPU가 다른 프로세스에 점유됐다면 --base-gpu-id로 시작 디바이스 인덱스를 지정하세요.
NPU가 점유되지 않았다면 --tp로 여러 디바이스에 배포하거나, --mem-fraction-static 값을 높여서 KV 캐시 메모리 사용량을 줄이세요. 자세한 튜닝 지침은 하이퍼파라미터 튜닝을 보세요.
5. sgl-kernel-npu 업데이트 방법
해결 방법
git clone https://github.com/sgl-project/sgl-kernel-npu.git
source /usr/local/Ascend/ascend-toolkit/set_env.sh
cd sgl-kernel-npu
# Building Project
bash build.sh
pip install output/sgl_kernel_npu*.whl --force-reinstall
# (Optional) Confirm whether the import can be successfully
python -c "import sgl_kernel_npu; print(sgl_kernel_npu.__path__)"
rm -rf sgl-kernel-npu
6. HuggingFace 데이터셋 다운로드 시 [Errno 101] Network is unreachable
오류 메시지
'[Errno 101] Network is unreachable' thrown while requesting HEAD https://huggingface.co/datasets/anon8231489123/ShareGPT_Vicuna_unfiltered/resolve/main/ShareGPT_V3_unfiltered_cleaned_split.json
Retrying in 1s [Retry 1/5].
Traceback (most recent call last):
File "/usr/local/python3.11.14/lib/python3.11/site-packages/sglang/bench_serving.py", line 2353, in <module>
...
RuntimeError: Cannot send a request, as the client has been closed.
[ERROR] 2026-05-18-11:58:31 (PID:215, Device:-1, RankID:-1) ERR99999 UNKNOWN application exception
(전체 트레이스는 생략 — 출처에서 확인)
원인
방화벽, 프록시, 또는 지역별 접근 제한** 때문에 머신이 HuggingFace 서버에 직접 접근하지 못해요.
해결 방법
-
HF 미러 사이트 사용 —
HF_ENDPOINT환경 변수를 미러(예: hf-mirror.com)로 설정하세요:export HF_ENDPOINT=https://hf-mirror.com -
프록시 사용 — HTTP 프록시가 있다면:
export http_proxy=http://your-proxy:port export https_proxy=http://your-proxy:port -
데이터셋 수동 다운로드 — 인터넷이 되는 머신에서 파일을 내려받아 타깃 머신으로 옮기고,
--dataset-path로 로컬 파일 경로를 지정하세요:python -m sglang.bench_serving \ --dataset-name random \ --dataset-path /path/to/ShareGPT_V3_unfiltered_cleaned_split.json \ ...
7. 예상치 못한 fp8 타입
원인
FP8 모델이 지원되지 않아요.
해결 방법
모델 가중치를 교체하세요. 예를 들어 Qwen/Qwen3.5-27B-FP8을 Eco-Tech/Qwen3.5-27B-w8a8-mtp로 바꾸세요.
8. Docker 이미지 버전: 안정 릴리스 vs. 일일 빌드
Ascend NPU용 Docker 이미지는 두 종류가 있어요.
- 안정 릴리스(stable release) — 특정 태그로 검증된 버전. 예:
quay.io/ascend/sglang:cann9.0.0-a3-v0.5.16. 프로덕션 배포에 권장돼요. - 일일 빌드(daily build) — 최신 개발 변경 포함. 예:
quay.io/ascend/sglang:main-cann8.5.0-a3. 아직 안정 릴리스에 들어가지 않은 최신 기능이나 버그 수정이 필요하면 이걸 쓰세요.
안정 릴리스에서 문제가 생기면 일일 빌드로 바꿔서 최신 개발 버전에서 해결됐는지 확인해 보세요.