@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / b7f186bbb3
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 14, 05:30 UTC

[BugFix] Exclude self when checking for port collision (#25286)

Signed-off-by: Nick Hill <nhill@redhat.com>

Nick Hill committed Sep 19, 2025 at 21:28 UTC b7f186bbb3101e97bb9ad42b7ffb3cdb4bb590fd
1 file changed +3 -1
vllm/utils/__init__.py
+3 -1
@@ -987,8 +987,10 @@ def find_process_using_port(port: int) -> Optional[psutil.Process]:
987 if sys.platform.startswith("darwin"):
988 return None
989
990 + our_pid = os.getpid()
991 for conn in psutil.net_connections():
991 - if conn.laddr.port == port:
992 + if conn.laddr.port == port and (conn.pid is not None
993 + and conn.pid != our_pid):
994 try:
995 return psutil.Process(conn.pid)
996 except psutil.NoSuchProcess: