Skip to content

[Enhancement] Patch OmniStage.try_collect() with _proc alive checks#1560

Merged
hsliuustc0106 merged 4 commits intovllm-project:mainfrom
pi314ever:omni-stage-try-collect-proc-patch
Mar 12, 2026
Merged

[Enhancement] Patch OmniStage.try_collect() with _proc alive checks#1560
hsliuustc0106 merged 4 commits intovllm-project:mainfrom
pi314ever:omni-stage-try-collect-proc-patch

Conversation

@pi314ever
Copy link
Copy Markdown
Contributor

PLEASE FILL IN THE PR DESCRIPTION HERE ENSURING ALL CHECKLIST ITEMS (AT THE BOTTOM) HAVE BEEN CONSIDERED.

Purpose

Waiting for OmniStage involves checking the output queue for results. However, try_collect() does not check if process has died and will hang indefinitely. This fixes this issue by explicitly checking that the process is alive before attempting to read the output queue. Component of #1557 relating to issue #1346

Test Plan

Test Result


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan. Please provide the test scripts & test commands. Please state the reasons if your codes don't require additional test scripts. For test file guidelines, please check the test style doc
  • The test results. Please paste the results comparison before and after, or the e2e results.
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model. Please run mkdocs serve to sync the documentation editions to ./docs.
  • (Optional) Release notes update. If your change is user-facing, please update the release notes draft.

BEFORE SUBMITTING, PLEASE READ https://github.com/vllm-project/vllm-omni/blob/main/CONTRIBUTING.md (anything written below this line will be removed by GitHub Actions)

@pi314ever
Copy link
Copy Markdown
Contributor Author

@xuechendi

Copy link
Copy Markdown
Contributor

@xuechendi xuechendi left a comment

Choose a reason for hiding this comment

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

LGTM

@pi314ever
Copy link
Copy Markdown
Contributor Author

@hsliuustc0106 ^

@hsliuustc0106
Copy link
Copy Markdown
Collaborator

@ApsarasX PTAL

Comment thread vllm_omni/entrypoints/omni_stage.py Outdated
Comment thread vllm_omni/entrypoints/omni_stage.py Outdated
Copy link
Copy Markdown
Collaborator

@lishunyang12 lishunyang12 left a comment

Choose a reason for hiding this comment

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

Left a couple comments. The main one is a race between the is_alive() check and the queue read — the current ordering can discard valid results that are already queued when the worker exits normally.

@pi314ever
Copy link
Copy Markdown
Contributor Author

@lishunyang12 I resolved your comments with minor tweaks.

@pi314ever
Copy link
Copy Markdown
Contributor Author

@lishunyang12 Bumping, can you please take a look?

Copy link
Copy Markdown
Collaborator

@lishunyang12 lishunyang12 left a comment

Choose a reason for hiding this comment

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

LGTM — race condition fixed, queue-first ordering is correct

@wtomin
Copy link
Copy Markdown
Collaborator

wtomin commented Mar 9, 2026

LGTM.

@wtomin wtomin added the ready label to trigger buildkite CI label Mar 9, 2026
@xuechendi
Copy link
Copy Markdown
Contributor

@wtomin , seems the AMD CI fail issue is HW resource issue.
Please help to check if we can get this PR landed with a force-merge, thanks.

Signed-off-by: Daniel Huang <daniel1.huang@intel.com>
Signed-off-by: Daniel Huang <daniel1.huang@intel.com>
Signed-off-by: Daniel Huang <daniel1.huang@intel.com>
@pi314ever pi314ever force-pushed the omni-stage-try-collect-proc-patch branch from 328b87c to 8e79a78 Compare March 9, 2026 19:15
Signed-off-by: Daniel Huang <daniel1.huang@intel.com>
fake_process_instance.start = mocker.MagicMock()
fake_process_instance.join = mocker.MagicMock()
fake_process_instance.is_alive = mocker.MagicMock(return_value=False)
fake_process_instance.is_alive = mocker.MagicMock(return_value=True)
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.

This value needs to be set True to allow _proc.is_alive() check on mocks to pass. There is no reason to set is_alive to False unless testing process failure test case.

@Gaohan123 Gaohan123 added this to the v0.18.0 milestone Mar 11, 2026
@hsliuustc0106 hsliuustc0106 merged commit ac17431 into vllm-project:main Mar 12, 2026
6 of 7 checks passed
meghaagr13 pushed a commit to meghaagr13/vllm-omni that referenced this pull request Mar 12, 2026
…llm-project#1560)

Signed-off-by: Daniel Huang <daniel1.huang@intel.com>
Signed-off-by: Megha Agarwal <agarwalmegha1308@gmail.com>
meghaagr13 pushed a commit to meghaagr13/vllm-omni that referenced this pull request Mar 12, 2026
yiliu30 pushed a commit to yiliu30/vllm-omni-fork that referenced this pull request Mar 20, 2026
…llm-project#1560)

Signed-off-by: Daniel Huang <daniel1.huang@intel.com>

Signed-off-by: yiliu30 <yi4.liu@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready label to trigger buildkite CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants