Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 118869 - media-sound/museseq-0.7.2-r5 segfaults on amd64
Summary: media-sound/museseq-0.7.2-r5 segfaults on amd64
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Frank van de Pol (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-13 05:14 UTC by Frank van de Pol (RETIRED)
Modified: 2006-01-13 13:15 UTC (History)
3 users (show)

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


Attachments
screenlog of emerge museseq (screenlog.0,457.16 KB, text/plain)
2006-01-13 08:09 UTC, Frank van de Pol (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frank van de Pol (RETIRED) gentoo-dev 2006-01-13 05:14:55 UTC
Seems to emerge OK on amd64, but segfaults when started. Works ok on x86.


gdb museseq
GNU gdb 6.0
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu"...(no debugging symbols found)...Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) run
Starting program: /usr/bin/museseq
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...[Thread debugging using libthread_db enabled]
[New Thread 46912548909184 (LWP 11508)]
Trying RTC timer...
got timer = 13
QObject::connect: No such signal PartCanvas::horizontalScroll(int)
QObject::connect:  (sender name:   'unnamed')
QObject::connect:  (receiver name: 'unnamed')
Arranger::configChanged - no bitmap!
starting with default template
Arranger::configChanged - no bitmap!
[New Thread 1082132832 (LWP 11511)]

Program received signal SIG33, Real-time event 33.
[Switching to Thread 1082132832 (LWP 11511)]
0x00002aaaad60fd1b in __lll_mutex_lock_wait () from /lib/libpthread.so.0
(gdb) bt
#0  0x00002aaaad60fd1b in __lll_mutex_lock_wait () from /lib/libpthread.so.0
#1  0x0000000000000002 in ?? ()
#2  0x00002aaaad3e7930 in ?? ()
#3  0x00002aaaad60bd56 in pthread_create@@GLIBC_2.2.5 () from /lib/libpthread.so.0
#4  0x0000000000000001 in ?? ()
(gdb) thread apply all bt

Thread 2 (Thread 1082132832 (LWP 11511)):
#0  0x00002aaaad60fd1b in __lll_mutex_lock_wait () from /lib/libpthread.so.0
#1  0x0000000000000002 in ?? ()
#2  0x00002aaaad3e7930 in ?? ()
#3  0x00002aaaad60bd56 in pthread_create@@GLIBC_2.2.5 () from /lib/libpthread.so.0
#4  0x0000000000000001 in ?? ()

Thread 1 (Thread 46912548909184 (LWP 11508)):
#0  0x00002aaaad60abb8 in __nptl_setxid () from /lib/libpthread.so.0
#1  0x00002aaaada86d15 in seteuid () from /lib/libc.so.6
#2  0x00000000004367ac in QValueList<QString>::detachInternal() ()
#3  0x0000000000458c44 in QValueList<QString>::detachInternal() ()
#4  0x0000000000463f03 in QValueList<QString>::detachInternal() ()
#5  0x00002aaaad9f2674 in __libc_start_main () from /lib/libc.so.6
#6  0x000000000042892a in ?? ()
#0  0x00002aaaad60fd1b in __lll_mutex_lock_wait () from /lib/libpthread.so.0
(gdb)  




Portage 2.1_pre3-r1 (default-linux/amd64/2005.1, gcc-3.4.5, glibc-2.3.6-r2, 2.6.14-gentoo-r3 x86_64)
=================================================================
System uname: 2.6.14-gentoo-r3 x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.12.0_pre13
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5, 2.4.2
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
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.16.1-r1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-pipe -O2 -march=athlon64"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/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.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-pipe -O2 -march=athlon64"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache cvs digest distlocks noauto noclean sandbox sfperms sign strict usersandbox"
GENTOO_MIRRORS="ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo http://ftp.easynet.nl/mirror/gentoo/ "
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.nl.gentoo.org/gentoo-portage"
USE="amd64 X a52 aac aalib alsa arts audiofile avi berkdb bitmap-fonts bzip2 caps cdr crypt cups curl doc dv dvd dvdr dvdread eds emboss encode esd exif expat fam fame ffmpeg flac foomaticdb fortran gd gdbm gif gimpprint glut gmp gnome gpm gstreamer gtk gtk2 guile idn imagemagick imlib jack jack-tmpfs java jpeg junit kde ladcca lcms libcaca libwww lirc lm_sensors lzw lzw-tiff mad mbox mhash mikmod mjpeg mng motif mp3 mpeg musicbrainz mysql nas ncurses nls nptl nptlonly ogg openal opengl osc pam pcre pdflib perl png ppds python qt quicktime readline recode sdl slang slp snmp speex spell sqlite ssl svg tcltk tcpd tetex theora tiff truetype truetype-fonts type1-fonts udev unicode usb userlocales v4l vorbis wmf xine xinerama xml xml2 xmms xpm xv xvid zeroconf zlib elibc_glibc kernel_linux userland_GNU"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 1 Thomas Cort (RETIRED) gentoo-dev 2006-01-13 05:56:00 UTC
In the debugging output there are a lot of lines like "#1  0x0000000000000002 in ?? ()" and "(no debugging symbols found)..." because the debugging symbols are removed unless FEATURES="debug". Also, this package has optional debugging support which isn't enabled because you don't have "debug" in your USE flags.

Could you re-emerge the package with the following command:
# FEATURES="debug" USE="debug" emerge museseq

and then post the results of running the program in gdb.
Comment 2 Frank van de Pol (RETIRED) gentoo-dev 2006-01-13 06:29:25 UTC
I just re-emerged museseq using 'FEATURES="debug" USE="debug" emerge museseq' and got this trace when run from gdb:

gdb museseq
GNU gdb 6.0
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu"...(no debugging symbols found)...Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) run
Starting program: /usr/bin/museseq
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...[Thread debugging using libthread_db enabled]
[New Thread 46912548909184 (LWP 11474)]
Trying RTC timer...
got timer = 13
QObject::connect: No such signal PartCanvas::horizontalScroll(int)
QObject::connect:  (sender name:   'unnamed')
QObject::connect:  (receiver name: 'unnamed')
Arranger::configChanged - no bitmap!
starting with default template
Arranger::configChanged - no bitmap!
[New Thread 1082132832 (LWP 11477)]

Program received signal SIG33, Real-time event 33.
[Switching to Thread 1082132832 (LWP 11477)]
0x00002aaaada8d324 in clone () from /lib/libc.so.6
(gdb) thread apply all bt

Thread 2 (Thread 1082132832 (LWP 11477)):
#0  0x00002aaaada8d324 in clone () from /lib/libc.so.6
#1  0x00002aaaad60b070 in __free_tcb () from /lib/libpthread.so.0
#2  0x0000000040800960 in ?? ()

Thread 1 (Thread 46912548909184 (LWP 11474)):
#0  0x00002aaaad60abb8 in __nptl_setxid () from /lib/libpthread.so.0
#1  0x00002aaaada86d15 in seteuid () from /lib/libc.so.6
#2  0x000000000043f22b in QValueListPrivate<QString>::QValueListPrivate() ()
#3  0x000000000046fae7 in QValueListPrivate<QString>::QValueListPrivate() ()
#4  0x000000000047d23a in QValueListPrivate<QString>::QValueListPrivate() ()
#5  0x00002aaaad9f2674 in __libc_start_main () from /lib/libc.so.6
#6  0x0000000000428bba in ?? ()
#0  0x00002aaaada8d324 in clone () from /lib/libc.so.6
(gdb)   


Which looks rather similar to the run without the debug info :-(  

However, during the compilation I spotted dozens of compiler warnings regarding implicit casts. This might be interesting since on amd64 sizeof(void *) != sizeof(int).

if x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I../..  -g -fno-exceptions -Wall -W -D_GNU_SOURCE -D_REENTRANT   -DQT_CLEAN_NAMESPACE -DQT_NO_COMPAT   -I../.. -I../../muse/widgets -I/usr/qt/3/include -I.. -I../../synti   -g -fno-exceptions -Wall -W -D_GNU_SOURCE -D_REENTRANT   -DQT_CLEAN_NAMESPACE -DQT_NO_COMPAT   -I../.. -I../../muse/widgets -I/usr/qt/3/include -I.. -I../../synti -I../../muse/widgets -DQT_SHARED -DQT_THREAD_SUPPORT -DQT_PLUGIN  -MT libwidgets_a-dentry.o -MD -MP -MF ".deps/libwidgets_a-dentry.Tpo" -c -o libwidgets_a-dentry.o `test -f 'dentry.cpp' || echo './'`dentry.cpp; \
then mv -f ".deps/libwidgets_a-dentry.Tpo" ".deps/libwidgets_a-dentry.Po"; else rm -f ".deps/libwidgets_a-dentry.Tpo"; exit 1; fi
In file included from ../evdata.h:12,
                 from ../event.h:16,
                 from ../undo.h:14,
                 from ../song.h:20,
                 from noteinfo.cpp:13:
../memory.h: In member function `void* Pool::alloc(size_t)':
../memory.h:54: warning: int format, different type arg (arg 2)
../memory.h: In member function `void Pool::free(void*, size_t)':
../memory.h:72: warning: int format, different type arg (arg 2)



To make things more interesting, when compiled with the debug flags the application *does* start without segfaults when launched from the shell. There is definitely something fishy going on....  
When quitting museseq I get a '*** glibc detected *** double free or corruption (!prev): 0x0000000000867150 ***'
Comment 3 Frank van de Pol (RETIRED) gentoo-dev 2006-01-13 08:09:18 UTC
Created attachment 77000 [details]
screenlog of emerge museseq
Comment 4 Frank van de Pol (RETIRED) gentoo-dev 2006-01-13 12:56:03 UTC
received feedback from upstream developer:

Envelope-to: frank@fpaudio.com
Delivery-date: Fri, 13 Jan 2006 19:17:33 +0100
From: Werner Schweer <ws@seh.de>
To: lmuse-developer@lists.sourceforge.net
Subject: Re: [Lmuse-developer] museseq-0.7.2_pre5 segfaults on startup on amd64
Date: Fri, 13 Jan 2006 19:17:21 +0100

On Friday 13 January 2006 14:37, Frank van de Pol wrote:
> When testing the new pre5 release before committing it to the Gentoo
> repository I noticed that pre5 runs like a charm on x86, but segfaults at
> startup on amd64 architecture.
<...>

in muse/driver/rtctimer.cpp, getTimerTicks(...) about line 144
please change
        unsigned int nn;
into
        unsigned long nn;

its also commited to cvs.

Regards,
Werner



Comment 5 Frank van de Pol (RETIRED) gentoo-dev 2006-01-13 13:15:19 UTC
patch added to portage