vllm - 💡(How to fix) Fix [Performance]: [Bug]: meet same thread as registerClien when start_profile [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vllm-project/vllm#39603Fetched 2026-04-12 13:24:28
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Participants
Timeline (top)
labeled ×1

Error Message

ERROR: External init callback must run in same thread as registerClient (327136832 != -2017364160) ERROR: External init callback must run in same thread as registerClient (327136832 != -2017364160)

Code Example

The output of `python collect_env.py`
RAW_BUFFERClick to expand / collapse

Proposal to improve performance

vllm + 1p1d + ds3.2

decode="10.233.83.96" curl -X POST http://${decode}:8200/start_profile curl -X POST http://${decode}:8200/stop_profile

(ApiServer_2 pid=468) INFO 04-12 03:02:55 [api_router.py:23] Starting profiler... ERROR: External init callback must run in same thread as registerClient (327136832 != -2017364160) (ApiServer_2 pid=468) INFO 04-12 03:02:55 [api_router.py:25] Profiler started. (ApiServer_4 pid=470) INFO 04-12 03:03:10 [api_router.py:31] Stopping profiler...

Report of performance regression

decode="10.233.83.96" curl -X POST http://${decode}:8200/start_profile curl -X POST http://${decode}:8200/stop_profile

(ApiServer_2 pid=468) INFO 04-12 03:02:55 [api_router.py:23] Starting profiler... ERROR: External init callback must run in same thread as registerClient (327136832 != -2017364160) (ApiServer_2 pid=468) INFO 04-12 03:02:55 [api_router.py:25] Profiler started. (ApiServer_4 pid=470) INFO 04-12 03:03:10 [api_router.py:31] Stopping profiler...

Misc discussion on performance

No response

Your current environment (if you think it is necessary)

The output of `python collect_env.py`

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.

extent analysis

TL;DR

The error message "External init callback must run in same thread as registerClient" suggests a threading issue that may be resolved by ensuring that the profiler is started and stopped from the same thread.

Guidance

  • Verify that the start_profile and stop_profile endpoints are being called from the same thread, as the error message indicates a threading issue.
  • Check the implementation of api_router.py to ensure that the profiler is being started and stopped in a thread-safe manner.
  • Consider using a thread-safe approach to starting and stopping the profiler, such as using a lock or a thread-safe queue to coordinate access to the profiler.
  • Review the documentation for the profiling library being used to ensure that it is being used correctly in a multi-threaded environment.

Notes

The provided information does not include the implementation details of api_router.py or the profiling library being used, so a more specific solution cannot be provided.

Recommendation

Apply a workaround to ensure that the profiler is started and stopped from the same thread, such as using a thread-safe queue to coordinate access to the profiler.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

vllm - 💡(How to fix) Fix [Performance]: [Bug]: meet same thread as registerClien when start_profile [1 participants]