Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 925311 - =sys-apps/portage-3.0.62 on musl fails to create namespaces but mangles live system (was: creates a lot of 'proc on /proc type proc (rw,relatime)')
Summary: =sys-apps/portage-3.0.62 on musl fails to create namespaces but mangles live ...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: Normal critical (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS, REGRESSION
: 925420 (view as bug list)
Depends on: 925214
Blocks:
  Show dependency tree
 
Reported: 2024-02-23 09:08 UTC by Agostino Sarubbo
Modified: 2024-03-20 21:52 UTC (History)
2 users (show)

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 Agostino Sarubbo gentoo-dev 2024-02-23 09:08:45 UTC
Since portage-3.0.62 I found via 'mount' hundreds of:

proc on /proc type proc (rw,relatime)

On each emerge (at least for portage, so 'emerge portage'), the number of proc mounted filesystem increases about +13.

In addition to the above issue:
- the hostname of the server gots changed to localhost
- emerge says: Unable to configure loopback interface: File exists

Since 3.0.61 worked for me, I have bisected it via:
https://blogs.gentoo.org/ago/2016/11/19/an-alternative-to-git-bisect-with-gentoo-and-the-live-ebuild/

and I found the culprit commit:

commit 419cce79f9082308c848df0a98f367de4d1c50a3
Author: Zac Medico <zmedico@gentoo.org>
Date:   Sun Feb 11 13:58:10 2024 -0800

    process._exec: Use _start_fork for os.fork() error handling
    
    Use _start_fork for os.fork() error handling, ensuring
    that if exec fails then the child process will display
    a traceback before it exits via os._exit to suppress any
    finally blocks from parent's call stack (bug 345289).
    
    Bug: https://bugs.gentoo.org/345289
    Bug: https://bugs.gentoo.org/916566
    Bug: https://bugs.gentoo.org/924313
    Signed-off-by: Zac Medico <zmedico@gentoo.org>
Comment 1 Zac Medico gentoo-dev 2024-02-23 19:25:47 UTC
Hmm, I wonder if we should add a libc.so fallback like https://github.com/psycopg/psycopg/pull/725.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-02-24 14:23:03 UTC
*** Bug 925420 has been marked as a duplicate of this bug. ***
Comment 3 Larry the Git Cow gentoo-dev 2024-02-24 20:10:54 UTC
The bug has been referenced in the following commit(s):

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

commit 3f4250dc7d32e9915224b1c9c4bc04c2740abcda
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2024-02-23 20:35:04 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2024-02-24 20:07:39 +0000

    process.spawn: Fix logic for missing libc.unshare on musl
    
    Fix unshare_* variables to be False when the libc is missing,
    libc.unshare is missing, or libc.unshare fails.
    
    Also, if socket.sethostname is missing then _exec2 needs
    libc for the network-sandbox sethostname call which is wrapped
    by a blanket Exception handler.
    
    Fixes: 419cce79f908 ("process._exec: Use _start_fork for os.fork() error handling")
    Bug: https://bugs.gentoo.org/925311
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 lib/portage/process.py | 213 +++++++++++++++++++++++++------------------------
 1 file changed, 110 insertions(+), 103 deletions(-)
Comment 4 Larry the Git Cow gentoo-dev 2024-02-25 08:33:05 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6ad9d3103abc02f60d9e123ae21fa4a2e69b7e38

commit 6ad9d3103abc02f60d9e123ae21fa4a2e69b7e38
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-02-25 08:32:40 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-02-25 08:32:47 +0000

    sys-apps/portage: add 3.0.63
    
    Closes: https://bugs.gentoo.org/925214
    Closes: https://bugs.gentoo.org/651018
    Closes: https://bugs.gentoo.org/922935
    Closes: https://bugs.gentoo.org/925240
    Closes: https://bugs.gentoo.org/925311
    Closes: https://bugs.gentoo.org/925333
    Closes: https://bugs.gentoo.org/925350
    Closes: https://bugs.gentoo.org/925456
    Closes: https://bugs.gentoo.org/925460
    Signed-off-by: Sam James <sam@gentoo.org>

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