Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BugFix] Fix ipv4 address parsing regression #3645

Merged
merged 2 commits into from
Mar 26, 2024

Conversation

njhill
Copy link
Collaborator

@njhill njhill commented Mar 26, 2024

#3641 was a fix for ipv6 but broke ipv4 case.

  File "/workspace/vllm/worker/worker.py", line 100, in init_device
    init_distributed_environment(self.parallel_config, self.rank,
  File "/workspace/vllm/worker/worker.py", line 269, in init_distributed_environment
    torch.distributed.init_process_group(
  File "/opt/vllm/lib/python3.11/site-packages/torch/distributed/c10d_logger.py", line 74, in wrapper
    func_return = func(*args, **kwargs)
                  ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/vllm/lib/python3.11/site-packages/torch/distributed/distributed_c10d.py", line 1138, in init_process_group
    rendezvous_iterator = rendezvous(
                          ^^^^^^^^^^^
  File "/opt/vllm/lib/python3.11/site-packages/torch/distributed/rendezvous.py", line 98, in rendezvous
    return _rendezvous_helper(url, rank, world_size, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/vllm/lib/python3.11/site-packages/torch/distributed/rendezvous.py", line 60, in _rendezvous_helper
    result = urlparse(url)
             ^^^^^^^^^^^^^
  File "/opt/vllm/lib/python3.11/urllib/parse.py", line 395, in urlparse
    splitresult = urlsplit(url, scheme, allow_fragments)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/vllm/lib/python3.11/urllib/parse.py", line 500, in urlsplit
    _check_bracketed_host(bracketed_host)
  File "/opt/vllm/lib/python3.11/urllib/parse.py", line 448, in _check_bracketed_host
    raise ValueError(f"An IPv4 address cannot be in brackets")
ValueError: An IPv4 address cannot be in brackets

vllm-project#3641 was a fix for ipv6 but broke ipv4 case.
@njhill njhill changed the title [BugFix] Fix ipv4 address parsing bug [BugFix] Fix ipv4 address parsing regression Mar 26, 2024
Copy link
Collaborator

@simon-mo simon-mo left a comment

Choose a reason for hiding this comment

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

ahhh we really some tests catching all of these 😮‍💨

@simon-mo simon-mo enabled auto-merge (squash) March 26, 2024 21:02
@youkaichao
Copy link
Member

Is it urllib version related? I can have ipv4 in bracket:

import urllib.parse
urllib.parse.urlparse("tcp://[127.0.0.1]:8080").hostname # 127.0.0.1

I'm using python 3.10 .

@njhill
Copy link
Collaborator Author

njhill commented Mar 26, 2024

Hmm, we are using python 3.11

@njhill
Copy link
Collaborator Author

njhill commented Mar 26, 2024

@youkaichao looks like this was "fixed" recently in cpython python/cpython#103848

@youkaichao
Copy link
Member

Let's add some comment there for future clarification then.

auto-merge was automatically disabled March 26, 2024 21:11

Head branch was pushed to by a user without write access

@youkaichao youkaichao merged commit 0dc7227 into vllm-project:main Mar 26, 2024
33 checks passed
xjpang pushed a commit to xjpang/vllm that referenced this pull request Mar 31, 2024
@njhill njhill deleted the fix-ip-format branch April 25, 2024 01:23
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.

None yet

3 participants