sglang: [Bug] deadlock or hang on Qwen2-7B models

Checklist

  • 1. I have searched related issues but cannot get the expected help.
  • 2. The bug has not been fixed in the latest version.
  • 3. Please note that if the bug-related issue you submitted lacks corresponding environment info and a minimal reproducible demo, it will be challenging for us to reproduce and resolve the issue, reducing the likelihood of receiving feedback.
  • 4. If the issue you raised is not a bug but a question, please raise a discussion at https://github.com/sgl-project/sglang/discussions/new/choose Otherwise, it will be closed.
  • 5. Please use English, otherwise it will be closed.

Describe the bug

I come across several hangs or deadlocks when running sglang v0.3.0 recently. It both occurs on A100 and A800. I think the stability is still a serious problem for production environment deployment. I hope the core-team could pay more attentions to this problem. It’s quite annoying when crash or hang occurs frequently.

Reproduction

server side:

 python3 -m sglang.launch_server    --model-path Qwen/Qwen2-7B-Instruct \
      --host 0.0.0.0 --port 30000       --tp-size 4 

When I’ved tested it with about 1000 requests, it hangs. The server logging messages don’t refresh again. If I add --disable-cuda-graph --disable-flashinfer-sampling in the launching parameters, it still hangs but less frequently.

Environment

# python3 -m sglang.check_env:

Python: 3.10.14 (main, Apr  6 2024, 18:45:05) [GCC 9.4.0]
CUDA available: True
GPU 0,1,2,3: NVIDIA A100-SXM4-40GB
GPU 0,1,2,3 Compute Capability: 8.0
CUDA_HOME: /usr/local/cuda
NVCC: Cuda compilation tools, release 12.4, V12.4.131
CUDA Driver Version: 525.85.12
PyTorch: 2.4.0+cu121
flashinfer: 0.1.6+cu124torch2.4
triton: 3.0.0
transformers: 4.44.2
requests: 2.32.3
tqdm: 4.66.5
numpy: 1.26.4
aiohttp: 3.10.5
fastapi: 0.112.2
hf_transfer: 0.1.8
huggingface_hub: 0.24.6
interegular: 0.3.3
packaging: 24.1
PIL: 10.4.0
psutil: 6.0.0
pydantic: 2.8.2
uvicorn: 0.30.6
uvloop: 0.20.0
zmq: 26.2.0
vllm: 0.5.5
multipart: 0.0.9
openai: 1.43.0
anthropic: 0.34.1
NVIDIA Topology: 
	GPU0	GPU1	GPU2	GPU3	NIC0	NIC1	CPU Affinity	NUMA Affinity
GPU0	 X 	NV12	NV12	NV12	PXB	SYS	0-63,128-191	0
GPU1	NV12	 X 	NV12	NV12	NODE	SYS	0-63,128-191	0
GPU2	NV12	NV12	 X 	NV12	NODE	SYS	0-63,128-191	0
GPU3	NV12	NV12	NV12	 X 	SYS	NODE	64-127,192-255	1
NIC0	PXB	NODE	NODE	SYS	 X 	SYS		
NIC1	SYS	SYS	SYS	NODE	SYS	 X 		

Legend:

  X    = Self
  SYS  = Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI)
  NODE = Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node
  PHB  = Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU)
  PXB  = Connection traversing multiple PCIe bridges (without traversing the PCIe Host Bridge)
  PIX  = Connection traversing at most a single PCIe bridge
  NV#  = Connection traversing a bonded set of # NVLinks

NIC Legend:

  NIC0: mlx5_0
  NIC1: mlx5_1


ulimit soft: 65536

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 17 (16 by maintainers)

Most upvoted comments

@zeng-zc Your recent crash AttributeError: queue attribute is write-only has been fixed by #1767

@merrymercy Hi, I’ve ran the latest v0.3.4.post1-cu121 image for nearly 5 continuous days, there’s not a single crash or hang. I’ve also tested the dp=2 parameter, it’s nearly runned for 3 days, definitely ok. There’s a good chance that this issue has already been resolved?

@zeng-zc Your recent crash AttributeError: queue attribute is write-only has been fixed by #1767