Opened 15 years ago

Last modified 13 years ago

#1328 closed defect (fixed)

mplayer crashes with codec ffsvq3 and -lavdopts threads=2

Reported by: rvm@… Owned by: reimar
Priority: normal Component: core
Version: HEAD Severity: normal
Keywords: Cc: compn
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

mplayer crashes with some mov files when using more than 1 thread (-lavdopts threads=2). It seems to me that it only happens with the ffsvq3 codec (I tried some of the samples in http://samples.mplayerhq.hu/V-codecs/SVQ1/ and work ok, but the ones in http://samples.mplayerhq.hu/V-codecs/SVQ3/ make it crash).

There's no crash with -lavdopts threads=1

(gdb) run -lavdopts threads=2 shrek2_tsr_qt_240.mov
Starting program: /tmp/mplayer -lavdopts threads=2 shrek2_tsr_qt_240.mov
[Thread debugging using libthread_db enabled]
[New Thread 1084633824 (LWP 19306)]
MPlayer dev-SVN-r27910-3.3.4 (C) 2000-2008 MPlayer Team
CPU: AMD Athlon(tm) 64 Processor 3400+ (Family: 15, Model: 4, Stepping: 10)
CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE SSE2
/home/ricardo/.fonts/arialbd.ttf doesn't look like a bitmap font description, ignoring.
Cannot load bitmap font: /home/ricardo/.fonts/arialbd.ttf
mplayer: could not connect to socket
mplayer: Permission denied
Failed to open LIRC support. You will not be able to use your remote control.

Playing shrek2_tsr_qt_240.mov.
libavformat file format detected.
[lavf] Video stream found, -vid 0
[lavf] Audio stream found, -aid 1
VIDEO: [SVQ3] 240x128 24bpp 12.000 fps 0.0 kbps ( 0.0 kbyte/s)
Clip info:

name: Shrek 2
copyright: TM & © 2003 DreamWorks LLC.
comments: Not So Far Far Away

==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
[New Thread 1086962608 (LWP 19309)]
[New Thread 1089063856 (LWP 19310)]
Selected video codec: [ffsvq3] vfm: ffmpeg (FFmpeg Sorenson Video v3 (SVQ3))
==========================================================================
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 22050 Hz, 2 ch, s16le, 32.0 kbit/4.54% (ratio: 4000->88200)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
AO: [oss] 22050Hz 2ch s16le (2 bytes per sample)
Starting playback...
Compiler did not align stack variables. Libavcodec has been miscompiled
and may be very slow or crash. This is not a bug in libavcodec,
but in the compiler. You may try recompiling using gcc >= 4.2.
Do not report crashes to FFmpeg developers.
VDec: vo config request - 240 x 128 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO: [xv] 240x128 => 240x128 Planar YV12

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1084633824 (LWP 19306)]
0x0837bb42 in frame_start (h=Variable "h" is not available.
) at h264.c:2276
2276 if(!h->thread_context[i]->s.obmc_scratchpad)
(gdb) bt
#0 0x0837bb42 in frame_start (h=Variable "h" is not available.
) at h264.c:2276
#1 0x0838a602 in svq3_decode_frame (avctx=0x8a7cf60, data=0x8a7ce90, data_size=0xbfffdcfc,

buf=0x8a8e6e8 "A\"jÀAÿ (\0179Þó\235ï9Þó\235â\212\203¨*\017¯Ä\204\033ý9\207½ÿ¿áíç;ß\237Ͻï?ûÙ÷½ùóï;÷ß\004ÆL¼þóûÎw¼ÿ\217\203\226óûó½þ}îçÍp\233;óþs¿ÿ\177ý\235ûó\235ïÎ÷ÿøè[üç{Îwß;ÏéØGy÷¼åï9ßçðØ\215
6\026\"Ñý4\214\"wï?¿ÿ\t\003\211yýÿ¼ï~&Â÷çÏ¿x\037÷ïW\030 þ\210ÿþ\004ãï9Þüùýï\037\207\034\aý.ýûßï\177¼ç|/ÁÐ\237ß¿\177¼÷\b6vwûÿ\177"..., buf_size=8760) at svq3.c:925

#2 0x082d8a34 in avcodec_decode_video (avctx=0x8a7cf60, picture=0x8a7cf60, got_picture_ptr=0xbfffdcfc, buf=0x8a7cf60 "ð\233c\b", buf_size=8760)

at utils.c:925

#3 0x081f296f in decode (sh=0x8a76e38, data=0x8a8e6e8, len=8760, flags=0) at vd_ffmpeg.c:782
#4 0x0810655b in decode_video (sh_video=0x8a76e38, start=0x8a7cf60 "ð\233c\b", in_size=145215328, drop_frame=0, pts=0) at dec_video.c:369
#5 0x08084a67 in main (argc=4, argv=0xbffff0a4) at mplayer.c:1743

(gdb) disass $pc-32 $pc+32
Dump of assembler code from 0x837bb22 to 0x837bb62:
0x0837bb22 <frame_start+210>: jle 0x837bad4 <frame_start+132>
0x0837bb24 <frame_start+212>: mov (%esi),%eax
0x0837bb26 <frame_start+214>: xor %ebx,%ebx
0x0837bb28 <frame_start+216>: cmp 0x260(%eax),%ebx
0x0837bb2e <frame_start+222>: jl 0x837bb3b <frame_start+235>
0x0837bb30 <frame_start+224>: jmp 0x837bb77 <frame_start+295>
0x0837bb32 <frame_start+226>: inc %ebx
0x0837bb33 <frame_start+227>: cmp 0x260(%eax),%ebx
0x0837bb39 <frame_start+233>: jge 0x837bb77 <frame_start+295>
0x0837bb3b <frame_start+235>: mov 0x2a378(%esi,%ebx,4),%edi
0x0837bb42 <frame_start+242>: mov 0xa3c(%edi),%edx
0x0837bb48 <frame_start+248>: test %edx,%edx
0x0837bb4a <frame_start+250>: jne 0x837bb32 <frame_start+226>
0x0837bb4c <frame_start+252>: mov 0xb0(%esi),%eax
0x0837bb52 <frame_start+258>: mov 0xb4(%esi),%edx
0x0837bb58 <frame_start+264>: lea (%edx,%eax,2),%eax
0x0837bb5b <frame_start+267>: shl $0x4,%eax
0x0837bb5e <frame_start+270>: mov %eax,(%esp)
0x0837bb61 <frame_start+273>: call 0x84da2f0 <av_malloc>
End of assembler dump.

(gdb) info all-registers
eax 0x8a7cf60 145215328
ecx 0x8ae0dd8 145624536
edx 0x2598 9624
ebx 0x1 1
esp 0xbfffdba0 0xbfffdba0
ebp 0xbfffdbb8 0xbfffdbb8
esi 0x40e9d020 1089064992
edi 0x0 0
eip 0x837bb42 0x837bb42
eflags 0x10297 66199
cs 0x73 115
ss 0x7b 123
ds 0x7b 123
es 0x7b 123
fs 0x0 0
gs 0x33 51
st0 -nan(0x300000003) (raw 0xffff0000000300000003)
st1 -nan(0xfffd0000fffd) (raw 0xffff0000fffd0000fffd)
st2 -nan(0xfffff45bfffffd97) (raw 0xfffffffff45bfffffd97)
st3 -nan(0x2098ffff93f6) (raw 0xffff00002098ffff93f6)
st4 1024 (raw 0x40098000000000000000)
st5 1 (raw 0x3fff8000000000000000)
st6 0 (raw 0x00000000000000000000)
st7 0 (raw 0x00000000000000000000)
fctrl 0x37f 895
fstat 0x120 288
ftag 0xffff 65535
fiseg 0x0 0
fioff 0x0 0
foseg 0x0 0
fooff 0x0 0
fop 0x0 0
xmm0 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x8000000000000000, 0x8000000000000000}, v16_int8 = {0xff <repeats 16 times>}, v8_int16 = {

0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff}, v4_int32 = {0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff}, v2_int64 = {
0xffffffffffffffff, 0xffffffffffffffff}, uint128 = 0xffffffffffffffffffffffffffffffff}

xmm1 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x8000000000000000, 0x8000000000000000}, v16_int8 = {0xff <repeats 16 times>}, v8_int16 = {

0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff}, v4_int32 = {0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff}, v2_int64 = {
0xffffffffffffffff, 0xffffffffffffffff}, uint128 = 0xffffffffffffffffffffffffffffffff}

xmm2 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x8000000000000000, 0x8000000000000000}, v16_int8 = {0xff <repeats 16 times>}, v8_int16 = {

0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff}, v4_int32 = {0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff}, v2_int64 = {
0xffffffffffffffff, 0xffffffffffffffff}, uint128 = 0xffffffffffffffffffffffffffffffff}

xmm3 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x8000000000000000, 0x8000000000000000}, v16_int8 = {0xff <repeats 16 times>}, v8_int16 = {

0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff}, v4_int32 = {0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff}, v2_int64 = {
0xffffffffffffffff, 0xffffffffffffffff}, uint128 = 0xffffffffffffffffffffffffffffffff}

xmm4 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x8000000000000000, 0x8000000000000000}, v16_int8 = {0xff <repeats 16 times>}, v8_int16 = {

0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff}, v4_int32 = {0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff}, v2_int64 = {
0xffffffffffffffff, 0xffffffffffffffff}, uint128 = 0xffffffffffffffffffffffffffffffff}

xmm5 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x8000000000000000, 0x8000000000000000}, v16_int8 = {0xff <repeats 16 times>}, v8_int16 = {

0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff}, v4_int32 = {0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff}, v2_int64 = {
0xffffffffffffffff, 0xffffffffffffffff}, uint128 = 0xffffffffffffffffffffffffffffffff}

xmm6 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x8000000000000000, 0x8000000000000000}, v16_int8 = {0xff <repeats 16 times>}, v8_int16 = {

0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff}, v4_int32 = {0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff}, v2_int64 = {

---Type <return> to continue, or q <return> to quit---

0xffffffffffffffff, 0xffffffffffffffff}, uint128 = 0xffffffffffffffffffffffffffffffff}

xmm7 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x8000000000000000, 0x8000000000000000}, v16_int8 = {0xff <repeats 16 times>}, v8_int16 = {

0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff}, v4_int32 = {0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff}, v2_int64 = {
0xffffffffffffffff, 0xffffffffffffffff}, uint128 = 0xffffffffffffffffffffffffffffffff}

mxcsr 0x1f80 8064
mm0 {uint64 = 0x300000003, v2_int32 = {0x3, 0x3}, v4_int16 = {0x3, 0x0, 0x3, 0x0}, v8_int8 = {0x3, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0}}
mm1 {uint64 = 0xfffd0000fffd, v2_int32 = {0xfffd, 0xfffd}, v4_int16 = {0xfffd, 0x0, 0xfffd, 0x0}, v8_int8 = {0xfd, 0xff, 0x0, 0x0, 0xfd, 0xff,

0x0, 0x0}}

mm2 {uint64 = 0xfffff45bfffffd97, v2_int32 = {0xfffffd97, 0xfffff45b}, v4_int16 = {0xfd97, 0xffff, 0xf45b, 0xffff}, v8_int8 = {0x97, 0xfd,

0xff, 0xff, 0x5b, 0xf4, 0xff, 0xff}}

mm3 {uint64 = 0x2098ffff93f6, v2_int32 = {0xffff93f6, 0x2098}, v4_int16 = {0x93f6, 0xffff, 0x2098, 0x0}, v8_int8 = {0xf6, 0x93, 0xff, 0xff,

0x98, 0x20, 0x0, 0x0}}

mm4 {uint64 = 0x8000000000000000, v2_int32 = {0x0, 0x80000000}, v4_int16 = {0x0, 0x0, 0x0, 0x8000}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0,

0x0, 0x80}}

mm5 {uint64 = 0x8000000000000000, v2_int32 = {0x0, 0x80000000}, v4_int16 = {0x0, 0x0, 0x0, 0x8000}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0,

0x0, 0x80}}

mm6 {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0, 0x0, 0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}
mm7 {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0, 0x0, 0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}
(gdb)

Change History (2)

comment:1 by compn, 15 years ago

could you check if this crashes in ffmpeg with threads?

comment:2 by compn, 13 years ago

Resolution: fixed
Status: newclosed, patriotact@gmail.com

well i no longer get crash but this:

[svq3 @ 00ee4934]SVQ3 does not support multithreaded decoding, patch welcome! (check latest SVN too)

so bug closed.

Note: See TracTickets for help on using tickets.