Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 72609 - xmms has segmentation fault on startup
Summary: xmms has segmentation fault on startup
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High critical (vote)
Assignee: Jeremy Huddleston (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-27 00:44 UTC by Vidar Skjelanger
Modified: 2004-12-04 13:35 UTC (History)
1 user (show)

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


Attachments
Output from "strace xmms" (strace-xmms.log,264.68 KB, text/plain)
2004-11-27 00:46 UTC, Vidar Skjelanger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vidar Skjelanger 2004-11-27 00:44:02 UTC
xmms has started segfaulting on startup. It gives this output:

---------------------------------------------------------------
fido@myrkskog ~ $ xmms
Message: fmt 5, channels: 2

Segmentation fault

You've probably found a bug in XMMS, please visit
http://bugs.xmms.org and fill out a bug report.
-------------------------------------------------------------

I'm using xmms-1.2.10-r9

I've tried deleting the .xmms/ directory, but that does not help. However, the .xmms/ dir is recreated before the segfault.

Reproducible: Always
Steps to Reproduce:
1. Start xmms in a shell
2. There you go...
3.

Actual Results:  
segfault

Expected Results:  
startup

myrkskog privoxy-3.0.3 # emerge info
Portage 2.0.51-r3 (default-linux/x86/2004.0, gcc-3.4.3, glibc-2.3.4.20041102-r0,
2.6.9-rc4 i686)
=================================================================
System uname: 2.6.9-rc4 i686 AMD Athlon(TM) XP 2200+
Gentoo Base System version 1.6.6
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.92.0.2-r1
Headers:  sys-kernel/linux-headers-2.4.22
Libtools: sys-devel/libtool-1.5.2-r7
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=athlon-xp -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.1/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env
/usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config
/usr/lib/mozilla/defaults/pref /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon-xp -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict userpriv"
GENTOO_MIRRORS="ftp://ftp.uninett.no/pub/linux/Gentoo ftp://mirror.pudas.net/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X alsa apm arts avi berkdb bitmap-fonts cdr crypt cups doc dvd emacs
encode esd f77 fam flac foomaticdb fortran gif gnome gphoto2 gstreamer gtk gtk2
guile imagemagick imlib jack java jikes jpeg junit kde libg++ libwww mad maildir
mikmod mmxmotif mozdevelop mozilla mpeg msn mule mysql ncurses nls nocd
oggvorbis opengl oss pam pdflib perl png python qt quicktime readline samba
scanner sdl slang spell sqlite ssl svga tcltk tcpd tetex tiff truetype unicode
usb x86 xml xml2 xmms xv zlib"
Comment 1 Vidar Skjelanger 2004-11-27 00:46:27 UTC
Created attachment 44809 [details]
Output from "strace xmms"

Here is the output from "strace xmms", if that helps.
Comment 2 Jeremy Huddleston (RETIRED) gentoo-dev 2004-11-27 01:43:43 UTC
did youu upgrade from a previous release?  If so, please re-emerge all your plugins and try again...
Comment 3 Vidar Skjelanger 2004-11-27 03:41:16 UTC
I probably did (this happened some time ago).

I re-emerged all plugins I could find (did an emerge -s xmms), but that did not help. Here are the ones I found:

xmms-alarm (0.3.6)
xmms-arts (0.7.1-r1)
xmms-extra (0.1)
xmms-find (0.5.2)
xmms-gdancer (0.4.6)
xmms-imms (1.2a)
xmms-infopipe (1.3)
xmms-itouch (0.1.2-r1)
xmms-jack (0.10)
xmms-kde (3.1_beta1)
xmms-mad (0.5.6-r1)
xmms-midi (0.03)
xmms-volnorm (0.8.1)

I re-emerged them one by one, but it still segfaults.
Also tried re-emerging xmms itself, that didn't help either.
Comment 4 Jeremy Huddleston (RETIRED) gentoo-dev 2004-11-27 03:47:59 UTC
try this...

grep /usr/lib/xmms /var/db/pkg/*/*/CONTENTS | cut -f1 -d: | sort | uniq

that should show you all the packages that install plugins there.

Did a previous version work?  can you try removing all the plugins except the ones in the media-sound/xmms package and remove your ~/.xmms directory?
Comment 5 Vidar Skjelanger 2004-11-27 04:56:37 UTC
Yes, it worked before (for years).

Ok, did that. In addition to the others, this found

media-libs/faad2-2.0-r3
media-libs/flac-1.1.1
media-plugins/alsa-xmms-0.9.12

First i tried re-emerging them. That did not help, but I found that I needed to revdep-rebuild and remove libFLAC.so.4 and libFLAC++.so.2, so I did that.

I found alsa-xmms actually does not exist any more.

Then I unmerged all three of them. But it still segfaults.
Comment 6 Vidar Skjelanger 2004-11-27 05:34:55 UTC
Also tried unmerging all the other plugins. Still segfaults.
Comment 7 Vidar Skjelanger 2004-11-27 09:07:30 UTC
Installed Beep Media Player (never been installed before) and now THAT crashes as well:

fido@myrkskog ~ $ beep-media-player

Received SIGSEGV

This could be a bug in BMP. If you don't know why this happened, send a mail to us at beepmp-devel@lists.sourceforge.net

[1]+  Exit 127                bmp
Aborted
Comment 8 Jeremy Huddleston (RETIRED) gentoo-dev 2004-11-27 11:49:51 UTC
ok... can you try 1.2.10-r5 again just to figure out if it's xmms or not?  Are other sound apps working (zinf is a good one to try... bmp isn't too stable)?  Have youu recently changed alsa versions? 
Comment 9 Vidar Skjelanger 2004-11-27 13:15:26 UTC
1.2.10-r5 seems to work ok!

As to other sound applications, kaffeine and mplayer has worked the whole time.

I changed from alsa 1.0.6 to 1.0.7 a couple of days ago, but this problem started long before that if I'm not totally mistaken... I upgraded from xmms-1.2.10-r7 to 1.2.10-r9 november 7th, that seems about right.
Comment 10 Jeremy Huddleston (RETIRED) gentoo-dev 2004-11-27 14:14:12 UTC
ok...

Can you try changing PATCHVER="2.0" in the ebuild... this will take it back to the first change after -r7.
Comment 11 Vidar Skjelanger 2004-11-27 15:22:02 UTC
Ok, did that, now it segfaults.
Comment 12 Vidar Skjelanger 2004-11-27 15:47:09 UTC
...and so does patchlevel 0.2... am I not doing it right?

I change the patchlevel in the ebuild, then I do a

   ebuild /usr/portage/media-sound/xmms/xmms-1.2.10-r9.ebuild digest

(because otherwise it will not merge), and then i do

   emerge =xmms-1.2.10-r9
Comment 13 Jeremy Huddleston (RETIRED) gentoo-dev 2004-11-28 04:04:27 UTC
I assume you mean 2.0, not 0.2...

Can you please provide me the output of 'ldd /usr/bin/xmms' ... 

Also, can you try narrowing down which patch causes the problem?  You can add EPATCH_EXCLUDE="<file 1> <file 2>" to the ebuild to force it to leave out patches...

I wish that strace was more helpful...
Comment 14 Vidar Skjelanger 2004-11-28 06:46:08 UTC
What I meant was, i first tried 2.0, then 0.2, and it still segfaults.

Now I've tried removing all 20 patches using the EPATCH_EXCLUDE thing (and verified during build that no patches were applied), but it still segfaults.

The good thing is, I'm learning new things all along! ;)
Comment 15 Vidar Skjelanger 2004-11-28 06:48:02 UTC
Oh, I forgot: Here is the output from 'ldd /usr/bin/xmms':

fido@myrkskog ~ $ ldd /usr/bin/xmms
        linux-gate.so.1 =>  (0xffffe000)
        libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0xb7fbc000)
        libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0xb7fa4000)
        libXxf86vm.so.1 => /usr/X11R6/lib/libXxf86vm.so.1 (0xb7f9f000)
        libxmms.so.1 => /usr/lib/libxmms.so.1 (0xb7f92000)
        libgtk-1.2.so.0 => /usr/lib/libgtk-1.2.so.0 (0xb7e4e000)
        libgdk-1.2.so.0 => /usr/lib/libgdk-1.2.so.0 (0xb7e17000)
        libgmodule-1.2.so.0 => /usr/lib/libgmodule-1.2.so.0 (0xb7e14000)
        libgthread-1.2.so.0 => /usr/lib/libgthread-1.2.so.0 (0xb7e10000)
        libglib-1.2.so.0 => /usr/lib/libglib-1.2.so.0 (0xb7dec000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xb7d9a000)
        libdl.so.2 => /lib/libdl.so.2 (0xb7d96000)
        libXi.so.6 => /usr/X11R6/lib/libXi.so.6 (0xb7d8e000)
        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0xb7d80000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0xb7ca1000)
        libm.so.6 => /lib/libm.so.6 (0xb7c7e000)
        libc.so.6 => /lib/libc.so.6 (0xb7b6b000)
        /lib/ld-linux.so.2 (0xb7feb000)
