Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 575266 - www-client/chromium-48.0.2564.109 fails to build: sl = self._semlock = _multiprocessing.SemLock(kind, value, maxvalue) OSError: [Errno 13] Permission denied
Summary: www-client/chromium-48.0.2564.109 fails to build: sl = self._semlock = _multi...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Chromium Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-21 03:03 UTC by Jonathan Vasquez (RETIRED)
Modified: 2016-02-22 20:23 UTC (History)
0 users

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


Attachments
build.log (file_575266.txt,48.02 KB, text/plain)
2016-02-21 03:03 UTC, Jonathan Vasquez (RETIRED)
Details
emerge --info (file_575266.txt,5.41 KB, text/plain)
2016-02-21 03:04 UTC, Jonathan Vasquez (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Vasquez (RETIRED) gentoo-dev 2016-02-21 03:03:23 UTC
Created attachment 426042 [details]
build.log

The chromium build fails to build with a permission denied error. I'm building this in a chroot and it is running as root. It's never happened before so not sure why it is happening now. Build log attached.
Comment 1 Jonathan Vasquez (RETIRED) gentoo-dev 2016-02-21 03:04:26 UTC
Created attachment 426044 [details]
emerge --info
Comment 2 Chí-Thanh Christopher Nguyễn gentoo-dev 2016-02-22 17:52:49 UTC
Could be that the build requires write access to /dev/shm

http://stackoverflow.com/questions/2009278/python-multiprocessing-permission-denied
Comment 3 Mike Gilbert gentoo-dev 2016-02-22 18:25:54 UTC
Right. /dev/shm should be mounted as a tmpfs with mode 1777 in your chroot environment.

For optimal portage behavior, you should also have /dev and /dev/pts mounted properly so that pty allocation will work.

Recursively bind-mounting /dev onto CHROOT/dev also works.
Comment 4 Jonathan Vasquez (RETIRED) gentoo-dev 2016-02-22 19:47:54 UTC
Great. That was the issue. Now that build compiled fine in my chroot.

Mike, I used to use rbind and that's why it didn't happen before. However, I had another problem with my actual system because if I used --rbind and then I did an umount, it actually screwed up the mount points on the main system, and then my server would actually hang when I did a reboot/shut down (It would hang at the shutdown step.. probably because some mount point that was recursively mounted was mest up during my exiting of the chroot).

What I do now and what solved the problem is to do normal mounts (since the normal mounts can be unmounted without actually messing up the main mount).

The following works:

mount --bind /proc "${_ChrootDir}"/proc
mount --bind /dev "${_ChrootDir}"/dev
mount --bind /dev/pts "${_ChrootDir}"/dev/pts
mount --bind /dev/shm "${_ChrootDir}"/dev/shm
mount --bind /sys "${_ChrootDir}"/sys

and then when we exit chroot:

umount "${_ChrootDir}"/{proc,dev/pts,dev/shm,dev,sys}

all this is automated of course.

Closing this ticket.
Comment 5 Mike Gilbert gentoo-dev 2016-02-22 20:14:33 UTC
(In reply to Jonathan Vasquez from comment #4)
> Great. That was the issue. Now that build compiled fine in my chroot.
> 
> Mike, I used to use rbind and that's why it didn't happen before. However, I
> had another problem with my actual system because if I used --rbind and then
> I did an umount, it actually screwed up the mount points on the main system,
> and then my server would actually hang when I did a reboot/shut down (It
> would hang at the shutdown step.. probably because some mount point that was
> recursively mounted was mest up during my exiting of the chroot).

That behavior is a well-known issue with shared subtrees, which systemd enables by default.

A workaround for that:

mount --make-rslave "${_ChrootDir}"

That converts them from "shared" mounts to "slave" mounts, which means that umount-ing them works more normally.
Comment 6 Jonathan Vasquez (RETIRED) gentoo-dev 2016-02-22 20:23:40 UTC
Ah. Thanks for the info, I was also getting this with OpenRC as well, so it's nice to know systemd at least is taking this into consideration.