Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 4314

Summary: xmms segfaults when playing ogg vorbis via arts
Product: Gentoo Linux Reporter: Terje Bergström <terje>
Component: Current packagesAssignee: Brandon Low (RETIRED) <lostlogic>
Status: VERIFIED FIXED    
Severity: normal CC: ulmi01
Priority: High    
Version: 1.2   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Terje Bergström 2002-06-29 04:08:13 UTC
I hope the newlines are preserved now with mozilla (with konqueror they weren't).

I am trying to play my Ogg Vorbis files with xmms-1.2.7-r10 and arts output
plugin. Whenever xmms changes to another song, it segfaults. When I switched to
the OSS output plugin, xmms started working ok again. I compile with gcc 3.1
with options -mathlon -O3.

Here's the backtrace from gdb:

Program received signal SIGTRAP, Trace/breakpoint trap.
0x4065ba81 in sigsuspend () from /lib/libc.so.6
(gdb) bt
#0  0x4065ba81 in sigsuspend () from /lib/libc.so.6
#1  0x400324ab in pthread_create () from /lib/libpthread.so.0
#2  0x4002fbf5 in pthread_join () from /lib/libpthread.so.0
#3  0x40b25542 in vorbis_stop () from /usr/lib/xmms/Input/libvorbis.so
#4  0x400f59c8 in gtk_signal_connect_object_after ()
   from /usr/lib/libgtk-1.2.so.0
#5  0x400f559d in gtk_signal_connect_object_after ()
   from /usr/lib/libgtk-1.2.so.0
#6  0x400f426f in gtk_signal_emit () from /usr/lib/libgtk-1.2.so.0
#7  0x401214bc in gtk_widget_event () from /usr/lib/libgtk-1.2.so.0
#8  0x400ced45 in gtk_propagate_event () from /usr/lib/libgtk-1.2.so.0
#9  0x400ce96e in gtk_main_do_event () from /usr/lib/libgtk-1.2.so.0
#10 0x4015f69c in gdk_compress_exposures () from /usr/lib/libgdk-1.2.so.0
#11 0x401956f0 in g_idle_remove_by_data () from /usr/lib/libglib-1.2.so.0
#12 0x4019549f in g_idle_remove_by_data () from /usr/lib/libglib-1.2.so.0
#13 0x401944d4 in g_main_run () from /usr/lib/libglib-1.2.so.0
#14 0x400ce3d9 in gtk_main () from /usr/lib/libgtk-1.2.so.0
#15 0x0807e575 in main ()
#16 0x40649102 in __libc_start_main () from /lib/libc.so.6
(gdb) quit

Is http://bugs.xiph.org/show_bug.cgi?id=127 related to this?
Comment 1 Brandon Low (RETIRED) gentoo-dev 2002-06-29 11:12:37 UTC
hoorray, yes newlines are preserved with mozilla, I believe it has to do with
how the bugzilla forms are designed (specific number of pre-existing lines in
the bug box) and konqueror only using the first of those premade lines for any
text entered... 

anywho, about the bug, I'm going to have to go do some OGG encoding to test,
hopefully I'll be able to reproduce and fix later today.
Comment 2 Brandon Low (RETIRED) gentoo-dev 2002-06-30 20:14:27 UTC
reproduced, I'm going to work on releasing a cvs snapshot ebuild for libogg that
will fix this.
Comment 3 Brian Rozmierski 2002-07-04 17:58:06 UTC
I believe there's a bigger problem with the xmms-arts plugin. I experience
(personally) the same/similiar behavior (segfault after attempt to change song)
with the arts plugin enabled. Switching to OSS or another output plugin solves
the problem.

The bugzilla at bugs.xmms.org has quite a few closed (INVALID/WONTFIX) bugs, and
the author appears to be MIA. (Note the ebuild file has the homepage commented out.)

Further some comments posted off the plugins page at the xmms.org site
(http://www.xmms.org/comments.html?show=P101) show similiar problems
(bottom==newest post).
Comment 4 Brian Rozmierski 2002-07-04 18:10:08 UTC
(Apologies for spam -- psuedo workaround)

While digging around for a new version of the arts module, I did find that using
the OSS output plugin will work under artsdsp... Just envoke xmms as "artsdsp
xmms", and it'll kludge it's way into arts support. (Kinda) :)
Comment 5 Brandon Low (RETIRED) gentoo-dev 2002-07-05 01:09:04 UTC
The issue is in the libogg library, as the reporter mentioned.  THere will be a
new version of said library shortly, and at that time it will hit portage and
you will no longer experience this problem, that is why the xmms-arts people
WONTFIX it and such.  Please be patient.
Comment 6 Brandon Low (RETIRED) gentoo-dev 2002-07-19 18:30:26 UTC
within 1/2 hour, ogg-vorbis-1.0 packages will all be in rsync, please retest 
this with those versions as it should work perfectly, and report your results 
here.  Thanks for your patience on this one!
Comment 7 Terje Bergström 2002-07-22 14:16:39 UTC
I emerged the new version and tried recompiling everything that depends on 
libvorbis, and even re-emerged arts. That's why it took some time. 

Sorry, but xmms still crashes when I try to switch to the next song with
the arts output plugin. Now the crashing point is different, though:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 4101 (LWP 13845)]
0x00000000 in ?? ()
(gdb) bt
#0  0x00000000 in ?? ()
#1  0x410290e6 in __static_initialization_and_destruction_0(int, int) ()
   from /usr/kde/3/lib/libartsflow.so.1
#2  0x4102ecaa in _GLOBAL__D_gslMainLoop ()
   from /usr/kde/3/lib/libartsflow.so.1
#3  0x41027537 in __do_global_dtors_aux () from /usr/kde/3/lib/libartsflow.so.1
#4  0x4109e769 in _fini () from /usr/kde/3/lib/libartsflow.so.1
#5  0x40749a87 in _dl_close () from /lib/libc.so.6
#6  0x40749793 in _dl_close () from /lib/libc.so.6
#7  0x40553f4c in dlclose_doit () from /lib/libdl.so.2
#8  0x4000a1a8 in _dl_catch_error () from /lib/ld-linux.so.2
#9  0x40554286 in _dlerror_run () from /lib/libdl.so.2
#10 0x40553f22 in dlclose () from /lib/libdl.so.2
#11 0x402d8ba4 in sys_dl_close () from /usr/kde/3/lib/libartsc.so.0
#12 0x402d7dca in lt_dlclose () from /usr/kde/3/lib/libartsc.so.0
#13 0x402d667b in arts_free () from /usr/kde/3/lib/libartsc.so.0
#14 0x40860355 in artsd_loop () from /usr/lib/xmms/Output/libartsout.so
#15 0x40031a83 in pthread_start_thread () from /lib/libpthread.so.0
#16 0x40031b0f in pthread_start_thread_event () from /lib/libpthread.so.0
Comment 8 Brandon Low (RETIRED) gentoo-dev 2002-07-31 11:34:10 UTC
with latest ogg and arts I am no longer having this problem... can you still
confirm this bug with everything upgraded and all relevent binaries recompiled?
Comment 9 Brandon Low (RETIRED) gentoo-dev 2002-07-31 11:36:01 UTC
blah, I lied, it does still break on song change.  *back to the drawing board*
Comment 10 AlterEgo 2002-08-10 12:06:31 UTC
I obesrve the same thing: when using the arts plugin for xmms, the whole thing segfaults at a change of song. It ONLY occurs using GCC 3.1 (I have a parallell system working on 2.95 that runs problem-free).  There's NO relationship with ogg files: Lame encoded mp3's behave exactly the same.  There's also NO relationship with Alsa (kernel sound also produces a segfault). versions:   media-sound/alsa-driver-0.9.0_rc2 media-sound/xmms-1.2.7-r11 media-sound/xmms-arts-0.4-r3  
Comment 11 Russ Tennant 2002-08-29 11:09:27 UTC
I think this is related to the problem I am having. I've had this problem  
since upgrading to gcc 3.x. It happens regardless of the file type being 
played. It is solely tied to the arts plugin. If I try to change songs 
(forward, previous, etc.) or press stop, xmms dies. However if I change the 
output plugin to esd it works fine.  
Comment 12 Brandon Low (RETIRED) gentoo-dev 2002-09-02 22:06:22 UTC
well I'm not getting segfaults but I am now getting freezes, unfortunately I
think this is a problem with the xmms-arts upstream plugin (from reading the
xmms page) the plugin appears to have issues with artsd in kde3...
Comment 13 Brian Rozmierski 2002-09-03 00:14:03 UTC
Brandon, now that concensus has come circle back to what I discussed in 
comment 3 -- can I recommend the ebuild be modified to require kde<3 and/or 
removed/masked? 
 
The author of the plugin is MIA, and noone has steped up to take his place. 
Comment 14 Brandon Low (RETIRED) gentoo-dev 2002-09-06 18:01:01 UTC
yes, I am going to mask it at some time in the near future... when I have time.
Comment 15 Ulrik Mikaelsson 2002-10-02 05:53:09 UTC
I've encountered the same problems when playing MP3 through xmms and arts, and 
I've found a way to fix it: 
// BEGIN DIFF 
--- xmms-arts-0.4-orig/audio.c  2000-11-21 05:24:25.000000000 +0100 
+++ xmms-arts-0.4-new/audio.c   2002-10-02 12:46:57.000000000 +0200 
@@ -242,6 +242,12 @@ 
 { 
        gint length, cnt; 
 
+       int errorcode; 
+       errorcode = arts_init(); 
+       if (errorcode < 0) { 
+               fprintf(stderr,"arts_init error: %s\n", 
arts_error_text(errorcode)); 
+               pthread_exit(NULL); 
+       } 
 
        while (going) 
        { 
// END DIFF 
 
For me, this works perfectly and I've had no further problems, don't ask me 
how or why, but it seem to work. 
(Someone should really rewrite the arts-plugin, it's horribly bad written) 
 
Comment 16 Mauricio Lima Pilla 2002-10-05 18:06:12 UTC
Comment #15 worked also for me.
Comment 17 Brandon Low (RETIRED) gentoo-dev 2002-10-15 08:16:07 UTC
ok, sorrya bout the delay, updating in portage NOW
Comment 18 Brandon Low (RETIRED) gentoo-dev 2002-10-15 08:19:50 UTC
I agree that it needs re-coding, might want to see if you can dig up the
upstream developer and give them that patch... or find SOMEONE SOMEWHERE to do
makexor it work.
Comment 19 Ulrik Mikaelsson 2002-10-15 09:32:17 UTC
I believe the problem is caused by xmms-arts tries to spawn it's own thread  
while xmms is not running at realtime-priority, to hold an audio-buffer. I  
really doubt that is this is really nescesarry when arts by itself holds an  
audiobuffer in relation to the system's performance.  
  
I think the problem is that when using newer versions of gcc, kde (and  
therefore also arts) and xmms-arts it deals with resource allocation in  
different ways, and I think that is what causes the crashes and hangings.  
  
(BTW. Not to be picky, but why is Mauricio Lima Pilla credited in the  
Changelog? :-)  
Comment 20 Brandon Low (RETIRED) gentoo-dev 2002-10-15 09:42:41 UTC
becauseI'm dumb, thanks.
Comment 21 Terje Bergström 2002-10-20 12:16:20 UTC
This actually fixes the problem for me. Thanks!