@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / b373b5102a
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 6, 19:15 UTC

[Tests] Shutdown test `RemoteVLLMServer` cleanly (#36950)

Recent PR #33949 changed the teardown logic of the RemoteVLLMServer test utility class to send SIGTERM to all vllm (sub)processes at once, which breaks the clean/coordinated shutdown logic that assumes only the top-level process will receive a signal (for example when running in a container that's shut down). This caused a bunch of errors and stacktraces in some test logs, even though those tests still pass. We should still attempt a normal shutdown and only kill other procs if they are still running after a few seconds. Example: tests/v1/distributed/test_external_lb_dp.py::test_external_lb_completion_streaming Signed-off-by: Nick Hill <nickhill123@gmail.com>

Nick Hill committed Mar 13, 2026 at 00:32 UTC b373b5102aac3493200c9b04ff7a3e1943c17fdd
1 file changed +3 -6
tests/utils.py
+3 -6
@@ -235,13 +235,10 @@ class RemoteVLLMServer:
235 except (ProcessLookupError, OSError):
236 pgid = None
237
238 - # Phase 1: graceful SIGTERM to the entire process group
239 - if pgid is not None:
240 - with contextlib.suppress(ProcessLookupError, OSError):
241 - os.killpg(pgid, signal.SIGTERM)
242 - print(f"[RemoteOpenAIServer] Sent SIGTERM to process group {pgid}")
243 - else:
238 + # Phase 1: graceful SIGTERM to the root process
239 + with contextlib.suppress(ProcessLookupError, OSError):
240 self.proc.terminate()
241 + print(f"[RemoteOpenAIServer] Sent SIGTERM to process {pid}")
242
243 try:
244 self.proc.wait(timeout=15)