Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 683040 - sys-apps/portage-2.3.62 - traceback - python3.6/asyncio/unix_events.py", line 290, in create_unix_server - PermissionError: [Errno 13] Permission denied
Summary: sys-apps/portage-2.3.62 - traceback - python3.6/asyncio/unix_events.py", line...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 683434
  Show dependency tree
 
Reported: 2019-04-10 15:41 UTC by Fab
Modified: 2019-06-23 18:31 UTC (History)
0 users

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


Attachments
emerge output (output.txt,9.32 KB, text/plain)
2019-04-10 15:43 UTC, Fab
Details
emerge --info (infos.txt,8.73 KB, text/plain)
2019-04-10 15:44 UTC, Fab
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fab 2019-04-10 15:41:58 UTC
Hi,

I got a portage traceback while updating a system.
The setup is particular, but it works fine like that since years.

PORTDIR is mounted readonly over NFS from local network.
DISTDIR and PKGDIR are also mounted in the same way, except that they are mounted readwrite.

/usr/src/linux is also mounted readonly from NFS.

The system where I got the traceback is using some pre-built packages, the build farm
and the target system are sharing 99.99 % of the same configuration.
Both systems also share the same pre-built kernel.

Here is the traceback :
> Traceback (most recent call last):
>   File "/usr/lib/portage/python3.6/socks5-server.py", line 231, in <module>
>     asyncio.start_unix_server(s.handle_proxy_conn, sys.argv[1], loop=loop))
>   File "/usr/lib64/python3.6/asyncio/base_events.py", line 468, in run_until_complete
>     return future.result()
>   File "/usr/lib64/python3.6/asyncio/streams.py", line 151, in start_unix_server
>     return (yield from loop.create_unix_server(factory, path, **kwds))
>   File "/usr/lib64/python3.6/asyncio/coroutines.py", line 212, in coro
>     res = func(*args, **kw)
>   File "/usr/lib64/python3.6/asyncio/unix_events.py", line 290, in create_unix_server
>     sock.bind(path)
> PermissionError: [Errno 13] Permission denied

I will attach full emerge output below.

Reproducible: Always
Comment 1 Fab 2019-04-10 15:43:21 UTC
Created attachment 572384 [details]
emerge output
Comment 2 Fab 2019-04-10 15:44:58 UTC
Created attachment 572386 [details]
emerge --info
Comment 3 Zac Medico gentoo-dev 2019-04-10 17:40:57 UTC
This traceback is in the code for FEATURES=network-sandbox-proxy (also for FEATURES=distcc). It's trying to bind a socket in ${PORTAGE_TMPDIR}. It looks like we need to move this socket into ${PORTAGE_TMPDIR}/portage since that's were all portage tempfiles are normally stored and permission problems in the parent ${PORTAGE_TMPDIR} directory are very common.
Comment 4 Zac Medico gentoo-dev 2019-04-10 18:03:43 UTC
The fix will be similar to the fix for bug 671808:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=8ddc902ba8cb4712a2a8b49f46951c8ec326a678
Comment 6 Larry the Git Cow gentoo-dev 2019-04-15 23:04:54 UTC
The bug has been referenced in the following commit(s):

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

commit 63b509e6d2c0db4343b255455fda1aa3b666bd9c
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2019-04-11 03:07:09 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2019-04-15 23:03:54 +0000

    socks5: use ${PORTAGE_TMPDIR}/portage (bug 683040)
    
    Write temporary socket files in ${PORTAGE_TMPDIR}/portage,
    since writing files directly in ${PORTAGE_TMPDIR} is generally
    unexpected.
    
    Bug: https://bugs.gentoo.org/683040
    Signed-off-by: Zac Medico <zmedico@gentoo.org>

 lib/portage/util/socks5.py | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)