ucx-py: BlockingMode._fd_reader_callback asyncio task not end
Hi there,
I am the maintainer of xoscar and xorbits. xoscar is a lightweight actor programming framework that enables inter-process and inter-node communication. We use ucx-py to accelerate communication. There have been no issues before, but recently, using ucx-py has been consistently reporting the following error.
It seems that there are some asyncio tasks not end?
Exception in callback <bound method BlockingMode._fd_reader_callback of <ucp.continuous_ucx_progress.BlockingMode object at 0x71df9c35c910>>
handle: <Handle BlockingMode._fd_reader_callback>
Traceback (most recent call last):
File "uvloop/cbhandles.pyx", line 61, in uvloop.loop.Handle._run
File "/home/xor/.conda/envs/xor/lib/python3.11/site-packages/ucp/continuous_ucx_progress.py", line 85, in _fd_reader_callback
assert self.asyncio_task is None or self.asyncio_task.done()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError
As this is only a assert statement, I delete this line. After commenting out this assert line, the entire program can run but will report another error.
Task was destroyed but it is pending!
task: <Task pending name='Task-102' coro=<BlockingMode._arm_worker() running at /fs/fast/share/pingtai_cc/envs/cudf/lib/python3.11/site-packages/ucp/continuous_ucx_progress.py:110> wait_for=<_SyncSocketReaderFuture pending cb=[Task.task_wakeup()]>>
In terms of performance for communication and computation across computing nodes, now using ucx-py is slightly slower than using unixsocket. Perviously, when no error like this, ucx-py is faster than unixsocket.
This part feels difficult to debug. Are there any clues to help with debugging?
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (8 by maintainers)
I’m glad you were now unblocked. If you’re still seeing performance issues I think the easiest way to determine whether this is due to some regression in UCXX would be to run xorbits/xoscar with both UCX-Py and UCXX. From this thread I had the impression that there’s no history of what was the previous performance you obtained, and as we’ve seen it could be some of the new packages may be lacking features that you were previously using. With that in mind, I would say we want to know whether you see any performance regression due to the move from UCX-Py to UCXX and/or with latest UCX packages, keep in mind UCX pip packages are only available since June, so if you were using UCX-Py previously with pip then you must have provided your own UCX build that had all the capabilities for the system where you built it.
Thanks for reporting back. After discussing internally I now realize that the performance aspect is indeed expected, the reason is pip packages are NOT built with verbs/rdmacm support, and the reason for that is there’s no rdma-core package available in for pip, whereas rdma-core is available for conda.
Unfortunately, you won’t be able to leverage better performance with the default pip install. However, the UCX pip package is intentionally built in a way that it will pick up the UCX system install if one is available and only if not available it will use its own binaries, with that in mind you may still be able to resolve your problem if you have UCX installed on your system built with either rdma-core or MOFED support, but again you’ll need to provide a build with that support yourself.