segfaults: Internal buffer inconsistency. flushbits <> ResvSizebit reservoir error
Hi! When transcoding another MP4 I've just received: "Internal buffer inconsistency. flushbits <> ResvSizebit reservoir error:". FFmpeg is throwing french at me? :-) It happens on this particular mp4 file (encoded with handbrake, plain default settings). Any ideas what could be the cause and how to work around it? # ffmpeg -y -v 1 -i file.mp4 -b 1024k -bt 1024k -g 40 -acodec libmp3lame -ac 2 -ab 96k -ar 44100 -vfilters "movie=0:png:logo.png [wm];movie=0:png:236.png [awm];[in][wm] overlay=15:mainH-overlayH-15:1 [int];[int][awm] overlay=mainW-overlayW-15:mainH-overlayH-15:1 [out]" -f flv ./video.flv 2>&1 FFmpeg version SVN-r20880, Copyright (c) 2000-2009 Fabrice Bellard, et al. built on Dec 20 2009 13:52:13 with gcc 4.3.2 20081105 (Red Hat 4.3.2-7) configuration: --prefix=/usr --incdir=/usr/include --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --shlibdir=/usr/lib64 --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-postproc --enable-pthreads --enable-gpl --enable-debug --enable-avfilter --enable-avfilter-lavf --enable-nonfree libavutil 50. 7. 0 / 50. 7. 0 libavcodec 52.43. 0 / 52.43. 0 libavformat 52.43. 0 / 52.43. 0 libavdevice 52. 2. 0 / 52. 2. 0 libavfilter 1.12. 0 / 1.12. 0 libswscale 0. 7. 2 / 0. 7. 2 libpostproc 51. 2. 0 / 51. 2. 0 Seems stream 0 codec frame rate differs from container frame rate: 30.00 (30/1) -> 15.00 (15/1) Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'file.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: mp42isomavc1 encoder : HandBrake 0.9.4 2009112300 Duration: 09:46:06.86, start: 0.000000, bitrate: 561 kb/s Stream #0.0(und): Video: h264, yuv420p, 964x900, 423 kb/s, 30 fps, 15 tbr, 90k tbn, 30 tbc Stream #0.1(und): Audio: aac, 48000 Hz, stereo, s16, 134 kb/s [overlay @ 0x10adc60]auto-inserting filter 'scale' [overlay @ 0x109f5e0]auto-inserting filter 'scale' [scale @ 0x10a7e90]w:135 h:35 fmt:yuva420p [scale @ 0x10a8010]w:132 h:35 fmt:yuva420p Output #0, flv, to './video.flv': Stream #0.0(und): Video: flv, yuv420p, 964x900, q=2-31, 1024 kb/s, 1k tbn, 15 tbc Stream #0.1(und): Audio: libmp3lame, 44100 Hz, stereo, s16, 96 kb/s Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 Press [q] to stop encoding [...] frame=213938 fps= 58 q=2.0 size= 1956798kB time=14262.86 bitrate=1123.9kbits/s dup=0 drop=1 frame=213967 fps= 58 q=2.0 size= 1956878kB time=14264.82 bitrate=1123.8kbits/s dup=0 drop=1 Internal buffer inconsistency. flushbits <> ResvSizebit reservoir error: l3_side->main_data_begin: 3096 Resvoir size: -96720 resv drain (post) -7 resv drain (pre) 0 header and sideinfo: 288 data bits: 1949 total bits: 2230 (remainder: 6) bitsperframe: 2504 This is a fatal error. It has several possible causes:90 0X0.00000000000012P-14437ME compiled with buggy version of gcc using advanced optimizations 9% Your system is overclocked 1% bug in LAME encoding libraryInternal buffer inconsistency. flushbits <> ResvSizeInternal buffer inconsistency. flushbits <> ResvSize Segmentation fault Thanks! -- __ /.)\ +48 695 600 936 \(./ abodera at gmail.com -- -- __ /.)\ +48 695 600 936 \(./ abodera at gmail.com
Artur Bodera wrote:
Hi!
This is a fatal error. It has several possible causes:90 0X0.00000000000012P-14437ME compiled with buggy version of gcc using
advanced optimizations 9% Your system is overclocked 1% bug in LAME encoding
Compile Lame with a proper compiler.
libraryInternal buffer inconsistency. flushbits <> ResvSizeInternal buffer inconsistency. flushbits <> ResvSize Segmentation fault
Thanks!
MvH Benjamin Larsson
On Thu, Jan 21, 2010 at 9:32 PM, Benjamin Larsson <banan at ludd.ltu.se> wrote:
advanced optimizations 9% Your system is overclocked 1% bug in LAME encoding Compile Lame with a proper compiler.
Thanks for tip. Please define "proper". I've compiled both ffmpeg and lame with gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC). The funny thing is it never happened before with the same binaries and I'm encoding a dozen of these videos a day. -- __ /.)\ +48 695 600 936 \(./ abodera at gmail.com
On Thu, Jan 21, 2010 at 9:52 PM, Artur Bodera <abodera at gmail.com> wrote:
On Thu, Jan 21, 2010 at 9:32 PM, Benjamin Larsson <banan at ludd.ltu.se>wrote:
advanced optimizations 9% Your system is overclocked 1% bug in LAME encoding Compile Lame with a proper compiler.
Thanks for tip. Please define "proper".
I've compiled both ffmpeg and lame with gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC). The funny thing is it never happened before with the same binaries and I'm encoding a dozen of these videos a day.
After two months, it's coming back. Regarding: https://roundup.ffmpeg.org/issue803 How to work around it?? I've compiled old 3.97 lame using gcc 4.3.2. Compiled FFmpeg version SVN-r22626 against it using gcc 4.3.2 Tried disabling all optimizations (directly in ./configure of lame, setting -O0 CFLAGS everywhere). Scanned all dirs for all lame installation and removed old files. Recompiled and installed lame 3.97 in proper libdirs Every time I try to encode with mp3 ffmpeg segfaults: --------- frame=39578 fps= 84 q=2.0 size= 196604kB time=2658.98 bitrate= 605.7kbits/s dup=0 drop=1 Internal buffer inconsistency. flushbits <> ResvSizebit reservoir error: l3_side->main_data_begin: 2064 Resvoir size: -97496 resv drain (post) -3 resv drain (pre) 0 header and sideinfo: 288 data bits: 3804 total bits: 4089 (remainder: 1) bitsperframe: 4176 This is a fatal error. It has several possible causes:90 0X1.9D4132B0000012P-12582ME compiled with buggy version of gcc using advanced optimizations 9% Your system is overclocked 1% bug in LAME encoding libraryInternal buffer inconsistency. flushbits <> ResvSizeInternal buffer inconsistency. flushbits <> ResvSizeInternal buffer inconsistency. flushbits <> ResvSize Segmentation fault --------- My ffmpeg header: --------- FFmpeg version SVN-r22626, Copyright (c) 2000-2010 the FFmpeg developers built on Mar 24 2010 12:53:56 with gcc 4.3.2 20081105 (Red Hat 4.3.2-7) configuration: --prefix=/usr --incdir=/usr/include --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --shlibdir=/usr/lib64 --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-postproc --enable-pthreads --enable-gpl --enable-avfilter --enable-avfilter-lavf --enable-nonfree --------- Full command line: ------------- ffmpeg <http://ementor.pl/library/FFmpeg/ffmpeg-new2> -y -v 1 -pass 1 -i ' file.mp4 <http://ementor.pl/data/incoming/60.eskoal.pascal.mp4>' -async 1 -b 1500k -bt 1500k -g 40 -vcodec mpeg4 -vtag divx -acodec libmp3lame -ac 2 -ab 160k -ar 44100 -f avi ./video.avi 2>&1 ------------- Please help. -- __ /.)\ +48 695 600 936 \(./ abodera at gmail.com
Artur Bodera <abodera <at> gmail.com> writes:
After two months, it's coming back. Regarding: https://roundup.ffmpeg.org/issue803
How to work around it??
Wrong mailing list. Carl Eugen
On Wed, Mar 24, 2010 at 1:39 PM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
Artur Bodera <abodera <at> gmail.com> writes:
After two months, it's coming back. Regarding: https://roundup.ffmpeg.org/issue803
How to work around it??
Wrong mailing list.
Don't think so. It's a confirmed bug and it's beyond ffmpeg-user. Until it's fixed, a workaround would be much appreciated. A. -- __ /.)\ +48 695 600 936 \(./ abodera at gmail.com
Artur Bodera <abodera at gmail.com> writes:
On Wed, Mar 24, 2010 at 1:39 PM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
Artur Bodera <abodera <at> gmail.com> writes:
After two months, it's coming back. Regarding: https://roundup.ffmpeg.org/issue803
How to work around it??
Wrong mailing list.
Don't think so. It's a confirmed bug and it's beyond ffmpeg-user. Until it's fixed, a workaround would be much appreciated.
The crash is happening in LAME code. Go bother the LAME devs if you can find them. -- M?ns Rullg?rd mans at mansr.com
2010/3/24 M?ns Rullg?rd <mans at mansr.com>
The crash is happening in LAME code. Go bother the LAME devs if you can find them.
hahaha ;-) That's optimistic... ps: http://sourceforge.net/tracker/?func=detail&aid=2553863&group_id=290&atid=100290 Anyways, according to my observations and other people's analysis (see ffmpeg ticket 803) the truth lies somewhere between. i.e. the way ffmpeg calls api (flushes) that is somewhat incompatible or broken. There are tons of new patches every month for compatibility and interoperability with x264, while a veeeeeery old bug with lame 3.98 has been dormant since circa nov 2008. Note that crashes are semi-random (most often for longer clips > 60min) so that would mean many people have broken ffmpeg binaries and don't even know that unless they need to encode something longer. Well, no need for analysis or speculations around it - just point me (and others) to what version to use, or what flags to set to make it (finally) work. ps: similar bug with lame 3.98 (same error msg) popped in mencoder many months ago and it has been fixed instantly. -- __ /.)\ +48 695 600 936 \(./ abodera at gmail.com
On Wed, Mar 24, 2010 at 02:58:10PM +0100, Artur Bodera wrote:
2010/3/24 M?ns Rullg?rd <mans at mansr.com>
The crash is happening in LAME code. Go bother the LAME devs if you can find them.
hahaha ;-) That's optimistic... ps: http://sourceforge.net/tracker/?func=detail&aid=2553863&group_id=290&atid=100290
Anyways, according to my observations and other people's analysis (see ffmpeg ticket 803) the truth lies somewhere between. i.e. the way ffmpeg calls api (flushes) that is somewhat incompatible or broken.
There are tons of new patches every month for compatibility and interoperability with x264, while a veeeeeery old bug with lame 3.98 has been dormant since circa nov 2008.
Note that crashes are semi-random (most often for longer clips > 60min) so that would mean many people have broken ffmpeg binaries and don't even know that unless they need to encode something longer.
a crash in lame is a crash and thus bug in lame issue803 and the link you show above is not a crash also if you want 803 worked around in ffmpeg, comments to a patch there exist in the tracker and we are waiting for a corrected patch
Well, no need for analysis or speculations around it - just point me (and others) to what version to use, or what flags to set to make it (finally) work.
ps: similar bug with lame 3.98 (same error msg) popped in mencoder many months ago and it has been fixed instantly.
a link to the commit maybe helpfull [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Let us carefully observe those good qualities wherein our enemies excel us and endeavor to excel them, by avoiding what is faulty, and imitating what is excellent in them. -- Plutarch
Artur Bodera wrote:
On Thu, Jan 21, 2010 at 9:52 PM, Artur Bodera <abodera at gmail.com> wrote:
On Thu, Jan 21, 2010 at 9:32 PM, Benjamin Larsson <banan at ludd.ltu.se>wrote:
advanced optimizations 9% Your system is overclocked 1% bug in LAME encoding Compile Lame with a proper compiler.
Thanks for tip. Please define "proper".
I've compiled both ffmpeg and lame with gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC). The funny thing is it never happened before with the same binaries and I'm encoding a dozen of these videos a day.
After two months, it's coming back. Regarding: https://roundup.ffmpeg.org/issue803
How to work around it??
I've compiled old 3.97 lame using gcc 4.3.2. Compiled FFmpeg version SVN-r22626 against it using gcc 4.3.2 ...
FFmpeg's regression tests fail using gcc 4.3.2 on 32-bit Suse 11.1. The advice given to me by this list was to use a different version of gcc. That did make the crashes I was experiencing go away. Mike Scheutzow
On Wed, Mar 24, 2010 at 2:26 PM, Mike Scheutzow < scheutzow at alcatel-lucent.com> wrote:
I've compiled old 3.97 lame using gcc 4.3.2.
Compiled FFmpeg version SVN-r22626 against it using gcc 4.3.2
FFmpeg's regression tests fail using gcc 4.3.2 on 32-bit Suse 11.1.
The advice given to me by this list was to use a different version of gcc. That did make the crashes I was experiencing go away.
Which one did you use ? -- __ /.)\ +48 695 600 936 \(./ abodera at gmail.com
Artur Bodera wrote:
On Wed, Mar 24, 2010 at 2:26 PM, Mike Scheutzow wrote:
The advice given to me by this list was to use a different version of gcc. That did make the crashes I was experiencing go away.
Which one did you use ?
gcc 4.1.3 My crashes were not in LAME code. My post was meant to provide some interpretation to the "Compile Lame with a proper compiler" comment you quoted in your message. If you've really just uncovered a bug here, then switching compiler versions isn't going to fix things. Mike Scheutzow
participants (6)
-
abodera@gmail.com -
banan@ludd.ltu.se -
cehoyos@ag.or.at -
mans@mansr.com -
michaelni@gmx.at -
scheutzow@alcatel-lucent.com