Comment 16 Jeremy Huddleston (RETIRED) gentoo-dev 2004-11-28 14:35:05 UTC
Ok, now I'm confused...

when you emerge xmms-1.2.10-r5, it works...
when youu have PATCH_VER=1.0 in 1.2.10-r10, it fails?  PATCH_VER=1.0 is what 1.2.10-r5 is...

The ldd shows you're not using and libs in /usr/local... so that's not it either...

Comment 17 Vidar Skjelanger 2004-11-28 15:52:38 UTC
(I suppose you mean -r9, not -r10?)

Actually, the filesize (for /usr/bin/xmms) is different: The -r9 file (with patchver 1.0) is 993992 bytes, while the -r5 file is 1010504 bytes.

It seems that the patches in xmms-1.2.10-gentoo-patches-1.0.tar.bz2 are applied when merging -r5, while no patches at all are applied when merging -r9 with patchver 1.0:

from -r5:
-------------------------------------------
>>> Unpacking source...
>>> Unpacking xmms-1.2.10.tar.bz2 to /var/tmp/portage/xmms-1.2.10-r5/work
>>> Unpacking gentoo_ice-xmms-0.2.tar.bz2 to /var/tmp/portage/xmms-1.2.10-r5/work
>>> Unpacking xmms-1.2.10-gentoo-patches-1.0.tar.bz2 to /var/tmp/portage/xmms-1.2.10-r5/work
 * Applying xmms-1.2.10-gcc34.patch ...                                       [ ok ]
 * Applying xmms-1.2.10-id3v2edit.patch ...                                   [ ok ]
 * Applying xmms-1.2.10-jump.patch ...                                        [ ok ]
 * Applying xmms-1.2.10-sigterm.patch ...                                     [ ok ]
 * Applying xmms-1.2.10-recode-csa27.3.patch ...                              [ ok ]
 * Applying xmms-1.2.10-recode-csa27.3.regressionFix.patch ...                [ ok ]
 * Applying xmms-1.2.10-recode-csa27.3.nullTitle.patch ...                    [ ok ]
 * Applying xmms-1.2.10-fhs-skinsdir.patch ...                                [ ok ]
 * Applying xmms-1.2.10-diskwriter-audio.patch ...                            [ ok ]
 * Applying xmms-1.2.10-random.patch ...                                      [ ok ]
 * Applying xmms-1.2.10-sid-songpos.patch ...                                 [ ok ]
 * Applying xmms-1.2.10-alsa-pause.patch ...                                  [ ok ]
 * Applying xmms-1.2.10-stream-seek.patch ...                                 [ ok ]
--------------------------------------------------



From -r9 with patchver 1.0:
---------------------------------------------------
>>> Unpacking source...
>>> Unpacking xmms-1.2.10.tar.bz2 to /var/tmp/portage/xmms-1.2.10-r9/work
>>> Unpacking gentoo_ice-xmms-0.2.tar.bz2 to /var/tmp/portage/xmms-1.2.10-r9/work
>>> Unpacking xmms-1.2.10-gentoo-patches-1.0.tar.bz2 to /var/tmp/portage/xmms-1.2.10-r9/work
>>> Unpacking gnomexmms.xpm to /var/tmp/portage/xmms-1.2.10-r9/work
unpack gnomexmms.xpm: file format not recognized. Ignoring.
 * Applying various patches (bugfixes/updates) ...
 * Done with patching
------------------------------------------


And looking closely, there's an error unpacking gnomexmms.xpm (which the -r5 emerge does not try to unpack...?)

Confused? You and me both! :)
Comment 18 Jeremy Huddleston (RETIRED) gentoo-dev 2004-11-28 16:49:22 UTC
yeah, I meant -r9...

