Skip to content

[WIP] fix: enable clean shutdown of all workers and processes - #327

Closed
ishandhanani wants to merge 1 commit into
mainfrom
ishan/ctrlc
Closed

ishandhanani wants to merge 1 commit into
mainfrom
ishan/ctrlc

Conversation

@ishandhanani

@ishandhanani ishandhanani commented Mar 21, 2025 •

Copy link
Copy Markdown
Contributor

There's been a couple different issues people running into lingering zombie processes even after you run a ctrl-c. Many times these are VLLM processes. This PR does 2 things

  1. Adds some signal handling to our dynamo worker at the SDK level
  2. Wires up the async_shutdown hook allowing our reference examples to use things like shutdown_background_loop() from the VLLM AsyncLLMEngine code.
  3. Bring back the use of uvloop (@PeaBrane)

As of right now - I have tested on 4 examples and think I have (1) working.


asyncio.run(worker())
# Define the setup_signal_handlers function within main's scope
async def setup_signal_handlers():

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this go in the @dynamo_worker decorator in the python bindings?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea - I'm getting back to this and will try

@copy-pr-bot

copy-pr-bot Bot commented Apr 11, 2025

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@ishandhanani
ishandhanani deleted the ishan/ctrlc branch June 27, 2025 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants