Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 119154 - alpha glibc+nptl-nptlonly and sandbox cause programs to segfault
Summary: alpha glibc+nptl-nptlonly and sandbox cause programs to segfault
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: Alpha Linux
: High major (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 121222 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-01-15 19:51 UTC by ibm
Modified: 2006-04-15 22:19 UTC (History)
4 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 ibm 2006-01-15 19:51:26 UTC
Unfortunately, I haven't been able to figure out the cause of this. As far as I can tell, something about the current NPTL glibc build causes sandbox to do weird things. This has also been discussed at http://www.nabble.com/Re:-problem-upgrading-the-toolchain-p1874985.html though no solution is apparent.

I'm using vanilla-sources-2.6.13.1, sys-devel/gcc-3.4.4-r1, sys-devel/binutils-2.15.92.0.2-r10, sys-libs/glibc-2.3.5-r3 (+nptl -linuxthreads-tls) and
CFLAGS="-mieee -O2 -mcpu=ev6 -pipe -fomit-frame-pointer"

I'd love to provide more information about this, so please ask. I will comment that this system has not been rebooted since the glibc upgrade...

Here is the symptom:

ventolin ~ # sandbox
========================== Gentoo linux path sandbox ===========================
Detection of the support files.
Verification of the required files.
Setting up the required environment variables.
The protected environment has been started.
--------------------------------------------------------------------------------
Process being started in forked instance.
ventolin ~ # LD_ASSUME_KERNEL=2.4.20 as --version
GNU assembler 2.15.92.0.2 20040927
Copyright 2002 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.
This assembler was configured for a target of `alpha-unknown-linux-gnu'.
ventolin ~ # strace -f as --version
execve("/usr/bin/as", ["as", "--version"], [/* 37 vars */]) = 0
uname({sys="Linux", node="ventolin", ...}) = 0
brk(0)                                  = 0x12006e000
open("/usr/lib/libsandbox.so", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0&\220\1\0\0\0P\30\0"..., 640) = 640
fstat64(3, {st_mode=S_IFREG|0755, st_size=31616, ...}) = 0
mmap(NULL, 103456, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2000002c000
mprotect(0x20000034000, 70688, PROT_NONE) = 0
mmap(0x20000042000, 8192, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x20000042000
mmap(0x20000044000, 5152, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x20000044000
close(3)                                = 0
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/usr/lib/binutils/alpha-unknown-linux-gnu/2.15.92.0.2/tls/ev6/libopcodes-2.15.92.0.2.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/binutils/alpha-unknown-linux-gnu/2.15.92.0.2/tls/ev6", 0x11f87ea70) = -1 ENOENT (No such file or directory)
open("/usr/lib/binutils/alpha-unknown-linux-gnu/2.15.92.0.2/tls/libopcodes-2.15.92.0.2.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/binutils/alpha-unknown-linux-gnu/2.15.92.0.2/tls", 0x11f87ea70) = -1 ENOENT (No such file or directory)
open("/usr/lib/binutils/alpha-unknown-linux-gnu/2.15.92.0.2/ev6/libopcodes-2.15.92.0.2.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/binutils/alpha-unknown-linux-gnu/2.15.92.0.2/ev6", 0x11f87ea70) = -1 ENOENT (No such file or directory)
open("/usr/lib/binutils/alpha-unknown-linux-gnu/2.15.92.0.2/libopcodes-2.15.92.0.2.so", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0&\220\1\0\0\0\360y\0"..., 640) = 640
fstat64(3, {st_mode=S_IFREG|0755, st_size=72200, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2000001a000
mmap(NULL, 135768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x20000046000
mprotect(0x20000052000, 86616, PROT_NONE) = 0
mmap(0x20000060000, 32768, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xa000) = 0x20000060000
close(3)                                = 0
open("/usr/lib/binutils/alpha-unknown-linux-gnu/2.15.92.0.2/libbfd-2.15.92.0.2.so", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0&\220\1\0\0\0 \275\1"..., 640) = 640
fstat64(3, {st_mode=S_IFREG|0755, st_size=633368, ...}) = 0
mmap(NULL, 711720, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x20000068000
mprotect(0x200000fa000, 113704, PROT_NONE) = 0
mmap(0x20000108000, 40960, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x90000) = 0x20000108000
mmap(0x20000112000, 15400, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x20000112000
close(3)                                = 0
open("/usr/lib/binutils/alpha-unknown-linux-gnu/2.15.92.0.2/libc.so.6.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=25866, ...}) = 0
mmap(NULL, 25866, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2000001c000
close(3)                                = 0
open("/lib/tls/libc.so.6.1", O_RDONLY)  = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0&\220\1\0\0\0\200U\2"..., 640) = 640
lseek(3, 64, SEEK_SET)                  = 64
read(3, "\6\0\0\0\5\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0"..., 616) = 616
lseek(3, 680, SEEK_SET)                 = 680
read(3, "\4\0\0\0\20\0\0\0\1\0\0\0GNU\0\0\0\0\0\2\0\0\0\6\0\0\0"..., 32) = 32
fstat64(3, {st_mode=S_IFREG|0755, st_size=1481216, ...}) = 0
lseek(3, 64, SEEK_SET)                  = 64
read(3, "\6\0\0\0\5\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0"..., 616) = 616
mmap(NULL, 1487976, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x20000116000
mprotect(0x20000266000, 111720, PROT_NONE) = 0
mmap(0x20000276000, 32768, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x150000) = 0x20000276000
mmap(0x2000027e000, 13416, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2000027e000
close(3)                                = 0
open("/lib/libdl.so.2.1", O_RDONLY)     = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0&\220\1\0\0\0\200\22"..., 640) = 640
lseek(3, 624, SEEK_SET)                 = 624
read(3, "\4\0\0\0\20\0\0\0\1\0\0\0GNU\0\0\0\0\0\2\0\0\0\4\0\0\0"..., 32) = 32
fstat64(3, {st_mode=S_IFREG|0755, st_size=19832, ...}) = 0
mmap(NULL, 82400, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x20000282000
mprotect(0x20000286000, 66016, PROT_NONE) = 0
mmap(0x20000294000, 16384, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x20000294000
close(3)                                = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x20000024000
mprotect(0x20000276000, 8192, PROT_READ) = 0
mprotect(0x20000028000, 8192, PROT_READ) = 0
munmap(0x2000001c000, 25866)            = 0
open("/dev/urandom", O_RDONLY)          = 3
read(3, "?\374E]\223,#b", 8)            = 8
close(3)                                = 0
lstat64("/usr/lib/libsandbox.so", {st_mode=S_IFLNK|0777, st_size=19, ...}) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++

Needless to say, this all works as expected when not in the sandbox environment.
Comment 1 SpanKY gentoo-dev 2006-01-16 01:22:39 UTC
you forgot to post `emerge info`
Comment 2 ibm 2006-01-16 01:30:12 UTC
(In reply to comment #1)
> you forgot to post `emerge info`
> 

I didn't forget per se... I put in information that I thought was relevant. Here it is though:

CFLAGS="-mieee -O2 -mcpu=ev6 -pipe -fomit-frame-pointer"
CHOST="alpha-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-mieee -O2 -mcpu=ev6 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.media.mit.edu http://distfiles.gentoo.org"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://gentoo.media.mit.edu/gentoo-portage"
USE="a52 aalib alpha audiofile berkdb bitmap-fonts bzip2 cdparanoia crypt cups curl dts eds emacs encode expat faad ffmpeg font-server foomaticdb fortran gdbm gif gmp gpm gstreamer guile imlib ipv6 jpeg kerberos krb4 libg++ libwww live mad mikmod mp3 mpeg mysql ncurses nls nptl ogg oggvorbis oss pam pcre pdflib perl png python quicktime readline real sdl spell ssl tcpd theora tiff truetype truetype-fonts type1-fonts udev unicode usb v4l v4l2 vorbis xml2 xmms xvid zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS
Comment 3 ibm 2006-01-16 01:31:09 UTC
(In reply to comment #2)
OK, let's try that again... Sorry about the first time.

ventolin ~ # emerge --info
Portage 2.0.53 (default-linux/alpha/2005.0, gcc-3.4.4, glibc-2.3.5-r3, 2.6.13.1 alpha)
=================================================================
System uname: 2.6.13.1 alpha EV6
Gentoo Base System version 1.6.13
distcc 2.18.3 alpha-unknown-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="alpha"
AUTOCLEAN="yes"
CBUILD="alpha-unknown-linux-gnu"
CFLAGS="-mieee -O2 -mcpu=ev6 -pipe -fomit-frame-pointer"
CHOST="alpha-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-mieee -O2 -mcpu=ev6 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.media.mit.edu http://distfiles.gentoo.org"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://gentoo.media.mit.edu/gentoo-portage"
USE="a52 aalib alpha audiofile berkdb bitmap-fonts bzip2 cdparanoia crypt cups curl dts eds emacs encode expat faad ffmpeg font-server foomaticdb fortran gdbm gif gmp gpm gstreamer guile imlib ipv6 jpeg kerberos krb4 libg++ libwww live mad mikmod mp3 mpeg mysql ncurses nls nptl ogg oggvorbis oss pam pcre pdflib perl png python quicktime readline real sdl spell ssl tcpd theora tiff truetype truetype-fonts type1-fonts udev unicode usb v4l v4l2 vorbis xml2 xmms xvid zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS
Comment 4 Thomas Cort (RETIRED) gentoo-dev 2006-01-16 05:21:24 UTC
sandbox works fine for me and I'm running alpha glibc+nptl. The only difference in our glibc USE flags is that I also have nptlonly.

From use.local.desc: "sys-libs/glibc:nptlonly - Disables building the linuxthreads fallback in glibc ebuilds that support building both linuxthreads and nptl."



home ~ # emerge -vp sys-libs/glibc

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] sys-libs/glibc-2.3.5-r3  -build -erandom -glibc-compat20 -glibc-omitfp (-hardened) -linuxthreads-tls (-multilib) +nls +nptl +nptlonly -pic -profile (-selinux) +userlocales 26 kB



home ~ # emerge info
Portage 2.0.53 (!/usr/portage/profiles/default-linux/alpha/2005.0, gcc-3.4.4, glibc-2.3.5-r3, 2.6.15 alpha)
=================================================================
System uname: 2.6.15 alpha EV56
Gentoo Base System version 1.6.13
distcc 2.18.3 alpha-unknown-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r4
ACCEPT_KEYWORDS="alpha"
AUTOCLEAN="yes"
CBUILD="alpha-unknown-linux-gnu"
CFLAGS="-mieee -O2 -mcpu=ev56 -pipe"
CHOST="alpha-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-mieee -O2 -mcpu=ev56 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distcc distlocks nostrip sandbox sfperms strict"
GENTOO_MIRRORS="http://mirror.arcticnetwork.ca/pub/gentoo/ http://adelie.polymtl.ca/ ftp://cs.ubishops.ca/pub/gentoo http://gentoo.cites.uiuc.edu/pub/gentoo/ ftp://gentoo.arcticnetwork.ca/pub/gentoo/"
LDFLAGS="-Wl,-O1"
LINGUAS="en"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/mnt/hackintosh/portage"
PORTDIR_OVERLAY="/mnt/hackintosh/overlay"
SYNC="rsync://rsync.ca.gentoo.org/gentoo-portage"
USE="alpha X aac aalib aim alsa arts audiofile berkdb bitmap-fonts bzip2 crypt cups curl eds encode esd exif expat fam ffmpeg flac font-server foomaticdb gd gdbm gif glut gmp gnome gpm gstreamer gtk gtk2 gtkhtml icq imlib ipv6 jabber jpeg kde lcms libg++ libwww lua mad mhash mikmod mng motif mozilla mp3 mpeg msn nas ncurses nls nocd nptl nptlonly offensive ogg oggvorbis openal opengl oscar oss pam pcre pdflib perl png python qt quicktime readline sdl shorten sndfile spell ssl tcltk tcpd tiff truetype truetype-fonts type1-fonts udev vorbis wxgtk1 xml2 xmms xv xvid yahoo zlib linguas_en userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL



home ~ # sandbox
========================== Gentoo linux path sandbox ===========================
Detection of the support files.
Verification of the required files.
Setting up the required environment variables.
The protected environment has been started.
--------------------------------------------------------------------------------
Process being started in forked instance.
home ~ # strace -f as --version
execve("/usr/bin/as", ["as", "--version"], [/* 51 vars */]) = 0
uname({sys="Linux", node="home", ...})  = 0
brk(0)                                  = 0x120072000
open("/usr/lib/libsandbox.so", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0&\220\1\0\0\0P\30\0"..., 640) = 640
fstat64(3, {st_mode=S_IFREG|0755, st_size=32512, ...}) = 0
mmap(NULL, 104312, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2000002c000
mprotect(0x20000034000, 71544, PROT_NONE) = 0
mmap(0x20000042000, 8192, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x20000042000
mmap(0x20000044000, 6008, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x20000044000
close(3)                                = 0
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/usr/lib/binutils/alpha-unknown-linux-gnu/2.15.92.0.2/tls/ev56/libopcodes-2.15.92.0.2.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/binutils/alpha-unknown-linux-gnu/2.15.92.0.2/tls/ev56", 0x11ffb2790) = -1 ENOENT (No such file or directory)open("/usr/lib/binutils/alpha-unknown-linux-gnu/2.15.92.0.2/tls/libopcodes-2.15.92.0.2.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/binutils/alpha-unknown-linux-gnu/2.15.92.0.2/tls", 0x11ffb2790) = -1 ENOENT (No such file or directory)
open("/usr/lib/binutils/alpha-unknown-linux-gnu/2.15.92.0.2/ev56/libopcodes-2.15.92.0.2.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/binutils/alpha-unknown-linux-gnu/2.15.92.0.2/ev56", 0x11ffb2790) = -1 ENOENT (No such file or directory)
open("/usr/lib/binutils/alpha-unknown-linux-gnu/2.15.92.0.2/libopcodes-2.15.92.0.2.so", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0&\220\1\0\0\0\360y\0"..., 640) = 640
fstat64(3, {st_mode=S_IFREG|0755, st_size=72192, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2000001a000
mmap(NULL, 135704, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x20000046000
mprotect(0x20000052000, 86552, PROT_NONE) = 0
mmap(0x20000060000, 32768, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xa000) = 0x20000060000
close(3)                                = 0
open("/usr/lib/binutils/alpha-unknown-linux-gnu/2.15.92.0.2/libbfd-2.15.92.0.2.so", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0&\220\1\0\0\0`\302\1"..., 640) = 640
fstat64(3, {st_mode=S_IFREG|0755, st_size=665864, ...}) = 0
mmap(NULL, 743888, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x20000068000
mprotect(0x20000100000, 121296, PROT_NONE) = 0
mmap(0x20000110000, 40960, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x98000) = 0x20000110000
mmap(0x2000011a000, 14800, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2000011a000
close(3)                                = 0
open("/usr/lib/binutils/alpha-unknown-linux-gnu/2.15.92.0.2/libc.so.6.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=74569, ...}) = 0
mmap(NULL, 74569, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2000011e000
close(3)                                = 0
open("/lib/libc.so.6.1", O_RDONLY)      = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0&\220\1\0\0\0\320\203"..., 640) = 640
lseek(3, 64, SEEK_SET)                  = 64
read(3, "\6\0\0\0\5\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0"..., 616) = 616
lseek(3, 680, SEEK_SET)                 = 680
read(3, "\4\0\0\0\20\0\0\0\1\0\0\0GNU\0\0\0\0\0\2\0\0\0\6\0\0\0"..., 32) = 32
fstat64(3, {st_mode=S_IFREG|0755, st_size=1939687, ...}) = 0
lseek(3, 64, SEEK_SET)                  = 64
read(3, "\6\0\0\0\5\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0"..., 616) = 616
mmap(NULL, 1541200, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x20000132000
mprotect(0x20000290000, 107600, PROT_NONE) = 0
mmap(0x2000029e000, 40960, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15c000) = 0x2000029e000
mmap(0x200002a8000, 9296, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x200002a8000
close(3)                                = 0
open("/lib/libdl.so.2.1", O_RDONLY)     = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0&\220\1\0\0\0`\23\0"..., 640) = 640
lseek(3, 624, SEEK_SET)                 = 624
read(3, "\4\0\0\0\20\0\0\0\1\0\0\0GNU\0\0\0\0\0\2\0\0\0\6\0\0\0"..., 32) = 32
fstat64(3, {st_mode=S_IFREG|0755, st_size=26918, ...}) = 0
mmap(NULL, 82472, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x200002ac000
mprotect(0x200002b0000, 66088, PROT_NONE) = 0
mmap(0x200002be000, 16384, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x200002be000
close(3)                                = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2000001c000
mprotect(0x200002be000, 8192, PROT_READ) = 0
mprotect(0x2000029e000, 16384, PROT_READ) = 0
mprotect(0x20000028000, 8192, PROT_READ) = 0
munmap(0x2000011e000, 74569)            = 0
open("/dev/urandom", O_RDONLY)          = 3
read(3, "\2548{\341\30\314\274\217", 8) = 8
close(3)                                = 0
lstat64("/usr/lib/libsandbox.so", {st_mode=S_IFLNK|0777, st_size=19, ...}) = 0
getrusage(RUSAGE_SELF, {ru_utime={0, 2929}, ru_stime={0, 4882}, ...}) = 0
brk(0)                                  = 0x120072000
brk(0x120094000)                        = 0x120094000
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2000001e000
write(1, "GNU assembler 2.15.92.0.2 200409"..., 35GNU assembler 2.15.92.0.2 20040927
) = 35
write(1, "Copyright 2002 Free Software Fou"..., 46Copyright 2002 Free Software Foundation, Inc.
) = 46
write(1, "This program is free software; y"..., 148This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.
) = 148
write(1, "This assembler was configured fo"..., 73This assembler was configured for a target of `alpha-unknown-linux-gnu'.
) = 73
munmap(0x2000001e000, 8192)             = 0
exit_group(0)                           = ?
Comment 5 ibm 2006-01-16 14:45:21 UTC
(In reply to comment #4)
> sandbox works fine for me and I'm running alpha glibc+nptl. The only difference
> in our glibc USE flags is that I also have nptlonly.

Thanks for the suggestion, I was a little afraid to try it, since the NPTL part didn't work. I just did though, and everything works fine now. *weird*

If anyone has any suggestions about finding the cause, I could try some things out, but I'm a little less inclined to test now that it works, and glibc (esp without nptlonly) isn't the fastest of packages to compile.
Comment 6 Mark Loeser (RETIRED) gentoo-dev 2006-02-01 13:56:21 UTC
*** Bug 121222 has been marked as a duplicate of this bug. ***
Comment 7 Bryan Østergaard (RETIRED) gentoo-dev 2006-04-12 12:53:58 UTC
I don't think there's much hope this will be fixed upstream as linuxthreads is no longer supported. Instead, we've been forcing +nptl +nptlonly in the 2006.0 profile to avoid this problem.
Comment 8 ibm 2006-04-12 13:02:12 UTC
(In reply to comment #7)
> I don't think there's much hope this will be fixed upstream as linuxthreads is
> no longer supported. Instead, we've been forcing +nptl +nptlonly in the 2006.0
> profile to avoid this problem.
> 

The problem is that nptl *was* enabled, i.e. +nptl -nptlonly and the only way to make stuff work was to *disable* NPTL (i.e. LD_ASSUME_KERNEL=something old). Now why did having both NPTL and non-NPTL glibc cause sandbox to do weird things, while the regular system env worked fine?

Is the bug well understood? If so, could you elaborate/add a link? If not, why are you blaming linuxthreads?
Comment 9 Bryan Østergaard (RETIRED) gentoo-dev 2006-04-12 13:16:58 UTC
No, the problem only exists on +nptl -nptlonly systems. Mixed systems if you want, where both nptl and linuxthreads is enabled.

If you stick to either nptl or linuxthreads this problem doesn't exist at all.

That's why we now have a (default) nptlonly profile and an no-nptl profile for users wanting a linuxthreads system.

In effect I'm not blaming either nptl or linuxthreads but we've spend considerable time trying to fix the mixed situation but upstream doesn't want to look at it at all.

As linuxthreads is effectively unsupported upstream we're not going to get a better solution than what we've already implemented.
Comment 10 SpanKY gentoo-dev 2006-04-15 22:19:18 UTC
ok, the ppc fix we put in place also works here so i'll update our glibc ebuilds so people can use "nptl -nptlonly"