https://github.com/gentoo/portage/actions/runs/10475509459/job/29012326637#step:7:18238
Retry often succeeds: https://github.com/gentoo/portage/actions/runs/10647089451/job/29514865939 The symptom is kind of similar to bug 916142 but that was not an intermittent issue.
It's possible that a loop from asyncio.run, wrapped by _get_running_loop from this bug 937740 commit, is later closed unexpectedly: https://gitweb.gentoo.org/proj/portage.git/commit/?id=cb0c09d8cecbcc086786e3e2c7cdd8ffc023a48a We could detect closed loops in _safe_loop and then replace them if needed.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=ee17cbd807ba976491e4c657be8aa9b9a29fe059 commit ee17cbd807ba976491e4c657be8aa9b9a29fe059 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2024-08-31 19:06:25 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2024-08-31 19:06:25 +0000 _safe_loop: Discard wrapped asyncio.run loop that was closed Since commit cb0c09d8cecb, _get_running_loop can wrap loops from asyncio.run, so these loops need to be discarded if they've been closed. Fixes: cb0c09d8cecb ("Support coroutine exitfuncs for non-main loops") Bug: https://bugs.gentoo.org/938761 Bug: https://bugs.gentoo.org/761538 Signed-off-by: Zac Medico <zmedico@gentoo.org> lib/portage/util/futures/_asyncio/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+)