Opened 8 years ago

Last modified 7 years ago

#5764 reopened defect

ffmpeg deadlock with first pass x264 encode with >=slower and bitrate set

Reported by: MonoS Owned by:
Priority: important Component: undetermined
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug: ffmpeg deadlock trying to encode the first pass of a 2pass encode with the preset >= than slower and the bitrate set to about about 9102k [i haven't tried other bitrates]

When trying to encode the test file i've attached [but it seems to happens with all the file that i've tried], ffmpeg block at random frames count, no CPU time is spent on the process and the console doesn't output anything.
Is more an heisenbug than a normal bug, it's a matter of luck to reproduce and don't reproduce with different versions, settings and os.
The bug doesn't seems to occurs on version before windows 8, i've tried to reproduce this bug with success on a win 8.1 and win server 2012 R2, on windows 7 both on VM and not the problem does not occurs.

The first Zeranoe's version to have this bug is the 50747d6, the version before [3f5b7a2] doesn't seems to have this problem, the problem still occurs with the latest git compiled by them [369ed11].

The only way to close it is via hard exit [ctrl+c 3 times], other ways doesn't seems to works.

I've tried to make a bisect of the bug but with my build environment the problem occurs even on the working version [3f5b7a2]

How to reproduce:

% ffmpeg -i input -c:v libx264 -preset slower -b:v 9102k -pass 1 -passlogfile test_deadlock.stats -f null NUL
ffmpeg version 50747d6 to 369ed11
built by Zeranoe

Test file: https://www.datafilehost.com/d/11af1c16

Attachments (5)

Change History (21)

by MonoS, 8 years ago

by MonoS, 8 years ago

comment:1 by Carl Eugen Hoyos, 8 years ago

Resolution: worksforme
Status: newclosed

Please reopen if you can provide a backtrace, your report indicates a hardware issue afaict.

$ ffmpeg -i ffmpeg\ deadlock\ on\ 1pass.mkv -c:v libx264 -preset slower -b:v 9102k -f null -
ffmpeg version N-81311-g16ea0bc Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.8 (SUSE Linux)
  configuration: --enable-gpl --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 '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
[libx264 @ 0x1f87ce0] using SAR=1/1
[libx264 @ 0x1f87ce0] using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64 SlowShuffle
[libx264 @ 0x1f87ce0] profile High, level 5.0
[null @ 0x1f8ad60] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
Output #0, null, to 'pipe:':
  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
