Celery worker logs many "got Future <Future pending> attached to a different loop" errors
On my docker install of FW develop (1.3.0-rc1+git.b0225d35) the log of the celeryworker shows repating errors of got Future <Future pending> attached to a different loop
for different tasks (see log below).
I can't say right now whether this affects only certain types of tasks or all tasks in general, as I can't see from the log what type of tasks are affected. I just see this error repeated a lot with different task names like "Task-98".
I'm happy to dig deeper, but I'm not too familiar with celery and wanted to record this bug here first.
2023-01-22 17:13:55,750 asyncio ERROR Task exception was never retrieved
future: <Task finished name='Task-98' coro=<Connection.disconnect() done, defined at /venv/lib/python3.10/site-packages/redis/asyncio/connection.py:720> exception=RuntimeError("Task <Task pending name='Task-98' coro=<Connection.disconnect() running at /venv/lib/python3.10/site-packages/redis/asyncio/connection.py:733>> got Future <Future pending> attached to a different loop")>
Traceback (most recent call last):
File "/venv/lib/python3.10/site-packages/redis/asyncio/connection.py", line 733, in disconnect
await self._writer.wait_closed() # type: ignore[union-attr]
File "/usr/lib/python3.10/asyncio/streams.py", line 343, in wait_closed
await self._protocol._get_close_waiter(self)
RuntimeError: Task <Task pending name='Task-98' coro=<Connection.disconnect() running at /venv/lib/python3.10/site-packages/redis/asyncio/connection.py:733>> got Future <Future pending> attached to a different loop
2023-01-22 17:14:00,604 asyncio ERROR Task exception was never retrieved
future: <Task finished name='Task-80' coro=<Connection.disconnect() done, defined at /venv/lib/python3.10/site-packages/redis/asyncio/connection.py:720> exception=RuntimeError("Task <Task pending name='Task-80' coro=<Connection.disconnect() running at /venv/lib/python3.10/site-packages/redis/asyncio/connection.py:733>> got Future <Future pending> attached to a different loop")>
Traceback (most recent call last):
File "/venv/lib/python3.10/site-packages/redis/asyncio/connection.py", line 733, in disconnect
await self._writer.wait_closed() # type: ignore[union-attr]
File "/usr/lib/python3.10/asyncio/streams.py", line 343, in wait_closed
await self._protocol._get_close_waiter(self)
RuntimeError: Task <Task pending name='Task-80' coro=<Connection.disconnect() running at /venv/lib/python3.10/site-packages/redis/asyncio/connection.py:733>> got Future <Future pending> attached to a different loop
2023-01-22 17:14:00,805 asyncio ERROR Task exception was never retrieved
future: <Task finished name='Task-108' coro=<Connection.disconnect() done, defined at /venv/lib/python3.10/site-packages/redis/asyncio/connection.py:720> exception=RuntimeError("Task <Task pending name='Task-108' coro=<Connection.disconnect() running at /venv/lib/python3.10/site-packages/redis/asyncio/connection.py:733>> got Future <Future pending> attached to a different loop")>
Traceback (most recent call last):
File "/venv/lib/python3.10/site-packages/redis/asyncio/connection.py", line 733, in disconnect
await self._writer.wait_closed() # type: ignore[union-attr]
File "/usr/lib/python3.10/asyncio/streams.py", line 343, in wait_closed
await self._protocol._get_close_waiter(self)
RuntimeError: Task <Task pending name='Task-108' coro=<Connection.disconnect() running at /venv/lib/python3.10/site-packages/redis/asyncio/connection.py:733>> got Future <Future pending> attached to a different loop