|Summary:||Odd segmentation fault error on "Safely unmerging already-installed instance" line|
|Product:||Gentoo Linux||Reporter:||Sophie Hamilton <gentoo-bugs>|
|Component:||[OLD] Unspecified||Assignee:||Gentoo Sound Team <sound>|
|Package list:||Runtime testing required:||---|
emerge.log - everything since last successful unmerge.
out.log - output on stdout from failed emerge command
err.log.bz2 - bzip'd output on stderr (includes strace) from failed emerge command
Description Sophie Hamilton 2005-08-10 12:20:00 UTC
I'm unsure where this bug lies, so I hope you'll forgive me for posting it in this category. Here's the story: I was emerging media-sound/museseq-0.6.2-r1 over itself (actually, I had forgotten that it was installed, so I wasted about 45 minutes while it was compiling, but I had enabled a USE flag since anyway - "fluidsynth".) It compiled and installed okay, but when emerge went to unmerge the existing instance, it promptly segfaulted. Since I'm unsure where the problem lies, I copied the entire buffer of the Konsole session I was in. As this would be too big to reproduce in this bug report, I have uploaded it to http://matrix.theblob.org/lmuse.txt . This unfortunately doesn't include everything, but at the bottom of the file, you can see where the fault occurred. For reference, here is the general structure of the file, with cuts represented as "[...]": ===== [...] >>> Test phase [not enabled]: media-sound/museseq-0.6.2-r1 >>> Install museseq-0.6.2-r1 into /var/tmp/portage/museseq-0.6.2-r1/image/ category media-sound [...] >>> Completed installing museseq-0.6.2-r1 into /var/tmp/portage/museseq-0.6.2-r1/image/ >>> Merging media-sound/museseq-0.6.2-r1 to / [...] >>> /usr/share/muse/instruments/ns5r.idf >>> /usr/share/muse/instruments/Yamaha-P50m.idf --- /usr/share/muse/plugins/ >>> /usr/share/muse/plugins/1050.ui >>> Safely unmerging already-installed instance... Segmentation fault downstairs media-sound # ===== My output from "emerge info" is in the relevant section below. The command which I used to install museseq was a simple "emerge -av museseq". The last line in /var/log/emerge.log is: 1123692665: === (2 of 2) Compiling/Merging (media-sound/museseq-0.6.2-r1::/usr/portage/media-sound/museseq/museseq-0.6.2-r1.ebuild) (the first package to be installed was media-sound/fluidsynth-1.0.5, which installed fine.) I haven't had this problem with any other package, and I haven't done anything with emerge since (apart from "emerge info" - see below), in case I did anything to get in your way of diagnosing the bug. If you need any additional logs or any output, I'm happy to provide it to you. I haven't tried to re-emerge the package, so I can't tell you if it's reproducible. If you'd like me to try, I can have a go. Thanks for reading! Gentoo devs are the best. :D Reproducible: Didn't try Steps to Reproduce: I'm not certain if it's reproducible, but for the record, these are the steps that would have happened: 1. emerge museseq. (/var/db/pkg/media-sound/museseq-0.6.2-r1/USE shows that the following USE flags were in effect: "x86 X acpi alsa apm arts avi berkdb bitmap-fonts cdr crypt cups dvd encode esd f77 fam flac font-server foomaticdb fortran gd gdbm gif gnome gphoto2 gpm gstreamer gtk gtk2 imagemagick imlib ipv6 jack java jbig jpeg kde libg++ libwww mad mikmod mmx motif mpeg multitarget mysql ncurses nls nodrm oggvorbis opengl oss pam pdflib perl png python qt quicktime readline sdl slang spell sse ssl svga tcpd tiff truetype truetype-fonts type1-fonts xml2 xmms xv zlib". That file was last modified on Jan 21 2005, so evidently the second emerge didn't get to update the file before it segfaulted.) 2. emerge museseq again. Actual Results: On the automatic unmerge, emerge segfaulted. (for my USE flags in this operation, see the output of "emerge info" below.) Expected Results: Unmerged the instance safely and registered the package in the favorites file, etc. Portage 184.108.40.206-r2 (default-linux/x86/2005.0, gcc-3.3.5-20050130, glibc-220.127.116.1141102-r1, 2.6.9-gentoo-r9 i686) ================================================================= System uname: 2.6.9-gentoo-r9 i686 Intel(R) Pentium(R) 4 CPU 1400MHz Gentoo Base System version 1.4.16 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.3 [enabled] dev-lang/python: 2.3.5 sys-apps/sandbox: 1.2.10 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.5 sys-devel/binutils: 18.104.22.168.2-r10 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.4.22-r1 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=pentium4 -mcpu=pentium4 -O3 -pipe -fforce-addr -falign-functions=4 -fprefetch-loop-arrays -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /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/share/config /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=pentium4 -mcpu=pentium4 -O3 -pipe -fforce-addr -falign-functions=4 -fprefetch-loop-arrays -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://gentoo.blueyonder.co.uk/ http://distfiles.gentoo.org/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/home/ciaran/portage/overlay" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X acpi alsa apm avi berkdb bitmap-fonts cdr crypt cups curl dga divx4linux dvd eds emboss encode esd fam flac fluidsynth foomaticdb fortran gd gdbm gif gmail gnome gphoto2 gpm gstreamer gtk gtk2 imagemagick imlib ipv6 jack java jbig joystick jpeg kde kdeenablefinal ladspa libg++ libwww mad mikmod mmx mmxext motif mozsvg mp3 mpeg multitarget mysql ncurses nls nodrm nptl ogg oggvorbis opengl oss pam pdflib perl pic png povray ppds python qt quicktime readline real samba sdl slang sse sse2 ssl svga tcltk tcpd tiff truetype truetype-fonts type1-fonts v4l vorbis xine xml2 xmms xv zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 1 Sophie Hamilton 2005-08-14 13:41:42 UTC
An update on this: Forgetting what I said about not doing any more emerges until you said (sorry guys!) I did an "emerge -u world" after sync'ing, and I had the same problem on a different package, sys-apps/man-pages-2.02. This was the first package to be unmerged after museseq, so maybe it's some sort of problem with fluidsynth and/or the "fluidsynth" USE flag? If not, then I doubt that it's a problem with any particular packages, but rather with emerge, and furthermore, probably something on my system. Here are the last few lines of my /var/log/emerge.log file: ===== 1123968552: Started emerge on: Aug 13, 2005 22:29:12 1123968552: *** emerge --update world 1123968558: >>> emerge (1 of 7) sys-apps/man-pages-2.07 to / 1123968558: === (1 of 7) Cleaning (sys-apps/man-pages-2.07::/usr/portage/sys-apps/man-pages/man-pages-2.07.ebuild) 1123968560: === (1 of 7) Compiling/Merging (sys-apps/man-pages-2.07::/usr/portage/sys-apps/man-pages/man-pages-2.07.ebuild) 1123968689: === (1 of 7) Post-Build Cleaning (sys-apps/man-pages-2.07::/usr/portage/sys-apps/man-pages/man-pages-2.07.ebuild) 1123968693: >>> AUTOCLEAN: sys-apps/man-pages 1123968698: === Unmerging... (sys-apps/man-pages-2.02) ===== I should note here that this seems to be a generic thing about unmerging, because this time it was an update, not a re-emerge of the same version. The output this time is at http://matrix.theblob.org/man-pages.txt . Once more, a summary: ===== >>> /usr/share/man/man3p/cacoshl.3p.gz >>> /usr/share/man/man3p/sinl.3p.gz [...] >>> /usr/share/man/man3p/fseeko.3p.gz >>> /usr/share/man/man3p/memmove.3p.gz >>> Regenerating /etc/ld.so.cache... >>> sys-apps/man-pages-2.07 merged. sys-apps/man-pages selected: 2.02 protected: 2.07 omitted: none >>> 'Selected' packages are slated for removal. >>> 'Protected' and 'omitted' packages will not be removed. >>> Waiting 5 seconds before starting... >>> (Control-C to abort)... >>> Unmerging in: 5 4 3 2 1 >>> Unmerging sys-apps/man-pages-2.02... No package files given... Grabbing a set. Segmentation fault downstairs ciaran # ===== I'm at a bit of a loss here. I've bumped the severity up a level because it's causing me not to be able to unmerge packages, it seems, and files are left on the system. I'm attaching everything in my emerge.log file since my last successful unmerge. Unfortunately a lot of packages has been emerged, and of course the cause might not even be in there. But it's there if you need to look at it. More as I find things out.
Comment 2 Sophie Hamilton 2005-08-14 13:46:18 UTC
Created attachment 65966 [details] emerge.log - everything since last successful unmerge. Here's everything since my last successful unmerge. The unmerge command that was successful is also included in this log, at the beginning. Notice that for the unmerge of media-sound/museseq-0.6.2-r1 and sys-apps/man-pages-2.02 (having been upgraded to sys-apps/man-pages-2.07), there is no "*** exiting successfully" line, because the segfault occurred.
Comment 3 Marius Mauch (RETIRED) 2005-08-14 15:00:56 UTC
Well, hard to debug without knowing whate xactly segfaults. strace log would help.
Comment 4 Sophie Hamilton 2005-08-15 03:47:57 UTC
Dangit, this appears to be an intermittent problem. I looked for a package to unmerge, and chose esearch because it's both small and I have eix now anyway, which is a lot faster. I tried doing the command "strace -f emerge unmerge esearch 2>err.log | tee out.log", but the command completed okay, and the package was unmerged properly. So I re-emerged esearch, hoping to try some different things. The emerge completed fine, but then, unexpectedly (for me, anyway), it un-emerged sys-apps/man-pages-2.02; I'm guessing that it was noted in a file somewhere that that unemerge should take place, and emerge saw it hadn't been done yet. In any case, that unemerge completed successfully too. More info as I can come up with it.
Comment 5 Sophie Hamilton 2005-08-15 04:01:02 UTC
Okay, I think I just got another segfault. This time I did "strace -f emerge esearch 2>err.log | tee out.log" to re-emerge esearch on top of itself. I'll attach both files (well, I'll bzip2 err.log as it's 23MB) to this bug.
Comment 6 Sophie Hamilton 2005-08-15 04:02:56 UTC
Created attachment 65994 [details] out.log - output on stdout from failed emerge command
Comment 7 Sophie Hamilton 2005-08-15 04:04:23 UTC
Created attachment 65995 [details] err.log.bz2 - bzip'd output on stderr (includes strace) from failed emerge command
Comment 8 Sophie Hamilton 2005-08-22 05:15:11 UTC
Just a quick update. This is still happening, even after a reboot, and it still seems to be somewhat intermittent. Is there any more information I can give that might help?
Comment 9 Sophie Hamilton 2005-08-22 14:37:56 UTC
Another update; I used a rescue Portage archive to emerge the latest Portage again. A test update of another package seemed to work, so here's hoping. It was at this point that I realised I had forgotten to mention something that I really should have mentioned at the start, but I completely forgot about: I had actually modified the 'emerge' command as directed in http://forums.gentoo.org/viewtopic.php?t=153921 to use psyco to apparently speed things up. It is entirely possible that that's what caused it, although I didn't have problems at first. Nonetheless, I'll be testing it now with and without and will report back on whether psyco seems to be causing the problem. If that's indeed the problem, then I humbly apologise for wasting the Gentoo devs' time. :(
Comment 10 Sophie Hamilton 2005-08-22 14:40:44 UTC
Actually, looking at the forum thread, others have reported segfaults in exactly the same manner. I'm very embarrassed now. I'm truly sorry. This bug should probably be marked INVALID now.
Comment 11 Alec Warner 2005-08-22 14:45:56 UTC
Interesting...but not a supported feature ;)
Comment 12 Jason Stubbs (RETIRED) 2005-08-22 16:29:02 UTC
Note, psyco doesn't really make emerge faster. In fact, my testing showed that the overhead of doing a full (rather than JIT) optimization actually made it slower.
Comment 13 Sophie Hamilton 2005-08-23 00:01:38 UTC
Yeah, I noticed that I wasn't really getting any speedup. I should have removed it knowing that, but I left it in and completely forgot about it. If I'd remembered I would have tried that first before submitting the bug. As I said in the tread, I won't be touching emerge again. :D