The documentation for the asycio AbstractChildWatcher class says that callbacks for the add_child_handler must be thread safe.
Patch posted for review: https://archives.gentoo.org/gentoo-portage-dev/message/ef8bc0adfbd8fa59fd208d1e50312fb2 https://github.com/gentoo/portage/pull/657
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=eeeb70bf50994c08ebcddac94474105f0635360c commit eeeb70bf50994c08ebcddac94474105f0635360c Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2021-01-11 06:46:49 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2021-01-11 07:28:28 +0000 AsyncioEventLoop: wrap child watcher for thread safety (bug 764905) Use a child watcher wrapper to deliver the callbacks via the call_soon_threadsafe method, since documentation for the asycio AbstractChildWatcher class says that callbacks must be thread safe. Bug: https://bugs.gentoo.org/764905 Signed-off-by: Zac Medico <zmedico@gentoo.org> lib/portage/util/_eventloop/asyncio_event_loop.py | 30 ++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d9df956e086c0766ee352320ecc346c27d23df3 commit 2d9df956e086c0766ee352320ecc346c27d23df3 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2021-01-11 09:45:19 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2021-01-11 09:47:00 +0000 sys-apps/portage: Bump to version 3.0.13 #763339 always allow event loops to run in threads #764764 fix virtual/dist-kernel slot operator rebuilds #764905 wrap asyncio child watcher for thread safety Bug: https://bugs.gentoo.org/764923 Bug: https://bugs.gentoo.org/763339 Bug: https://bugs.gentoo.org/764764 Bug: https://bugs.gentoo.org/764905 Package-Manager: Portage-3.0.13, Repoman-3.0.2 Signed-off-by: Zac Medico <zmedico@gentoo.org> sys-apps/portage/Manifest | 1 + sys-apps/portage/portage-3.0.13.ebuild | 268 +++++++++++++++++++++++++++++++++ 2 files changed, 269 insertions(+)