#287121 streamtuner: segmentation fault

#287121#5
Date:
2004-12-24 18:09:28 UTC
From:
To:
After a dist-upgrade, streamtuner now dies when reloading
shoutcast streams.

Libraries upgraded by latest dist-upgrade (which streamtuner depends
on):

libatk
libglib2

How it dies:

test@atlas:~$ streamtuner &
[4] 15679
test@atlas:~$ free(): invalid pointer 0x8257ec8!

[4]+  Segmentation fault      streamtuner
test@atlas:~$ streamtuner &
[4] 15683
test@atlas:~$ free(): invalid pointer 0x8257ec8!

[4]+  Segmentation fault      streamtuner
test@atlas:~$

#287121#10
Date:
2004-12-24 22:09:29 UTC
From:
To:
Hm, I can't reproduce this on 0.99-2. There's a newer version,
0.99.99-2, in unstable, could you try reproducing it on the newer
version? But before you do that, could you run "ldd `which streamtuner`
| grep /usr/local" and if there is any output, send it to me?

Marco Bisetto wrote:

#287121#13
Date:
2004-12-25 21:00:00 UTC
From:
To:
 From http://bugs.debian.org/287121:

Streamtuner 0.99 segfaults with the cache file included in the attached
tarball. Trying the same cache file with Streamtuner 0.99.99 results in
streamtuner hanging on startup and using 100% CPU until it is killed. An
strace of streamtuner 0.99 was done, and it always seems to die at the
same point:

read(6, "\";\n\t\t\t\t\t\"http://www.weareasian.c"..., 4000) = 4000
brk(0)                                  = 0x824c000
brk(0x826d000)                          = 0x826d000
read(6, "\t\tarray {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ts"...,
4000) = 4000
read(6, "\t}\n\t\t\t}\n\t\t\tstream \"Trance & Hard"..., 4000) = 4000
read(6, "k Warren - Global Underground 02"..., 4000) = 4000
read(6, "gainst-silence.com\";\n\t\t\t\t\tarray "..., 4000) = 4000
read(6, "rance   Progress\";\n\t\t\t\t\t\"Virtual"..., 4000) = 4000
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++

#287121#14
Date:
2004-12-25 21:15:36 UTC
From:
To:
Not reproducible here. Please provide a backtrace of the 0.99.99
freeze (run inside gdb, hit ^C when it freezes, and type "thread apply
all bt").

#287121#19
Date:
2004-12-27 04:24:40 UTC
From:
To:
reassign 287121 libc6-i686
thanks

Turns out that, at least in streamtuner 0.99.99, this is a bug with
libc6-i686, and is 100% reproducible with it installed, but not without,
and reproducible only without setting the environment variable
MALLOC_CHECK_=2 and without LD_LIBRARY_PATH=/usr/lib/debug if libc6-dbg
is installed. Talk about weird.

Steps to reproduce, for the libc6 maintainer:
1. apt-get install streamtuner
2. mkdir ~/.streamtuner
3. un-bzip2 the attached cache file, and move it into ~/.streamtuner.
4. run streamtuner. it should hang at startup while on the splash screen.

Rebuilding streamtuner with CFLAGS="-ggdb -O0" and running "gdb
streamtuner", then running it, then Ctrl-C when it freezes, gives the
following (useless) backtrace:


#0  0xffffe410 in __kernel_vsyscall ()
#1  0x4413b7db in __lll_mutex_lock_wait ()
    from /lib/tls/i686/cmov/libpthread.so.0
#2  0x44138a03 in _L_mutex_lock_26 () from
/lib/tls/i686/cmov/libpthread.so.0
#3  0x0828fa58 in ?? ()
#4  0x00000000 in ?? ()
#5  0x00000001 in ?? ()
#6  0x41dadc2f in gtk_tree_path_append_index ()
    from /usr/lib/libgtk-x11-2.0.so.0
#7  0xb7dab5c5 in stream_get_url_list (stream=0x828fc28, value=0xbffff660)
     at shoutcast.c:362
#8  0x08068a43 in st_handler_event_stream_field_get (handler=0xfffffff5,
     stream=0xfffffff5, field=0xfffffff5, value=0xfffffff5)
     at st-handler.c:1684
#9  0x0807a3b9 in st_stream_bag_get_field (bag=0x8290398, field=0x8162418,
     value=0xbffff660) at st-stream-bag.c:213
#10 0x0807f003 in st_stream_store_update (store=0x8262c00, bag=0x8290398)
     at st-stream-store.c:317
#11 0x0807eb5f in st_stream_store_append (store=0x8262c00, bag=0x8290398)
     at st-stream-store.c:216
#12 0x0806c20d in st_oldcache_load_stream_end (info=0xbffff740)
---Type <return> to continue, or q <return> to quit---
     at st-oldcache-load.c:448
#13 0x0806bdc1 in st_oldcache_load (
     filename=0x4413fbc0
"\uffff\uffff\023D\230\uffff\uffff\uffff\uffff\213\uffffCJ_\023DZ_\023Dj_\023D@\006\uffffC\212_\023D\232_\023D\uffff_\023D\uffff_\023D\uffff_\023D\uffff_\023D\uffff_\023D\uffff_\023D\n`\023D\032`\023D*`\023D:`\023DJ`\023D",
err=0xfffffff5) at st-oldcache-load.c:223
#14 0x08071b97 in st_session_load () at st-session.c:86
#15 0x0806a632 in main (argc=1, argv=0xbffff884) at st-main.c:119

#287121#26
Date:
2004-12-27 19:38:37 UTC
From:
To:
notforwarded 287121
thanks

Whoops, forgot to attach the cache file. here it is.