Summary: | sys-apps/sandbox-1.9 breaks configure test for fork (seen with app-editors/emacs and media-gfx/asymptote) | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Matt Jorde <majorde> |
Component: | Sandbox | Assignee: | Sandbox Maintainers <sandbox> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | billydv1, brammers, cbartl, emacs, fabio.coatti, lordvan, please.no.spam.here, serge |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build.log ending where configure stalls
Test program from configure Modified conftest build.log of 'emerge asymptote' abstract of 'strace -f emerge asymptote' sandbox build.log |
Description
Matt Jorde
2009-04-22 06:10:20 UTC
Created attachment 189131 [details]
build.log ending where configure stalls
Here is the build.log showing the entire emerge process up until it stalls during configure.
Are there any messages from the kernel (in /var/log/messages)? (In reply to comment #2) > Are there any messages from the kernel (in /var/log/messages)? > Here are the kernel messages from before I ran emerge up until it stalled: Apr 23 00:02:14 bremen sudo: majorde : TTY=pts/1 ; PWD=/home/majorde ; USER=root ; COMMAND=/usr/bin/emerge app-editors/emacs Apr 23 00:02:14 bremen sudo: pam_unix(sudo:session): session opened for user root by majorde(uid=0) Apr 23 00:02:14 bremen sudo: pam_unix(sudo:session): session closed for user root Created attachment 189213 [details]
Test program from configure
Hm, I've no idea what could be the reason for this. Does it consume CPU time when it hangs (should be a "conftest" process)?
What happens if you compile and run attached program?
(In reply to comment #4) > Created an attachment (id=189213) [edit] > Test program from configure > > Hm, I've no idea what could be the reason for this. Does it consume CPU time > when it hangs (should be a "conftest" process)? > > What happens if you compile and run attached program? > The conftest process is running, but it does not consume CPU time. Running the attached program produces no output, and when I run ./a.out && echo "hi" it still produces no output so it seems the program must be failing. Do you know of a certain package I need to get a working fork? I'd say that this is not a problem of Emacs. Could you modify the test program to output the error message, e.g. by changing the "if" statement to the following: if (fork() < 0) { perror(""); exit (1); } Created attachment 189437 [details]
Modified conftest
Adding perror still produced no output. It seems HAVE_UNISTD_H was false so it never included unistd.h.
The attached file is a modified version where fork seems to work. Running it prints "success" twice.
Hi, same problem here with asymptote. strace output and build.log will follow as attachment. homunculus tmp # emerge -pv asymptote These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild U ] media-gfx/asymptote-1.70 [1.66] USE="X boehm-gc doc* examples imagemagick python vim-syntax -emacs -fftw -gsl -latex -sigsegv" 0 kB -------------------------------------------------------------------- homunculus tmp # emerge --info Portage 2.1.6.13 (default/linux/x86/2008.0, gcc-4.1.2, glibc-2.9_p20081201-r2, 2.6.28-gentoo-r3 i686) ================================================================= System uname: Linux-2.6.28-gentoo-r3-i686-AMD_Athlon-tm-_64_Processor_2800+-with-gentoo-2.0.0 Timestamp of tree: Mon, 04 May 2009 18:15:02 +0000 app-shells/bash: 4.0_p17-r1 dev-java/java-config: 1.3.7-r1, 2.1.7 dev-lang/python: 2.4.4-r15, 2.5.4-r2, 2.6.2 dev-python/pycrypto: 2.0.1-r8 dev-util/cmake: 2.6.3-r1 sys-apps/baselayout: 2.0.0 sys-apps/openrc: 0.4.3-r2 sys-apps/sandbox: 1.9 sys-devel/autoconf: 2.13, 2.63-r1 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2 sys-devel/binutils: 2.19.1-r1 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6a virtual/os-headers: 2.6.28-r1 ACCEPT_KEYWORDS="x86 ~x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=i686 -O2 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-march=i686 -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo ftp://gd.tuwien.ac.at/opsys/linux/gentoo/ ftp://130.59.10.34/mirror/gentoo/ http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo" LDFLAGS="-Wl,-O1" LINGUAS="en en_US en_GB de de_DE de_AT" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="3dnow 3dnowext X a52 aac acl acpi alsa audiofile bash-completion berkdb boost bzip2 cairo cddb cdparanoia cdr cli cracklib crypt cscope cups dbus dga directfb divx doc dri dvd dvdr dvdread embedded encode examples exif fbcon ffmpeg firefox flac foomaticdb fortran ftp gdbm gif gphoto2 gpm graphviz gstreamer hal htmlhandbook iconv id3tag imagemagick imlib ipv6 isdnlog jack java javascript jpeg jpeg2k kde kipi ladcca ladspa laptop lash libg++ libsamplerate libwww lm_sensors lv2 mad mbox midi mime mmap mmx mmxext mng mozilla mp3 mpeg mplayer mtp mudflap musicbrainz ncurses nls nptl nptlonly nsplugin nvidia ogg openal opengl openmp pam pcre pdf perl png pppd python qt3 qt4 readline realmedia recode redland reflection rtc sdl session spl sqlite sse sse2 ssl svg svga sysfs tcpd tetex theora threads tiff truetype unicode usb vcd vim-syntax vorbis win32codecs x86 xine xorg xosd xpm xv xvid xvmc zlib" ALSA_CARDS="emu10k1 ice1712" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="canon" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US en_GB de de_DE de_AT" NETBEANS_MODULES="ide nb harness" USERLAND="GNU" VIDEO_CARDS="vga nv nvidia" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS Created attachment 190378 [details]
build.log of 'emerge asymptote'
Created attachment 190380 [details]
abstract of 'strace -f emerge asymptote'
The whole file is too big. I can send a larger abstract compressed on demand.
This line before I pressed CTRL+C was
18769 futex(0xb7ec92b0, FUTEX_WAIT_PRIVATE, 2, NULL) = ? ERESTARTSYS (To be restarted)
(In reply to comment #8) > same problem here with asymptote. Unlikely that this is a problem of Emacs or of asymptote, so reassigning. @toolchain: Any idea why fork would hang? Same problem here with emacs-cvs 23 Can anybody see in the trace what futex might be waiting for? Is there anything I can do to help analysis? Maybe some hints where to start searching or what to test. This issue prevents me from updating my system. (In reply to comment #13) > Can anybody see in the trace what futex might be waiting for? > Is there anything I can do to help analysis? Maybe some hints where to start > searching or what to test. I wonder if this could be a sandbox issue? Can you try to disable the sandbox (remove it from FEATURES) or to downgrade to some earlier version? FEATURES"-sandbox" emerge asymptote finishes successfully. So I'm happy for now, but have no clue what this means for this bug#. Thanks a lot Ulrich (In reply to comment #14) (In reply to comment #14) > (In reply to comment #13) > > Can anybody see in the trace what futex might be waiting for? > > Is there anything I can do to help analysis? Maybe some hints where to start > > searching or what to test. > > I wonder if this could be a sandbox issue? Can you try to disable the sandbox > (remove it from FEATURES) or to downgrade to some earlier version? > You are right. Downgrading sandbox to version 1.7 can solve this problem. (In reply to comment #14) > (In reply to comment #13) > > Can anybody see in the trace what futex might be waiting for? > > Is there anything I can do to help analysis? Maybe some hints where to start > > searching or what to test. > > I wonder if this could be a sandbox issue? Can you try to disable the sandbox > (remove it from FEATURES) or to downgrade to some earlier version? > Downgrading also solved my issue with emacs newer sandbox grabs locks before forking. if the locking methods are broken (your kernel sucks or something), then i imagine things will hang. does the example fork() test work when just doing: sandbox ./a.out you should also post the full build output of `emerge sandbox` Created attachment 193596 [details]
sandbox build.log
Here is the build log for sandbox-2.0 with which I'm having the same problem.
Running the configure fork test as 'sandbox ./a.out' runs successfully.
*** Bug 282712 has been marked as a duplicate of this bug. *** Reopening the bug, reported did his part. Another similar issue has been reported for net-analyzer/ntop (see bug 282712). I just downgraded to sandbox 1.7 and it has also fixed my issue with ntop. sandbox-2.1 does not solve this problem either. *** Bug 283924 has been marked as a duplicate of this bug. *** *** Bug 284907 has been marked as a duplicate of this bug. *** i know what is hanging, but i dont know why -- sandbox has internal locking now as it easily had race conditions in multithreaded applications. that lock is obtained at the fork() function call as you could easily hit problems with threaded apps forking, but a hang there means the lock has been obtained elsewhere too and never released (which is bad), or the futex is getting screwed up by someone (which is worse). going by the # of reports, very few people are experiencing this. not sure it can be solved remotely. Not sure about the fat that only few are hit by this bug. Check mplayer reported issues, IMHO they are related. What do you mean about solving it remotely? If this can help I can try to debug this issue as I can reproduce it easily. Let me know. i dont know what bug reports you vaguely refer to. this issue only applies to hangs when fork() is invoked. i either need info on how to reproduce the issue or access to a failing system. saying "emerge foo" isnt going to work as many of the reported packages ive emerged on a bunch of different systems w/out problems. same thing happened to me with sandbox 2.0 ... sandbox 2.2 fixes it for me! yay .. thanks@toolchain ;) unless someone can say sandbox-2.2 is broken for them, i'll assume we're ok now |