[vlc-devel] [HELP] Tracking down an audio transcoding segfault with the mpgatofixed32 filter

Kevin DuBois kdub432 at gmail.com
Fri Jun 13 16:49:37 CEST 2008

So the when using the mpgatofixed32 filter in the new audio transcoding
chain configuration, segfaulting occurs. This filter is used whenever mpga
is input, so this effectively breaks the streaming of dvb, mpeg files, etc.
I beleive that this bug would also manifest itself in other audio filter2
modules like headphone, but it does not exist in format. This bug was not
present before about june 4th.

I have seen it segfault in three different ways (i.e. different backtraces
for different runs), all with the same binary/libraries. They are listed
below, the third one being the rarest to see.

I've spent some time looking into it, and only got pretty confused as to
where to look, so even if no one can fix it, pointers as to how to procede
would be most appreciated. The best i can come up with for an explanation is
that something is getting improperly allocated or deallocated in the code
for the audio buffers. I'm a bit new to coding  in such a big project, so I
appreciate any help I can get!

./configure --prefix=/usr/local --enable-dvb --enable-ffmpeg --disable-qt4
--disable-skins2 --enable-debug

(gdb) show args
Argument list to give program being debugged when it is started is "dvb://
--dvb-frequency=12020000 --dvb-srate=2034000 --dvb-lnb-lof1=10750000
--dvb-satno=0 --dvb-high-voltage --dvb-voltage=18 -vvv --sout


*** glibc detected *** double free or corruption (!prev): 0x082da820 ***

Program received signal SIGABRT, Aborted.
[Switching to Thread -1362109520 (LWP 16179)]
0xffffe410 in __kernel_vsyscall ()
(gdb) bt
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7d1d811 in raise () from /lib/tls/i686/cmov/libc.so.6
#2  0xb7d1efb9 in abort () from /lib/tls/i686/cmov/libc.so.6
#3  0xb7d52dfa in __fsetlocking () from /lib/tls/i686/cmov/libc.so.6
#4  0xb7d5a68f in mallopt () from /lib/tls/i686/cmov/libc.so.6
#5  0xb7d5a732 in free () from /lib/tls/i686/cmov/libc.so.6
#6  0xb7ebe06d in BlockRelease (p_block=0x82da820) at misc/block.c:70
#7  0xb72650b3 in Send (p_stream=0x821292c, id=0x8247808,
    at ../../include/vlc_block.h:140
#8  0xb7ee9000 in sout_InputSendBuffer (p_input=0x823f688,
    at stream_output/stream_output.c:285
#9  0xb7e6fa4b in DecoderDecode (p_dec=0x822712c, p_block=0x82412f8)
    at input/decoder.c:932
#10 0xb7e71cb1 in DecoderThread (p_dec=0x822712c) at input/decoder.c:593
#11 0xb7ec6a2a in thread_entry (data=0x8227048) at misc/threads.c:468
#12 0xb7ce8240 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#13 0xb7dc049e in clone () from /lib/tls/i686/cmov/libc.so.6


Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1362109520 (LWP 16249)]
0xb7da036f in mallopt () from /lib/tls/i686/cmov/libc.so.6
(gdb) bt
#0  0xb7da036f in mallopt () from /lib/tls/i686/cmov/libc.so.6
#1  0xb7da0732 in free () from /lib/tls/i686/cmov/libc.so.6
#2  0xb7f0406d in BlockRelease (p_block=0x82f2498) at misc/block.c:70
#3  0xb4f7af40 in Convert (p_filter=0x8266524, p_block=0x82f2498)
    at mpgatofixed32.c:409
#4  0xb7f21b6e in filter_chain_AudioFilter (p_chain=0x8266230, p_block=0x0)
    at misc/filter_chain.c:323
#5  0xb72aaff5 in Send (p_stream=0x821acb4, id=0x8257ab0,
    at transcode.c:1416
#6  0xb7f2f000 in sout_InputSendBuffer (p_input=0x824d318,
    at stream_output/stream_output.c:285
#7  0xb7eb5a4b in DecoderDecode (p_dec=0x8227594, p_block=0x8231e60)
    at input/decoder.c:932
#8  0xb7eb7cb1 in DecoderThread (p_dec=0x8227594) at input/decoder.c:593
#9  0xb7f0ca2a in thread_entry (data=0x82274b0) at misc/threads.c:468
#10 0xb7d2e240 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#11 0xb7e0649e in clone () from /lib/tls/i686/cmov/libc.so.6


Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1362125904 (LWP 16341)]
0xb4f9452d in DoWork (p_aout=0x8248b04, p_filter=0xaecf9040,
    p_in_buf=0xaecf9148, p_out_buf=0xaecf9114) at mpgatofixed32.c:268
268                         *p_samples++ = (float)*p_left++ / f_temp;
(gdb) bt
#0  0xb4f9452d in DoWork (p_aout=0x8248b04, p_filter=0xaecf9040,
    p_in_buf=0xaecf9148, p_out_buf=0xaecf9114) at mpgatofixed32.c:268
#1  0xb4f94f37 in Convert (p_filter=0x8248b04, p_block=0x82db640)
    at mpgatofixed32.c:407
#2  0xb7f3bb6e in filter_chain_AudioFilter (p_chain=0x8248810,
    p_block=0x82dc0e0) at misc/filter_chain.c:323
#3  0xb72c4ff5 in Send (p_stream=0x8218cdc, id=0x8262af8,
    at transcode.c:1416
#4  0xb7f49000 in sout_InputSendBuffer (p_input=0x8234448,
    at stream_output/stream_output.c:285
#5  0xb7ecfa4b in DecoderDecode (p_dec=0x822467c, p_block=0x8262b48)
    at input/decoder.c:932
#6  0xb7ed1cb1 in DecoderThread (p_dec=0x822467c) at input/decoder.c:593
#7  0xb7f26a2a in thread_entry (data=0x8224598) at misc/threads.c:468
#8  0xb7d48240 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#9  0xb7e2049e in clone () from /lib/tls/i686/cmov/libc.so.6

Kevin DuBois
kdub432 at gmail.com
PGP Key fingerprint = 80CF 7C1D 0A1C BE03 2203 95B6 1515 C3DC B6BE 7E88
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20080613/e490c357/attachment.html>

More information about the vlc-devel mailing list