[MPlayer-users] Re: random segfaults while encoding (local VOBs, lavc)

Vitezslav Kotrla vitko at post.cz
Tue Nov 28 23:10:32 CET 2006


> I did some lavc encode instead of x264 and now this is really spooky
> as mencoder segfaults _randomly_, sometimes spitting error

Well, I did another rigorous debugging: no more ripped VOBs - this time
I took my trusty Kurosawa's Ran disc and run encode directly on DVD data.

Segfault once again.

Running in gdb yields

(gdb) run dvd:// -nosound -ovc lavc -lavcopts vcodec=mpeg4 -o test.avi
Starting program: /usr/local/bin/mencoder dvd:// -nosound -ovc lavc -lavcopts vcodec=mpeg4 -o test.avi
[Thread debugging using libthread_db enabled]
[New Thread 47405525323408 (LWP 26887)]
MEncoder dev-SVN-r21363-4.1.2 (C) 2000-2006 MPlayer Team
CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 4200+ (Family: 15, Model: 43, Stepping: 1)
...
1 duplicate frame(s)!
[mpeg4 @ 0xbb3c70]Error evaluating rc_eq "tex^qComp"b  A-V:0.000 [0:0]
Pos:   0.4s      9f ( 0%)  0.00fps Trem:   0min   0mb  A-V:0.000 [0:0]
1 duplicate frame(s)!
[mpeg4 @ 0xbb3c70]Error evaluating rc_eq "tex^qComp"6mb  A-V:0.000 [818:0]
Pos:  58.3s   1456f ( 0%) 104.79fps Trem:  45min 1126mb  A-V:0.000 [817:0]
1 duplicate frame(s)!
[mpeg4 @ 0xbb3c70]Error evaluating rc_eq "tex^qComp"5mb  A-V:0.000 [816:0]
Pos:  60.8s   1517f ( 0%) 104.32fps Trem:  45min 1114mb  A-V:0.000 [815:0]
1 duplicate frame(s)!
Pos:  61.4s   1532f ( 0%) 104.15fps Trem:  45min 1118mb  A-V:0.000 [819:0]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 47405525323408 (LWP 26887)]
0x000000000063afb0 in ff_estimate_p_frame_motion (s=0xd5b100, mb_x=24, mb_y=1) at ../libavutil/internal.h:143
143         if(a<128) return ff_sqrt_tab[a];
(gdb) bt
#0  0x000000000063afb0 in ff_estimate_p_frame_motion (s=0xd5b100, mb_x=24, mb_y=1) at ../libavutil/internal.h:143
#1  0x00000000005a70c4 in estimate_motion_thread (c=<value optimized out>, arg=<value optimized out>) at mpegvideo.c:4856
#2  0x000000000059d072 in avcodec_default_execute (c=0xd55b80, func=0x5a7050 <estimate_motion_thread>, arg=0xd5b1e8, ret=0x0, count=1) at utils.c:392
#3  0x00000000005a52fb in encode_picture (s=0xd5b100, picture_number=1530) at mpegvideo.c:5611
#4  0x00000000005ab5ca in MPV_encode_picture (avctx=0xd55b80, buf=<value optimized out>, buf_size=<value optimized out>, data=0xd55a60) at mpegvideo.c:2533
#5  0x000000000059e5c0 in avcodec_encode_video (avctx=0xd55b80, buf=0x2b1d758f7010 "", buf_size=2097152, pict=0xd55a60) at utils.c:866
#6  0x000000000045ec0b in encode_frame (vf=0xd54ce0, pic=0xd55a60, pts=nan) at ve_lavc.c:778
#7  0x000000000045f0b4 in put_image (vf=0x0, mpi=<value optimized out>, pts=0) at ve_lavc.c:759
#8  0x0000000000473f67 in filter_video (sh_video=<value optimized out>, frame=0xdd4730, pts=-9.2233720368547758e+18) at dec_video.c:388
#9  0x000000000043b888 in main (argc=<value optimized out>, argv=<value optimized out>) at mencoder.c:1323
(gdb) disass $pc-32 $pc+32
Dump of assembler code from 0x63af90 to 0x63afd0:
0x000000000063af90 <ff_estimate_p_frame_motion+4128>:   movzbl 0x9de320(%rax),%eax
0x000000000063af97 <ff_estimate_p_frame_motion+4135>:   xor    %edi,%edi
0x000000000063af99 <ff_estimate_p_frame_motion+4137>:   xor    %r10d,%r10d
0x000000000063af9c <ff_estimate_p_frame_motion+4140>:   cmp    $0x7f,%r9d
0x000000000063afa0 <ff_estimate_p_frame_motion+4144>:   mov    $0xf,%esi
0x000000000063afa5 <ff_estimate_p_frame_motion+4149>:   mov    $0x1,%r11d
0x000000000063afab <ff_estimate_p_frame_motion+4155>:   jg     0x63affe <ff_estimate_p_frame_motion+4238>
0x000000000063afad <ff_estimate_p_frame_motion+4157>:   movslq %r9d,%rax
0x000000000063afb0 <ff_estimate_p_frame_motion+4160>:   movzbl 0x9de320(%rax),%edi
0x000000000063afb7 <ff_estimate_p_frame_motion+4167>:   sub    %edi,%r8d
0x000000000063afba <ff_estimate_p_frame_motion+4170>:   mov    %r14d,%ecx
0x000000000063afbd <ff_estimate_p_frame_motion+4173>:   lea    (%rbx,%r8,1),%eax
0x000000000063afc1 <ff_estimate_p_frame_motion+4177>:   mov    %eax,0x1e0(%r12)
0x000000000063afc9 <ff_estimate_p_frame_motion+4185>:   jmpq   0x63a400 <ff_estimate_p_frame_motion+1168>
0x000000000063afce <ff_estimate_p_frame_motion+4190>:   lea    (%rsi,%rsi,1),%ecx
End of assembler dump.
(gdb) info all-registers
rax            0xffffffffff46c0f4       -12140300
rbx            0xfffffd98       4294966680
rcx            0x0      0
rdx            0xa9     169
rsi            0xf      15
rdi            0x0      0
rbp            0xd5b100 0xd5b100
rsp            0x7fff36b36540   0x7fff36b36540
r8             0xc      12
r9             0xff46c0f4       4282826996
r10            0x0      0
r11            0x1      1
r12            0xd5d6f0 14014192
r13            0x9c     156
r14            0x2      2
r15            0xd5b870 14006384
rip            0x63afb0 0x63afb0 <ff_estimate_p_frame_motion+4160>
eflags         0x10292  [ AF SF IF RF ]
cs             0x33     51
ss             0x2b     43
ds             0x0      0
es             0x0      0
fs             0x0      0
gs             0x0      0
st0            -nan(0x1111111112121111) (raw 0xffff1111111112121111)
st1            -nan(0x24002400240024)   (raw 0xffff0024002400240024)
st2            -nan(0x11001100120012)   (raw 0xffff0011001100120012)
st3            -nan(0x46004700470047)   (raw 0xffff0046004700470047)
st4            -nan(0x4a7000004ed)      (raw 0xffff000004a7000004ed)
st5            -nan(0x468046808ce08ce)  (raw 0xffff0468046808ce08ce)
st6            -nan(0xd700d700d600d7)   (raw 0xffff00d700d700d600d7)
st7            <invalid float value>    (raw 0xffff0000000000000000)
fctrl          0x37f    895
fstat          0x41     65
ftag           0xaaaa   43690
fiseg          0x0      0
fioff          0x0      0
foseg          0x0      0
fooff          0x0      0
fop            0x0      0
xmm0           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
    0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0}, uint128 = 0x00000000000000000000000000000000}
xmm1           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0x87, 0x0, 0x0, 0x0, 0x6f, 0x0, 0x0, 0x0, 0x43, 0x0, 0x0, 0x0, 0x36,
    0x0, 0x0, 0x0}, v8_int16 = {0x87, 0x0, 0x6f, 0x0, 0x43, 0x0, 0x36, 0x0}, v4_int32 = {0x87, 0x6f, 0x43, 0x36}, v2_int64 = {0x6f00000087, 0x3600000043},
  uint128 = 0x00000036000000430000006f00000087}
xmm2           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0,
    0x0, 0x0}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x1, 0x0}, v4_int32 = {0x0, 0x0, 0x1, 0x1}, v2_int64 = {0x0, 0x100000001},
  uint128 = 0x00000001000000010000000000000000}
xmm3           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x9, 0x0, 0x0, 0x0, 0x2, 0x0,
    0x0, 0x0}, v8_int16 = {0x1, 0x0, 0x1, 0x0, 0x9, 0x0, 0x2, 0x0}, v4_int32 = {0x1, 0x1, 0x9, 0x2}, v2_int64 = {0x100000001, 0x200000009},
  uint128 = 0x00000002000000090000000100000001}
---Type <return> to continue, or q <return> to quit---
xmm4           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x2, 0x0,
    0x0, 0x0}, v8_int16 = {0x0, 0x0, 0x1, 0x0, 0x1, 0x0, 0x2, 0x0}, v4_int32 = {0x0, 0x1, 0x1, 0x2}, v2_int64 = {0x100000000, 0x200000001},
  uint128 = 0x00000002000000010000000100000000}
xmm5           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0x11, 0x10, 0x10, 0x11, 0x12, 0x12, 0x11, 0x12, 0x12, 0x12, 0x11, 0x11,
    0x11, 0x12, 0x12, 0x11}, v8_int16 = {0x1011, 0x1110, 0x1212, 0x1211, 0x1212, 0x1111, 0x1211, 0x1112}, v4_int32 = {0x11101011, 0x12111212, 0x11111212,
    0x11121211}, v2_int64 = {0x1211121211101011, 0x1112121111111212}, uint128 = 0x11121211111112121211121211101011}
xmm6           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0x11, 0x11, 0x12, 0x12, 0x10, 0x10, 0x12, 0x12, 0x12, 0x12, 0x11, 0x12,
    0x12, 0x11, 0x11, 0x11}, v8_int16 = {0x1111, 0x1212, 0x1010, 0x1212, 0x1212, 0x1211, 0x1112, 0x1111}, v4_int32 = {0x12121111, 0x12121010, 0x12111212,
    0x11111112}, v2_int64 = {0x1212101012121111, 0x1111111212111212}, uint128 = 0x11111112121112121212101012121111}
xmm7           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0xf6, 0x0, 0x0, 0x0, 0xb2, 0x0, 0x0, 0x0, 0x79, 0x0, 0x0, 0x0, 0x36,
    0x0, 0x0, 0x0}, v8_int16 = {0xf6, 0x0, 0xb2, 0x0, 0x79, 0x0, 0x36, 0x0}, v4_int32 = {0xf6, 0xb2, 0x79, 0x36}, v2_int64 = {0xb2000000f6, 0x3600000079},
  uint128 = 0x0000003600000079000000b2000000f6}
xmm8           {v4_float = {0x7, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0x1f, 0xf6, 0xfa, 0x40, 0xfb, 0x66, 0x61, 0x3d, 0x0, 0x0, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x0}, v8_int16 = {0xf61f, 0x40fa, 0x66fb, 0x3d61, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x40faf61f, 0x3d6166fb, 0x0, 0x0}, v2_int64 = {
    0x3d6166fb40faf61f, 0x0}, uint128 = 0x00000000000000003d6166fb40faf61f}
xmm9           {v4_float = {0x0, 0x1, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0xcf, 0x26, 0x4c, 0xf1, 0xbb, 0x91, 0xec, 0x3f, 0x0, 0x0, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x0}, v8_int16 = {0x26cf, 0xf14c, 0x91bb, 0x3fec, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0xf14c26cf, 0x3fec91bb, 0x0, 0x0}, v2_int64 = {
    0x3fec91bbf14c26cf, 0x0}, uint128 = 0x00000000000000003fec91bbf14c26cf}
xmm10          {v4_float = {0x0, 0x2, 0x0, 0x0}, v2_double = {0x6, 0x0}, v16_int8 = {0x66, 0x3, 0xfd, 0x92, 0x2b, 0x68, 0x19, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0,
    0x0, 0x0, 0x0}, v8_int16 = {0x366, 0x92fd, 0x682b, 0x4019, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x92fd0366, 0x4019682b, 0x0, 0x0}, v2_int64 = {
    0x4019682b92fd0366, 0x0}, uint128 = 0x00000000000000004019682b92fd0366}
xmm11          {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0xf5, 0xa1, 0x22, 0x73, 0x84, 0xff, 0x98, 0x3e, 0x0, 0x0, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x0}, v8_int16 = {0xa1f5, 0x7322, 0xff84, 0x3e98, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x7322a1f5, 0x3e98ff84, 0x0, 0x0}, v2_int64 = {
    0x3e98ff847322a1f5, 0x0}, uint128 = 0x00000000000000003e98ff847322a1f5}
xmm12          {v4_float = {0xa0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0xb, 0x2a, 0x20, 0x43, 0xe1, 0x68, 0x61, 0x3d, 0x0, 0x0, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x0}, v8_int16 = {0x2a0b, 0x4320, 0x68e1, 0x3d61, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x43202a0b, 0x3d6168e1, 0x0, 0x0}, v2_int64 = {
    0x3d6168e143202a0b, 0x0}, uint128 = 0x00000000000000003d6168e143202a0b}
xmm13          {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
    0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0}, uint128 = 0x00000000000000000000000000000000}
xmm14          {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x9c, 0x3e, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
    0x0, 0x0}, v8_int16 = {0x0, 0x0, 0x0, 0x3e9c, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x3e9c0000, 0x0, 0x0}, v2_int64 = {0x3e9c000000000000, 0x0},
  uint128 = 0x00000000000000003e9c000000000000}
xmm15          {v4_float = {0x0, 0x1, 0x0, 0x0}, v2_double = {0x1, 0x0}, v16_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf0, 0x3f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
    0x0, 0x0}, v8_int16 = {0x0, 0x0, 0x0, 0x3ff0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x3ff00000, 0x0, 0x0}, v2_int64 = {0x3ff0000000000000, 0x0},
  uint128 = 0x00000000000000003ff0000000000000}
mxcsr          0x1fa1   [ IE PE IM DM ZM OM UM PM ]
(gdb)

Thats all. Any ideas?

Vit




More information about the MPlayer-users mailing list