-
-
Notifications
You must be signed in to change notification settings - Fork 11.7k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Your current environment
The environment is not relevant.
Model Input Dumps
No response
🐛 Describe the bug
The request_id field used in the LLM Engine is assumed to be unique, but it is a parameter that can be set by the caller. After #9550, the request_id is configurable even by a caller to the OpenAI Server.
I originally encountered this issue while investigating the cause of negative metrics in #10430. I found that sending two requests concurrently with the same request id can cause the negative metric error. Example bash using curl:
curl http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "meta-llama/Llama-3.2-3B-Instruct",
"request_id": "id",
"messages": [{"role": "user", "content": "Tell me a long story:"}],
"max_tokens": 1024,
"min_tokens": 1024,
"temperature": 0
}' &
sleep 0.5
curl http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "meta-llama/Llama-3.2-3B-Instruct",
"request_id": "id",
"messages": [{"role": "user", "content": "Tell me a long story:"}],
"max_tokens": 1024,
"min_tokens": 1024,
"temperature": 0
}' &
The fix in #10430 properly prevents the crash, but only one request gets a response and the other connection hangs open.
Other users have reported other bad behavior that looks to be caused by duplicate request_ids:
- Offline server hangs: [Bug]: AsyncLLMEngine hangs when using
asyncio.gatherwith vllm version 0.5.5 #8393 - "RuntimeError: aclose(): asynchronous generator is already running": [Bug]: RuntimeError: aclose(): asynchronous generator is already running #6325
Counters can only be incremented by non-negative amounts.: [Bug]: errorCounters can only be incremented by non-negative amounts.inmetricsmodule #6642
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.
cjackal
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working