frame= 4013 fps=1.1 q=-1.0 Lsize=N/A time=00:02:47.12 bitrate=N/A speed=0.0441x    
video:197002kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[libx264 @ 0x1f87ce0] frame I:20    Avg QP:10.07  size:114202
[libx264 @ 0x1f87ce0] frame P:1251  Avg QP:14.41  size: 63829
[libx264 @ 0x1f87ce0] frame B:2742  Avg QP:14.99  size: 43617
[libx264 @ 0x1f87ce0] consecutive B-frames:  3.0%  6.6% 33.5% 56.9%
[libx264 @ 0x1f87ce0] mb I  I16..4: 44.8% 47.5%  7.7%
[libx264 @ 0x1f87ce0] mb P  I16..4:  5.2% 15.3%  1.3%  P16..4: 28.6%  9.3%  5.3%  0.1%  0.0%    skip:34.9%
[libx264 @ 0x1f87ce0] mb B  I16..4:  1.2%  3.3%  0.3%  B16..8: 31.9%  8.9%  1.8%  direct: 8.9%  skip:43.8%  L0:52.7% L1:41.0% BI: 6.3%
[libx264 @ 0x1f87ce0] final ratefactor: 17.59
[libx264 @ 0x1f87ce0] 8x8 transform intra:68.7% inter:68.5%
[libx264 @ 0x1f87ce0] direct mvs  spatial:99.1% temporal:0.9%
[libx264 @ 0x1f87ce0] coded y,uvDC,uvAC intra: 74.6% 59.3% 26.4% inter: 31.4% 22.5% 3.3%
[libx264 @ 0x1f87ce0] i16 v,h,dc,p: 42% 16% 25% 18%
[libx264 @ 0x1f87ce0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu:  7%  9% 13% 10% 14% 11% 14%  9% 12%
[libx264 @ 0x1f87ce0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14% 16% 22%  6%  8%  7% 10%  6% 11%
[libx264 @ 0x1f87ce0] i8c dc,h,v,p: 51% 25% 16%  8%
[libx264 @ 0x1f87ce0] Weighted P-Frames: Y:11.8% UV:7.0%
[libx264 @ 0x1f87ce0] ref P L0: 42.2%  6.1% 17.8%  9.8%  7.6%  6.6%  5.5%  3.8%  0.6%  0.0%
[libx264 @ 0x1f87ce0] ref B L0: 63.3% 15.6%  8.8%  4.7%  3.8%  2.6%  1.2%
[libx264 @ 0x1f87ce0] ref B L1: 95.2%  4.8%
[libx264 @ 0x1f87ce0] kb/s:9651.69

comment:2 by MonoS, 8 years ago

Sorry for my lack of knowledge, i've compiled ffmpeg from the latest git with my usual environment [i did not turned off optimization], downloaded gdb and tried doing as in your documentation here https://ffmpeg.org/bugreports.html but i don't know how to have the backtrace when the process get stuck.

Then tried attaching the process and printing a backtrace but i only got this

#0  0x00007ff909fa21e1 in ntdll!DbgUiContinue ()
   from C:\Windows\SYSTEM32\ntdll.dll
#1  0x00007ff909fcf3a4 in ntdll!EtwEventActivityIdControl ()
   from C:\Windows\SYSTEM32\ntdll.dll
#2  0x0000000000000000 in ?? ()

Instead, this is the info all-register dump

rax 0x7ff5ffe8c000
rbx 0x7ff909fcf370
rxc 0x0
rdx 0x7ff909fcf370

rsp 0x428aff28

rip 0x7ff909fa21e1 (ntdll!DbgUiContinue+1)
eflags 0x246 [PF ZF IF]
cs 0x33
ss 0x246002b
gs 0x2b0000
fctrl 0x27f

the other register are empty [0x0]

I'm sure i'm doing something wrong with gdb, if i may have some more extensive instruction i'll provide all the information i can.

I don't think it may be an hardware issue, i've tried it on 4 different machine with the same results

comment:3 by MonoS, 8 years ago

Resolution: worksforme
Status: closedreopened

comment:4 by Carl Eugen Hoyos, 8 years ago

Please provide an actual backtrace: The issue cannot be analyzed without.

in reply to:  4 comment:5 by MonoS, 8 years ago

Replying to cehoyos:

Please provide an actual backtrace: The issue cannot be analyzed without.

I apologies, but I need further information to produce a proper backtrace, the information provided in your wiki seems to be not enough for my case.

Sorry for the inconvenience.

comment:6 by Carl Eugen Hoyos, 8 years ago

If you cannot produce a backtrace (just run ffmpeg inside of gdb and wait for the hang) if may be easier if you test two things:
Can you reproduce the hang with FFmpeg if you compile without --enable-x264?
Can you reproduce the hang with x264 (the executable) alone without using FFmpeg?

comment:7 by MonoS, 8 years ago

(just run ffmpeg inside of gdb and wait for the hang)

that's exactly what i did, but when ffmpeg hangs i don't exactly know what to do then, i've tried ctrl+c then bt, or just writing bt but nothing.
It's my first time using gdb without outside of my IDE.

Can you reproduce the hang with x264 (the executable) alone without using FFmpeg?

The problem doesn't appear using vanilla x264 compiled by komisar.

Can you reproduce the hang with FFmpeg if you compile without --enable-x264?

i didn't tried, but i don't know how to reproduce the problem using other codecs, i've tried with x265 without success (using -x265-params option to set --pass parameters)

comment:8 by Carl Eugen Hoyos, 8 years ago

At least provide console and (useless) gdb output from your self-compiled version.

in reply to:  8 comment:9 by MonoS, 8 years ago

Replying to cehoyos:

At least provide console and (useless) gdb output from your self-compiled version.

I already gave all the information i got from gdb in the second message https://trac.ffmpeg.org/ticket/5764#comment:2

comment:10 by Carl Eugen Hoyos, 8 years ago

No, you provided a short excerpt.

comment:11 by MonoS, 8 years ago

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

comment:12 by MonoS, 7 years ago

Is there any update? I tried today with the latest zeranoe without success.

If it can help i can give access to my machine when i can reproduce the issue.

in reply to:  12 comment:13 by Carl Eugen Hoyos, 7 years ago

Replying to MonoS:

Is there any update? I tried today with the latest zeranoe without success.

Please test with -cpuflags 0 and provide the complete, uncut console output.
I tested on different Windows systems with Zeranoe binaries and cannot reproduce a deadlock.

comment:14 by MonoS, 7 years ago

Tried without success.
This is my command line
.\ffmpeg_g.exe -i "ffmpeg deadlock on 1pass.mkv" -cpuflags 0 -c:v libx264 -preset slower -b:v 9102k -pass 1 -passlogfile test_deadlock.stats -report -f null NUL

comment:15 by Carl Eugen Hoyos, 7 years ago

Please test with a Zeranoe binary.

comment:16 by MonoS, 7 years ago

My apologies, I confused some of the files in my folders, here the correct log.

Note: See TracTickets for help on using tickets.