ok... with the PATCH_VER=1.0 in -r9, it's not applying any patches... which means you're getting vanilla xmms...  that's because with 2.0, I switched over to a patchdir approach rather than applying each patch in src_unpack()...

hmm... I wonder if it's something done by elibtoolize as it makes no sense that -r5 should work and vanilla fail.

Can you try changing src_unpack to asrc_unpack (just rename it so it doesn't get called)?  That will make it 100% vanilla xmms-1.2.10...

gnomexmms.xpm is just an icon that got added sometime after 1.2.10-r5 for the .desktop file...
Comment 19 Vidar Skjelanger 2004-11-28 23:18:10 UTC
Ok, renamed to asrc_unpack and re-emerged. Filesize is the same and it still segfaults.

Also did the same trick to the -r5 ebuild, and now that produces a file with the same size that ALSO segfaults.
Comment 20 Jeremy Huddleston (RETIRED) gentoo-dev 2004-11-29 00:41:31 UTC
unh huh... ok, let's try this...

let's work with the -r5 ebuild... fix src_unpack() back, then comment out patches in the ebuild until you find the one that fixes the problem... verify that adding that patch fixes it, and removing it breaks it...

Also, what is your locale?
Comment 21 Vidar Skjelanger 2004-11-29 08:52:32 UTC
Yep, we have a winner: Removing the sid-songpos patch breaks it. Adding it back fixes it.

Where do I find out what my locale is?
Comment 22 Jeremy Huddleston (RETIRED) gentoo-dev 2004-11-29 12:08:20 UTC
You can run 'locale' on the command line, but that seems irrelevant now...

sid-songpos is in 1.2.10-r9... hmm...

I think this problem is resulting from an ABI change in libxmms between -r5 and -r9 because of plugins that haven't been removed.  Are you sure nothing is in /usr/lib/xmms or ~/.xmms?  Can you please try:

mv ~/.xmms ~/.xmms.bak
mv /usr/lib/xmms /usr/lib/xmms.bak
emerge -v \=xmms-1.2.10-r9 (using the untouched version)

Comment 23 Vidar Skjelanger 2004-11-29 22:52:44 UTC
Ok, tried that. Still segfaults.

Also inspected the contents of /usr/lib/xmms_bak manually. Everything in there resulted either from the previous compile of xmms itself, or from the remerge of all the plugins I did on saturday.

Here is the output from 'locale', for what it's worth:

LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
Comment 24 Jeremy Huddleston (RETIRED) gentoo-dev 2004-11-29 23:40:52 UTC
ok... this makes absa-fricken-lutely NO sense whatsoever...  The thing that bothers me most is that it is breaking with vanilla, works with -r5, and breaks with -r10... that highly suggests something else is depending on some changes that were in -r5... UGG!  I really don't know what to say...  I'm stumped.
Comment 25 Vidar Skjelanger 2004-11-30 12:58:38 UTC
Don't know if this makes it more understandable, but now it actually WORKS:

I had to restart (for a different reason) and when I booted it just hung when loading the snd-oss-seq (or something like that) driver. I had to go back and boot a 2.4 kernel to even get a shell. So I re-emerged alsa-driver (which according to 'emerge -s alsa-driver' was already at the latest version), and now that one wouldn't compile because I had config-snd enabled in the kernel.

So I turned that off, recompiled the kernel, rebooted, re-emerged alsa-driver and then re-emerged xmms, and then it just works.

Anyway, thanks for all your help! If nothing else, I learned a whole lot about ebuilds! :)
Comment 26 Jeremy Huddleston (RETIRED) gentoo-dev 2004-11-30 17:35:55 UTC
the hang is a module-init-tools bug (somewhere in bugzilla... running late, so can't find it for you)

what sound card driver are you using?  And, to confirm, it works with alsa-driver-1.0.7, right?
Comment 27 Vidar Skjelanger 2004-12-01 00:08:10 UTC
Found the bug... 72099.

My sound driver is snd_emu10k1 and the alsa-driver version is 1.0.7-r1. That was also the version before I re-emerged it.
Comment 28 Jeremy Huddleston (RETIRED) gentoo-dev 2004-12-04 13:35:29 UTC
closing as the only remaining bug is in another report...