Summary: | python 3.2.2 sandbox violation, build process appears to be using first mounted tmpfs | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Troy Ablan <tablan> |
Component: | [OLD] Unspecified | Assignee: | Python Gentoo Team <python> |
Status: | RESOLVED WORKSFORME | ||
Severity: | minor | CC: | floppym |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | build.log |
Description
Troy Ablan
2012-03-09 06:27:10 UTC
Created attachment 304699 [details]
build.log
BTW. my workaround in this vserver was to have a tmpfs mounted in /dev/shm/ and have that be the first tmpfs mount. I assume that /var/log/goodnet is a tmpfs? From the build log: --------------------------- ACCESS VIOLATION SUMMARY --------------------------- LOG FILE "/var/log/sandbox/sandbox-15258.log" VERSION 1.0 FORMAT: F - Function called FORMAT: S - Access Status FORMAT: P - Path as passed to function FORMAT: A - Absolute Path (not canonical) FORMAT: R - Canonical Path FORMAT: C - Command Line F: link S: deny P: /var/log/goodnet/sem.autoconf A: /var/log/goodnet/sem.autoconf R: /var/log/goodnet/sem.autoconf C: ./conftest F: unlink S: deny P: /var/log/goodnet/sem.jCcwUF A: /var/log/goodnet/sem.jCcwUF R: /var/log/goodnet/sem.jCcwUF C: ./conftest F: link S: deny P: /var/log/goodnet/sem.autocftw A: /var/log/goodnet/sem.autocftw R: /var/log/goodnet/sem.autocftw C: ./conftest F: unlink S: deny P: /var/log/goodnet/sem.K6rJnL A: /var/log/goodnet/sem.K6rJnL R: /var/log/goodnet/sem.K6rJnL C: ./conftest -------------------------------------------------------------------------------- Python's configure just compiles and runs a small test program that calls sem_open: sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0); Looking at glibc (I used 2.15) I believe your problem is in nptl/sem_open.c, which does roughly "use /dev/shm if that is on a tmpfs, otherwise find a usable tmpfs mount in /proc/mounts". If my glance at the code is correct /dev being a tmpfs also suffices (the check is "/dev/shm is on a tmpfs", not "a tmpfs is mounted exactly on /dev/shm"). So I believe this is either a system misconfiguration (my system's fstab mentions "glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for POSIX shared memory") or a glibc misfeature (it should just fail sem_open and friends if there is no tmpfs present in the expected place). (In reply to comment #3) > I assume that /var/log/goodnet is a tmpfs? > It is. It works fine without any tmpfs, or if /dev or /dev/shm is a tmpfs. In vserver, /dev is minimal and static, with /dev/pts mounted over it. Also, partially in reply to marienz: The default vserver fstab DOES include a tmpfs /tmp of 16 megabytes, I removed that in all cases since it's woefully inadequate. This would have allowed the merge to succeed (sandbox can write there), but do you guys think the default vserver fstab ought to also mount /dev/shm? Do you think it's sufficiently misconfigured in the eyes of glibc that it's worth opening a bug with VPS team? (In reply to comment #5) Yeah. As marienz said, glibc expects /dev/shm to be a tmpfs. That's a pretty standard configuration item these days. The initialization scripts for the virtual environment should take care of setting that up for you. If they don't, I would call it a bug. Thanks for the report. |