Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 764905 - sys-apps/portage: asyncio add_child_handler callbacks need to be thread safe
Summary: sys-apps/portage: asyncio add_child_handler callbacks need to be thread safe
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 758719 764923
  Show dependency tree
 
Reported: 2021-01-11 06:03 UTC by Zac Medico
Modified: 2021-01-25 04:37 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zac Medico gentoo-dev 2021-01-11 06:03:14 UTC
The documentation for the asycio AbstractChildWatcher class says that callbacks for the add_child_handler must be thread safe.
Comment 2 Larry the Git Cow gentoo-dev 2021-01-11 07:36:35 UTC
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(-)
Comment 3 Larry the Git Cow gentoo-dev 2021-01-11 09:54:12 UTC
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(+)