Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 924273

Summary: sys-apps/portage: unpicklable local pre_exec function in selinux spawn_wrapper
Product: Portage Development Reporter: Zac Medico <zmedico>
Component: CoreAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal CC: zmedico
Priority: Normal Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/gentoo/portage/pull/1260
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 921380    
Bug Blocks: 914876    

Description Zac Medico gentoo-dev 2024-02-11 05:06:46 UTC
The local _pre_exec function here is incompatible with the multiprocessing "spawn" start method:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=d938c3ff0a4ef92451cf6381aeb23a6c2d9ad8f2
Comment 1 Larry the Git Cow gentoo-dev 2024-02-11 19:57:52 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=a1024a6d02ca3a55f86525e0d8d5089e754d3713

commit a1024a6d02ca3a55f86525e0d8d5089e754d3713
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2024-02-11 05:38:58 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2024-02-11 19:46:55 +0000

    spawn_wrapper: Make pre_exec function picklable
    
    Local functions are unpicklable, which triggered this error
    with the multiprocessing "spawn" start method:
    
    AttributeError: Can't pickle local object 'spawn_wrapper.__call__.<locals>._pre_exec'
    
    Bug: https://bugs.gentoo.org/924273
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 lib/portage/_selinux.py | 17 ++++++++---------
 lib/portage/process.py  | 26 ++++++++++++++++++--------
 2 files changed, 26 insertions(+), 17 deletions(-)
Comment 2 Larry the Git Cow gentoo-dev 2024-02-22 07:24:17 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=77c44c46194922509bc4f2b5cfc099412a560a69

commit 77c44c46194922509bc4f2b5cfc099412a560a69
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-02-22 07:23:40 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-02-22 07:23:50 +0000

    sys-apps/portage: add 3.0.62
    
    Closes: https://bugs.gentoo.org/663324
    Closes: https://bugs.gentoo.org/728046
    Closes: https://bugs.gentoo.org/891137
    Closes: https://bugs.gentoo.org/906368
    Closes: https://bugs.gentoo.org/916566
    Closes: https://bugs.gentoo.org/921170
    Closes: https://bugs.gentoo.org/921208
    Closes: https://bugs.gentoo.org/921400
    Closes: https://bugs.gentoo.org/922038
    Closes: https://bugs.gentoo.org/922142
    Closes: https://bugs.gentoo.org/923368
    Closes: https://bugs.gentoo.org/923750
    Closes: https://bugs.gentoo.org/923841
    Closes: https://bugs.gentoo.org/923852
    Closes: https://bugs.gentoo.org/923854
    Closes: https://bugs.gentoo.org/924192
    Closes: https://bugs.gentoo.org/924273
    Closes: https://bugs.gentoo.org/924585
    Closes: https://bugs.gentoo.org/921380
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/portage/Manifest              |   1 +
 sys-apps/portage/portage-3.0.62.ebuild | 246 +++++++++++++++++++++++++++++++++
 2 files changed, 247 insertions(+)