Skip to content

[Bug]: corrupted double-linked list (not small) Aborted #16412

@qiuhaining

Description

@qiuhaining

Your current environment

The output of `python collect_env.py`
INFO 04-10 23:23:46 [__init__.py:239] Automatically detected platform cuda.
Collecting environment information...
PyTorch version: 2.6.0+cu124
Is debug build: False
CUDA used to build PyTorch: 12.4
ROCM used to build PyTorch: N/A

OS: Ubuntu 20.04.6 LTS (x86_64)
GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
Clang version: Could not collect
CMake version: version 3.16.3
Libc version: glibc-2.31

Python version: 3.12.9 | packaged by Anaconda, Inc. | (main, Feb  6 2025, 18:56:27) [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-4.18.0-193.6.3.el8_2.v1.4.x86_64-x86_64-with-glibc2.31
Is CUDA available: True
CUDA runtime version: 12.1.105
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration: 
GPU 0: NVIDIA RTX A6000
GPU 1: NVIDIA RTX A6000
GPU 2: NVIDIA RTX A6000
GPU 3: NVIDIA RTX A6000

Nvidia driver version: 470.129.06
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.9.0
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.9.0
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.9.0
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.9.0
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.9.0
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.9.0
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.9.0
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian
Address sizes:                   46 bits physical, 57 bits virtual
CPU(s):                          128
On-line CPU(s) list:             0-127
Thread(s) per core:              2
Core(s) per socket:              32
Socket(s):                       2
NUMA node(s):                    2
Vendor ID:                       GenuineIntel
CPU family:                      6
Model:                           106
Model name:                      Intel(R) Xeon(R) Platinum 8352Y CPU @ 2.20GHz
Stepping:                        6
CPU MHz:                         2200.004
CPU max MHz:                     3400.0000
CPU min MHz:                     800.0000
BogoMIPS:                        4400.00
Virtualization:                  VT-x
L1d cache:                       3 MiB
L1i cache:                       2 MiB
L2 cache:                        80 MiB
L3 cache:                        96 MiB
NUMA node0 CPU(s):               0-31,64-95
NUMA node1 CPU(s):               32-63,96-127
Vulnerability Itlb multihit:     Not affected
Vulnerability L1tf:              Not affected
Vulnerability Mds:               Not affected
Vulnerability Meltdown:          Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:        Mitigation; Enhanced IBRS, IBPB conditional, RSB filling
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Not affected
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 pni pclmulqdq dtes64 monitor 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 invpcid_single ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid 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 wbnoinvd dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid md_clear pconfig flush_l1d arch_capabilities

Versions of relevant libraries:
[pip3] numpy==1.26.4
[pip3] nvidia-cublas-cu12==12.4.5.8
[pip3] nvidia-cuda-cupti-cu12==12.4.127
[pip3] nvidia-cuda-nvrtc-cu12==12.4.127
[pip3] nvidia-cuda-runtime-cu12==12.4.127
[pip3] nvidia-cudnn-cu12==9.1.0.70
[pip3] nvidia-cufft-cu12==11.2.1.3
[pip3] nvidia-curand-cu12==10.3.5.147
[pip3] nvidia-cusolver-cu12==11.6.1.9
[pip3] nvidia-cusparse-cu12==12.3.1.170
[pip3] nvidia-cusparselt-cu12==0.6.2
[pip3] nvidia-nccl-cu12==2.21.5
[pip3] nvidia-nvjitlink-cu12==12.4.127
[pip3] nvidia-nvtx-cu12==12.4.127
[pip3] pyzmq==26.2.0
[pip3] torch==2.6.0
[pip3] torchaudio==2.6.0
[pip3] torchvision==0.21.0
[pip3] transformers==4.51.1
[pip3] triton==3.2.0
[pip3] vector-quantize-pytorch==1.17.1
[conda] numpy                     1.26.4                   pypi_0    pypi
[conda] nvidia-cublas-cu12        12.4.5.8                 pypi_0    pypi
[conda] nvidia-cuda-cupti-cu12    12.4.127                 pypi_0    pypi
[conda] nvidia-cuda-nvrtc-cu12    12.4.127                 pypi_0    pypi
[conda] nvidia-cuda-runtime-cu12  12.4.127                 pypi_0    pypi
[conda] nvidia-cudnn-cu12         9.1.0.70                 pypi_0    pypi
[conda] nvidia-cufft-cu12         11.2.1.3                 pypi_0    pypi
[conda] nvidia-curand-cu12        10.3.5.147               pypi_0    pypi
[conda] nvidia-cusolver-cu12      11.6.1.9                 pypi_0    pypi
[conda] nvidia-cusparse-cu12      12.3.1.170               pypi_0    pypi
[conda] nvidia-cusparselt-cu12    0.6.2                    pypi_0    pypi
[conda] nvidia-nccl-cu12          2.21.5                   pypi_0    pypi
[conda] nvidia-nvjitlink-cu12     12.4.127                 pypi_0    pypi
[conda] nvidia-nvtx-cu12          12.4.127                 pypi_0    pypi
[conda] pyzmq                     26.2.1                   pypi_0    pypi
[conda] torch                     2.6.0                    pypi_0    pypi
[conda] torchaudio                2.6.0                    pypi_0    pypi
[conda] torchvision               0.21.0                   pypi_0    pypi
[conda] transformers              4.51.1                   pypi_0    pypi
[conda] triton                    3.2.0                    pypi_0    pypi
[conda] vector-quantize-pytorch   1.17.1                   pypi_0    pypi
ROCM Version: Could not collect
Neuron SDK Version: N/A
vLLM Version: 0.8.3
vLLM Build Flags:
CUDA Archs: Not Set; ROCm: Disabled; Neuron: Disabled
GPU Topology:
	�[4mGPU0	GPU1	GPU2	GPU3	mlx5_0	mlx5_1	CPU Affinity	NUMA Affinity�[0m
GPU0	 X 	PIX	PXB	PXB	NODE	NODE	0-31,64-95	0
GPU1	PIX	 X 	PXB	PXB	NODE	NODE	0-31,64-95	0
GPU2	PXB	PXB	 X 	PXB	NODE	NODE	0-31,64-95	0
GPU3	PXB	PXB	PXB	 X 	NODE	NODE	0-31,64-95	0
mlx5_0	NODE	NODE	NODE	NODE	 X 	PIX		
mlx5_1	NODE	NODE	NODE	NODE	PIX	 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

CUDA_PATH=/usr/local/cuda
LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/openmpi/lib:/usr/lib/x86_64-linux-gnu/openmpi/lib:/usr/lib/x86_64-linux-gnu/openmpi/lib:/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/usr/local/cuda/compat/lib:/usr/local/cuda/lib64
CUDA_HOME=/usr/local/cuda
CUDA_HOME=/usr/local/cuda
NCCL_CUMEM_ENABLE=0
PYTORCH_NVML_BASED_CUDA_CHECK=1
TORCHINDUCTOR_COMPILE_THREADS=1
CUDA_MODULE_LOADING=LAZY


🐛 Describe the bug

On the server side, I deployed the Qwen2.5-32B-Instruct-GPTQ-Int8 model using vLLM on a machine with 4 A6000 GPUs. On the client side, I access the server concurrently with a concurrency level of 3. Each access involves a prompt of about 30,000 bytes. Initially, everything works fine, but suddenly errors occur, such as: "corrupted double-linked list (not small) Aborted," or other errors like "free()" and so on

client

async def get_driver_labels_with_LLM(llm_server_url, prompt_template, input_str_groups):
    prompts = []
    prompt = prompt_template.replace("{asr_info_str}", input_str_groups)
    prompts.append(prompt)
    time.sleep(0.15)
    data = {"prompts": prompts,  "temperature": temperature, "max_new_tokens": max_new_tokens, "top_p": top_p, "top_k": top_k, "repetition_penalty": repetition_penalty}
    resp = requests.post(llm_server_url, json=data)
    if resp.status_code == 200:
        llm_response = resp.json()
        # think = llm_response["generated_texts"].split("</think>")[0]
        # result = llm_response["generated_texts"].split("</think>")[1]
        result = llm_response["generated_texts"]
    else:
        print(name + f" llm response {str(resp.status_code)}")
    return result

async def process_text_async(llm_server_url, prompt_template, input_str_groups):
    # 创建异步任务列表
    semaphore = asyncio.Semaphore(3)
    # chunked_list = [input_str_groups[i:i+10] for i in range(0, len(input_str_groups), 10)]
    tasks = [get_driver_labels_with_LLM(llm_server_url, prompt_template, input_str) for input_str in input_str_groups]
    print("task nums ", len(tasks))
    bounded_tasks = [bounded_task(semaphore, task) for task in tasks]
    t1 = time.time()
    results = await asyncio.gather(*bounded_tasks, return_exceptions=True)
    print(time.time() - t1, results)
    return results

server

from flask import Flask, request, jsonify
from transformers import AutoTokenizer
from vllm import LLM, SamplingParams

# 初始化 Flask 应用
app = Flask(__name__)
# Pass the default decoding hyperparameters of Qwen2.5-7B-Instruct
# max_tokens is for the maximum length for generation.
# 定义路由和请求方法
@app.route('/generate', methods=['POST'])
def generate_text():
    try:
        # 获取请求数据
        data = request.json
        prompts = data.get('prompts', [])  # 从请求中获取输入文本
        temperature = data.get('temperature', 0.7)  # 默认值为 0.7
        max_new_tokens = data.get('max_new_tokens', 1024)  # 默认值为 1024
        top_p = data.get('top_p', 0.9)  # 默认值为 0.9
        top_k = data.get('top_k', 50)  # 默认值为 50
        repetition_penalty = data.get('repetition_penalty', 1.2)  # 默认值为 1.2
        messages = [
            {"role": "system", "content": "You are Qwen, created by Alibaba Cloud. You are a helpful assistant."}
        ]
        # Prepare your prompts
        for prompt in prompts:
            single_prompt = {"role": "user", "content": prompt}
            messages.append(single_prompt)
        
        sampling_params = SamplingParams(temperature=temperature, top_p=top_p, top_k= top_k, repetition_penalty=repetition_penalty, max_tokens=max_new_tokens)
        text = tokenizer.apply_chat_template(
            messages,
            tokenize=False
        )
        # generate outputs
        outputs = llm.generate([text], sampling_params)

        # Print the outputs.
        response = []
        for output in outputs:
            generated_text = output.outputs[0].text
            response.append(generated_text)
            
        # 返回生成的文本
        return jsonify({
            "status": "success",
            "generated_texts": response
        })
    except Exception as e:
        return jsonify({
            "status": "error",
            "message": str(e)
        }), 500

# 启动 Flask 服务
if __name__ == '__main__':
    model_name = "./Qwen2.5-32B-Instruct-GPTQ-Int8"
    tokenizer = AutoTokenizer.from_pretrained(model_name)
    llm = LLM(model=model_name, 
                tensor_parallel_size=2,
                max_model_len=32768,
                enable_chunked_prefill=True,
                max_num_batched_tokens=32768,
                enable_prefix_caching=True,
                disable_custom_all_reduce=True
                ,quantization="gptq",
                kv_cache_dtype="fp8_e5m2"
                )
    app.run(host='0.0.0.0', port=8090)

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleOver 90 days of inactivity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions