[FFmpeg-trac] #5764(undetermined:reopened): ffmpeg deadlock with first pass x264 encode with >=slower and bitrate set
FFmpeg
trac at avcodec.org
Sat Aug 27 00:21:21 EEST 2016
#5764: ffmpeg deadlock with first pass x264 encode with >=slower and bitrate set
-------------------------------------+-------------------------------------
Reporter: MonoS | Owner:
Type: defect | Status: reopened
Priority: important | Component:
Version: git-master | undetermined
Keywords: | Resolution:
Blocking: | Blocked By:
Analyzed by developer: 0 | Reproduced by developer: 0
-------------------------------------+-------------------------------------
Comment (by MonoS):
I did as follow
- Open a promt and run {{{gdb ffmpeg_g.exe}}}
- {{{r commandline}}} and then enter
- When ffmpeg deadlocked i pressed {{{ctrl+c}}}
- This is what i got until now
{{{
GNU gdb (GDB) 7.1.90.20100730-cvs
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-w64-mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from C:\Users\Administrator\Desktop\ffmpeg_g.exe...done.
<-b:v 9102k -pass 1 -passlogfile test_deadlock.stats -f null NUL
Starting program: C:\Users\Administrator\Desktop\ffmpeg_g.exe -i
"C:\Users\Admin
istrator\Desktop\ffmpeg deadlock on 1pass.mkv" -c:v libx264 -preset slower
-b:v
9102k -pass 1 -passlogfile test_deadlock.stats -f null NUL
[New Thread 3932.0x3f0]
ffmpeg version N-81312-gb83d907 Copyright (c) 2000-2016 the FFmpeg
developers
built with gcc 5.3.0 (x86_64-posix-seh-rev0, Built by MinGW-W64 project)
configuration: --enable-static --disable-shared --extra-cflags='-static
-funro
ll-loops' --extra-ldflags='-L/c/mingw64/x86_64-w64-mingw32/lib -static'
--cpu=x8
6-64 --target-os=mingw64 --arch=x86_64 --cross-prefix=x86_64-w64-mingw32-
--enab
le-gpl --pkg-config=pkg-config --pkg-config-flags=--static --disable-
w32threads
--enable-libx265 --enable-libx264
libavutil 55. 28.100 / 55. 28.100
libavcodec 57. 51.100 / 57. 51.100
libavformat 57. 46.100 / 57. 46.100
libavdevice 57. 0.102 / 57. 0.102
libavfilter 6. 50.100 / 6. 50.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
Input #0, matroska,webm, from 'C:\Users\Administrator\Desktop\ffmpeg
deadlock on
1pass.mkv':
Metadata:
encoder : libebml v1.3.4 + libmatroska v1.4.5
creation_time : 2016-08-10 10:41:07
Duration: 00:02:47.21, start: 0.000000, bitrate: 18018 kb/s
Stream #0:0: Video: h264 (High), yuv420p(tv, bt709), 1920x1080 [SAR
1:1 DAR
16:9], 24 fps, 24 tbr, 1k tbn, 48 tbc
Metadata:
BPS : 18016041
BPS-eng : 18016041
DURATION : 00:02:47.209000000
DURATION-eng : 00:02:47.209000000
NUMBER_OF_FRAMES: 4013
NUMBER_OF_FRAMES-eng: 4013
NUMBER_OF_BYTES : 376555527
NUMBER_OF_BYTES-eng: 376555527
_STATISTICS_WRITING_APP: mkvmerge v9.3.1 ('Mask Machine') 64bit
_STATISTICS_WRITING_APP-eng: mkvmerge v9.3.1 ('Mask Machine') 64bit
_STATISTICS_WRITING_DATE_UTC: 2016-08-10 10:41:07
_STATISTICS_WRITING_DATE_UTC-eng: 2016-08-10 10:41:07
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[New Thread 3932.0xa6c]
[New Thread 3932.0xcf4]
[New Thread 3932.0xb90]
[New Thread 3932.0x13b0]
[New Thread 3932.0x22c]
[New Thread 3932.0x1220]
[New Thread 3932.0xd0]
[New Thread 3932.0x1208]
[New Thread 3932.0x33c]
[New Thread 3932.0xec4]
[New Thread 3932.0xe9c]
[New Thread 3932.0x12b0]
[New Thread 3932.0xbd0]
[New Thread 3932.0xfac]
[New Thread 3932.0x1d0]
[New Thread 3932.0x12d0]
[New Thread 3932.0xe18]
[New Thread 3932.0xfc8]
[libx264 @ 0000000001f6b740] using SAR=1/1
[libx264 @ 0000000001f6b740] using cpu capabilities: MMX2 SSE2Fast SSSE3
SSE4.2
AVX FMA3 AVX2 LZCNT BMI2
[New Thread 3932.0xc74]
[New Thread 3932.0x11d0]
[New Thread 3932.0x9d0]
[New Thread 3932.0x6ec]
[New Thread 3932.0x96c]
[New Thread 3932.0x1374]
[New Thread 3932.0x12dc]
[New Thread 3932.0xd18]
[New Thread 3932.0x778]
[New Thread 3932.0xe98]
[New Thread 3932.0xfd4]
[New Thread 3932.0x125c]
[New Thread 3932.0x10f4]
[New Thread 3932.0x11f4]
[libx264 @ 0000000001f6b740] profile Main, level 4.0
[null @ 0000000000336bc0] Using AVStream.codec to pass codec parameters to
muxer
s is deprecated, use AVStream.codecpar instead.
Output #0, null, to 'NUL':
Metadata:
encoder : Lavf57.46.100
Stream #0:0: Video: h264 (libx264), yuv420p, 1920x1080 [SAR 1:1 DAR
16:9], q
=-1--1, 9102 kb/s, 24 fps, 24 tbn, 24 tbc
Metadata:
BPS : 18016041
BPS-eng : 18016041
DURATION : 00:02:47.209000000
DURATION-eng : 00:02:47.209000000
NUMBER_OF_FRAMES: 4013
NUMBER_OF_FRAMES-eng: 4013
NUMBER_OF_BYTES : 376555527
NUMBER_OF_BYTES-eng: 376555527
_STATISTICS_WRITING_APP: mkvmerge v9.3.1 ('Mask Machine') 64bit
_STATISTICS_WRITING_APP-eng: mkvmerge v9.3.1 ('Mask Machine') 64bit
_STATISTICS_WRITING_DATE_UTC: 2016-08-10 10:41:07
_STATISTICS_WRITING_DATE_UTC-eng: 2016-08-10 10:41:07
_STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
encoder : Lavc57.51.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/9102000 buffer size: 0 vbv_delay: -1
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[New Thread 3932.0x324]
[New Thread 3932.0x119c]
[New Thread 3932.0x98c]
[New Thread 3932.0x1010]
[New Thread 3932.0xc5c]
[New Thread 3932.0xa9c].0 size=N/A time=00:00:00.00 bitrate=N/A speed=
0x
Program received signal SIGINT, Interrupt.
[Switching to Thread 3932.0xa9c]
}}}
- Typed {{{bt}}} and hot this
{{{
#0 0x00007ff960713233 in RegLoadMUIStringA ()
from C:\Windows\system32\KernelBase.dll
#1 0x00007ff960693560 in KERNELBASE!GetApplicationRestartSettings ()
from C:\Windows\system32\KernelBase.dll
#2 0x00007ff960693560 in KERNELBASE!GetApplicationRestartSettings ()
from C:\Windows\system32\KernelBase.dll
#3 0x0000000000000000 in ?? ()
}}}
- Typed {{{info all-registers}}} and got
{{{
rax 0x7ff96311ab40 140709085686592
rbx 0x3b2afea0 992673440
rcx 0x1422e0058 5405278296
rdx 0x140000000 5368709120
rsi 0x7ff963158e75 140709085941365
rdi 0xc0000026 3221225510
rbp 0x0 0x0
rsp 0x3b2afe70 0x3b2afe70
r8 0x0 0
r9 0x7ff963100000 140709085577216
r10 0x3b2afb00 992672512
r11 0x7ff95eae10b0 140709012050096
r12 0x0 0
r13 0x0 0
r14 0x0 0
r15 0x0 0
rip 0x7ff960713233 0x7ff960713233 <RegLoadMUIStringA+51731>
eflags 0x204 [ PF IF ]
cs 0x33 51
ss 0x204002b 33816619
ds 0x0 0
es 0x0 0
fs 0x0 0
gs 0x2b0000 2818048
st0 0 (raw 0x00000000000000000000)
st1 -nan(0x000000070) (raw 0xffff0000000000000070)
st2 -1.#INF (raw 0xd993ffffffffffffffff)
st3 0 (raw 0x000000007ff96311d9c6)
st4 <invalid float value> (raw 0x00010000000000000048)
st5 0 (raw 0x00000000000000000000)
st6 -nan(0x000000070) (raw 0xffff0000000000000070)
st7 -1.#INF (raw 0xda20ffffffffffffffff)
fctrl 0x27f 639
fstat 0x0 0
ftag 0x0 0
fiseg 0x0 0
fioff 0x3a3ac0 3816128
foseg 0x0 0
fooff 0x48 72
fop 0x0 0
xmm0 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x40, 0xda, 0x11, 0x63, 0xf9, 0x7f, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0}, v8_int16 = {0xda40, 0x6311, 0x7ff9, 0x0,
0x0,
0x0, 0x0, 0x0}, v4_int32 = {0x6311da40, 0x7ff9, 0x0, 0x0}, v2_int64 =
{
0x7ff96311da40, 0x0}, uint128 = 0x000000000000000000007ff96311da40}
xmm1 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x43, 0xa7, 0x11,
0x63,
0xf9, 0x7f, 0x0, 0x0}, v8_int16 = {0x1, 0x0, 0x0, 0x0, 0xa743, 0x6311,
0x7ff9, 0x0}, v4_int32 = {0x1, 0x0, 0x6311a743, 0x7ff9}, v2_int64 =
{0x1,
0x7ff96311a743}, uint128 = 0x00007ff96311a7430000000000000001}
xmm2 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0, 0x60, 0xff, 0xff, 0xf5, 0x7f, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0}, v8_int16 = {0x6000, 0xffff, 0x7ff5, 0x0,
0x0,
0x0, 0x0, 0x0}, v4_int32 = {0xffff6000, 0x7ff5, 0x0, 0x0}, v2_int64 =
{
0x7ff5ffff6000, 0x0}, uint128 = 0x000000000000000000007ff5ffff6000}
xmm3 {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}
xmm4 {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}
xmm5 {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}
xmm6 {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}
xmm7 {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}
xmm8 {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}
xmm9 {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}
xmm10 {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}
xmm11 {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}
xmm12 {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}
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 <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}
xmm15 {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}
mxcsr 0x1f80 [ IM DM ZM OM UM PM ]
}}}
- Then typed {{{disass $pc-32,$pc+32}}} and got
{{{
Dump of assembler code from 0x7ff960713213 to 0x7ff960713253:
0x00007ff960713213 <RegLoadMUIStringA+51699>: fs
0x00007ff960713214 <RegLoadMUIStringA+51700>: and $0x38,%al
0x00007ff960713216 <RegLoadMUIStringA+51702>: add
%cl,-0x73(%rax)
0x00007ff960713219 <RegLoadMUIStringA+51705>: add
$0xfff80422,%eax
0x00007ff96071321e <RegLoadMUIStringA+51710>: mov
%rax,0x40(%rsp)
0x00007ff960713223 <RegLoadMUIStringA+51715>: andl
$0x0,0x48(%rsp)
0x00007ff960713228 <RegLoadMUIStringA+51720>: lea
0x30(%rsp),%rcx
0x00007ff96071322d <RegLoadMUIStringA+51725>: callq
*0x5643d(%rip)
# 0x7ff960769670 <UnhandledExceptionFilter+162720>
=> 0x00007ff960713233 <RegLoadMUIStringA+51731>: nop
0x00007ff960713234 <RegLoadMUIStringA+51732>: jmpq
0x7ff9606f681c <K
ERNELBASE!BemCreateContractFrom+33004>
0x00007ff960713239 <RegLoadMUIStringA+51737>: nop
0x00007ff96071323a <RegLoadMUIStringA+51738>: nop
0x00007ff96071323b <RegLoadMUIStringA+51739>: nop
0x00007ff96071323c <RegLoadMUIStringA+51740>: lea
0x41cfd(%rip),%rc
x # 0x7ff960754f40 <UnhandledExceptionFilter+78960>
0x00007ff960713243 <RegLoadMUIStringA+51747>: callq
*0x55e87(%rip)
# 0x7ff9607690d0 <UnhandledExceptionFilter+161280>
0x00007ff960713249 <RegLoadMUIStringA+51753>: nop
0x00007ff96071324a <RegLoadMUIStringA+51754>: mov
0x28(%rsp),%esi
0x00007ff96071324e <RegLoadMUIStringA+51758>: test %esi,%esi
0x00007ff960713250 <RegLoadMUIStringA+51760>: jne
0x7ff960713265 <R
egLoadMUIStringA+51781>
0x00007ff960713252 <RegLoadMUIStringA+51762>: mov
%gs:0x60,%rax
End of assembler dump.
}}}
I hope to have got the steps right this time, my apologies for wasting
your time
--
Ticket URL: <https://trac.ffmpeg.org/ticket/5764#comment:11>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list