Skip to contentSkip to conversation

Segfault when ogg123 exits

DISCUSSION Stuart Brady 2 participants 4 messages Mar 5, 2008 – Mar 11, 2008

lore
Share & tools
lore
#0 lore raw

Hi,

It seems ogg123 segfaults when it finishes playing. Note that I'm not pressing ^C -- I'm not even sure whether the "^C bug" is still around.

Quoted 1 line

From the backtrace, it looks like this may well be the same problem I

reported with SDL_Quit() and timer_create():

#0  0x00000000 in ?? ()
#1  0x400a7aac in _dl_close_worker () from /lib/ld.so.1
#2  0x400a7c08 in _dl_close () from /lib/ld.so.1
#3  0x400190dc in dlclose_doit () from /lib/libdl.so.2
#4  0x400a1834 in _dl_catch_error () from /lib/ld.so.1
#5  0x40019590 in _dlerror_run () from /lib/libdl.so.2
#6  0x40019118 in dlclose () from /lib/libdl.so.2
#7  0x402f9ffc in ao_shutdown () from /usr/lib/libao.so.2
#8  0x40c57bd4 in exit () from /lib/libc.so.6
#9  0x000182fc in main ()

Would any glibc hackers feel like taking a closer look at this?

Cheers,

Signature · 1 line
Stuart Brady
#1 lore raw
Quoted 16 lines · Stuart Brady

It seems ogg123 segfaults when it finishes playing. Note that I'm not pressing ^C -- I'm not even sure whether the "^C bug" is still around. From the backtrace, it looks like this may well be the same problem I reported with SDL_Quit() and timer_create():

 #0  0x00000000 in ?? ()
 #1  0x400a7aac in _dl_close_worker () from /lib/ld.so.1
 #2  0x400a7c08 in _dl_close () from /lib/ld.so.1
 #3  0x400190dc in dlclose_doit () from /lib/libdl.so.2
 #4  0x400a1834 in _dl_catch_error () from /lib/ld.so.1
 #5  0x40019590 in _dlerror_run () from /lib/libdl.so.2
 #6  0x40019118 in dlclose () from /lib/libdl.so.2
 #7  0x402f9ffc in ao_shutdown () from /usr/lib/libao.so.2
 #8  0x40c57bd4 in exit () from /lib/libc.so.6
 #9  0x000182fc in main ()
Quoted 1 line

Would any glibc hackers feel like taking a closer look at this?

Can you distill this into a smaller testcase? Maybe a call to dlopen() to load a library that has a function called by timer_create?

Cheers,
Carlos.

#2 lore raw
Quoted 2 lines · Carlos O'Donell

Can you distill this into a smaller testcase? Maybe a call to dlopen() to load a library that has a function called by timer_create?

I just ran ogg123 in gdb with a breakpoint set on timer_create(), and it didn't get triggered, so timer_create() itself seems unlikely to be the problem, but I can certainly try chopping libao down a bit.

BTW, this happens with both the OSS and ALSA plugins.

Side note: I've found that while running 'while (true); do true; done', mmapped ALSA output seems to work! If I drop the brackets, I just get noise -- presumably because it doesn't fork without them.

Signature · 1 line
Stuart Brady
#3 lore raw
Quoted 3 lines · Stuart Brady

I just ran ogg123 in gdb with a breakpoint set on timer_create(), and it didn't get triggered, so timer_create() itself seems unlikely to be the problem, but I can certainly try chopping libao down a bit.

Excellent, this is exactly the way you want to track this down. You may wish to run strace to see what types of system calls the program is making.

Cheers,
Carlos.