Skip to content

dask-worker broken with IPv6? #5159

Closed

Description

@wwoods

What happened: I was trying to figure out why tasks weren't completing on our dask cluster. Clicking the "Logs" button for an IPv6 worker on the scheduler dashboard (/info/main/workers.html) hung. Clicking "logs" for the IPv4 workers did not hang. Worked backward to this MWE, which I'm guessing is the cause. Not 100% sure though.

What you expected to happen: The "Logs" button should work at least. Ideally, fixing this will also allow the tasks that weren't completing to complete, but am unsure of that aspect. I am currently testing if this will also fix the hung jobs by disabling our IPv6 workers; will update in awhile.

Minimal Complete Verifiable Example:

On a machine accessible only over IPv6, running:

$ dask-worker --listen-address tcp://:8811 <scheduler>

And then

$ lsof -i :8811

Clearly shows that the worker is listening only on IPv4, not IPv6.

Anything else we need to know?:

Environment:

  • Dask version: 2021.7.2
  • Python version: 3.8
  • Operating System: Ubuntu in Docker
  • Install method (conda, pip, source): pip

Activity

  1. wwoods commented on Aug 2, 2021

    @wwoods
    ContributorAuthor

    So far, disabling the IPv6 workers seems to be permitting the jobs to finish. This brings up another issue: why does this result in an infinite hang from dask.compute() rather than a helpful "worker could not be reached"-style message? Presumably it's the disconnect between a worker being unreachable while simultaneously keeping its heartbeat up-to-date with the scheduler. Regardless, it would be nice if there were some better way to diagnose this problem.

    I'm not 100% on Dask's internals, but: if retrieving the results from futures/delayed directly from workers via the scheduler is important, shouldn't the scheduler validate that not only are workers updating their heartbeat, but also that the scheduler can reach those workers, before considering them valid for assigning tasks?

  2. mrocklin commented on Aug 2, 2021

    @mrocklin
    Member
  3. jacobtomlinson commented on Aug 3, 2021

    @jacobtomlinson
    Member

    I don't have an IPV6 environment to test in, but can you try specifying an IPV6 style address and see if that works?

    $ dask-worker --listen-address tcp://[::]:8811 <scheduler>
    
  4. wwoods commented on Aug 3, 2021

    @wwoods
    ContributorAuthor
    root@4328e4c9434e:/# dask-worker --listen-address tcp://[::]:8811 localhost:8786
    distributed.dask_worker - INFO - End worker
    Traceback (most recent call last):
      File "/usr/local/bin/dask-worker", line 8, in <module>
        sys.exit(go())
      File "/usr/local/lib/python3.8/dist-packages/distributed/cli/dask_worker.py", line 462, in go
        main()
      File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 829, in __call__
        return self.main(*args, **kwargs)
      File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 782, in main
        rv = self.invoke(ctx)
      File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1066, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 610, in invoke
        return callback(*args, **kwargs)
      File "/usr/local/lib/python3.8/dist-packages/distributed/cli/dask_worker.py", line 448, in main
        loop.run_sync(run)
      File "/usr/local/lib/python3.8/dist-packages/tornado/ioloop.py", line 530, in run_sync
        return future_cell[0].result()
      File "/usr/local/lib/python3.8/dist-packages/distributed/cli/dask_worker.py", line 442, in run
        await asyncio.gather(*nannies)
      File "/usr/lib/python3.8/asyncio/tasks.py", line 684, in _wrap_awaitable
        return (yield from awaitable.__await__())
      File "/usr/local/lib/python3.8/dist-packages/distributed/core.py", line 283, in _
        await self.start()
      File "/usr/local/lib/python3.8/dist-packages/distributed/nanny.py", line 267, in start
        start_address = address_from_user_args(
      File "/usr/local/lib/python3.8/dist-packages/distributed/comm/addressing.py", line 288, in address_from_user_args
        addr = uri_from_host_port(host, port, default_port)
      File "/usr/local/lib/python3.8/dist-packages/distributed/comm/addressing.py", line 185, in uri_from_host_port
        host, port = parse_host_port(
      File "/usr/local/lib/python3.8/dist-packages/distributed/comm/addressing.py", line 92, in parse_host_port
        return host, int(port)
    ValueError: invalid literal for int() with base 10: ':'
    

    If you don't have an IPv6 environment, I assume it's permissible for me to go ahead with debugging and generate a patch / PR? It looks like the way the address gets read gets a bit mangled. Plus, I'd prefer to fix tcp://:8811 so it listens on both IPv4 and IPv6 when they're both available, since that would be more consistent with the behavior of other tools and cut down on this variety of issue being reported.

  5. added 2 commits that reference this issue on Aug 10, 2021
  6. added a commit that references this issue on Aug 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions