Opened 7 years ago
Closed 7 years ago
#6691 closed defect (fixed)
Segfault when running libvmaf with psnr option
Reported by: | slhck | Owned by: | |
---|---|---|---|
Priority: | important | Component: | avfilter |
Version: | git-master | Keywords: | libvmaf crash SIGSEGV |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Using latest ffmpeg and latest libvmaf (d84caaa
) under macOS 10.12. When running the libvmaf
filter without options, everything works fine. When adding psnr=1
as explained in the docs, I get a segfault.
GNU gdb (GDB) 8.0.1 Copyright (C) 2017 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-apple-darwin16.7.0". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from ./ffmpeg_g...done. (gdb) r -i /Users/werner/Downloads/test-in.mp4 -i /Users/werner/Downloads/test-out.mp4 -lavfi libvmaf=psnr=1 -f null - Starting program: /Users/werner/Documents/Software/ffmpeg/ffmpeg_g -i /Users/werner/Downloads/test-in.mp4 -i /Users/werner/Downloads/test-out.mp4 -lavfi libvmaf=psnr=1 -f null - [New Thread 0x1a03 of process 2414] warning: unhandled dyld version (15) ffmpeg version N-87388-g4efb1658f5 Copyright (c) 2000-2017 the FFmpeg developers built with Apple LLVM version 9.0.0 (clang-900.0.37) configuration: --enable-libvmaf libavutil 55. 76.100 / 55. 76.100 libavcodec 57.106.101 / 57.106.101 libavformat 57. 82.101 / 57. 82.101 libavdevice 57. 8.101 / 57. 8.101 libavfilter 6.106.100 / 6.106.100 libswscale 4. 7.103 / 4. 7.103 libswresample 2. 8.100 / 2. 8.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/werner/Downloads/test-in.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 title : Big Buck Bunny, Sunflower version artist : Blender Foundation 2008, Janus Bager Kristensen 2013 composer : Sacha Goedegebure encoder : Lavf57.71.100 comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net genre : Animation Duration: 00:00:01.00, start: 0.000000, bitrate: 1417 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 1402 kb/s, 60 fps, 60 tbr, 15360 tbn, 120 tbc (default) Metadata: handler_name : VideoHandler Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/werner/Downloads/test-out.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 title : Big Buck Bunny, Sunflower version artist : Blender Foundation 2008, Janus Bager Kristensen 2013 composer : Sacha Goedegebure encoder : Lavf57.71.100 comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net genre : Animation Duration: 00:00:01.00, start: 0.000000, bitrate: 403 kb/s Stream #1:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 388 kb/s, 60 fps, 60 tbr, 15360 tbn, 120 tbc (default) Metadata: handler_name : VideoHandler Stream mapping: Stream #0:0 (h264) -> libvmaf:main Stream #1:0 (h264) -> libvmaf:reference libvmaf -> Stream #0:0 (wrapped_avframe) Press [q] to stop, [?] for help Start calculating VMAF score... Output #0, null, to 'pipe:': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 title : Big Buck Bunny, Sunflower version artist : Blender Foundation 2008, Janus Bager Kristensen 2013 composer : Sacha Goedegebure genre : Animation comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net encoder : Lavf57.82.101 Stream #0:0: Video: wrapped_avframe, yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 60 fps, 60 tbn, 60 tbc (default) Metadata: encoder : Lavc57.106.101 wrapped_avframe [New Thread 0x1807 of process 2414] [New Thread 0x1b03 of process 2414] [New Thread 0x1c03 of process 2414] [New Thread 0x1d03 of process 2414] [New Thread 0x1e03 of process 2414] [New Thread 0x1f03 of process 2414] [New Thread 0x2003 of process 2414] [New Thread 0x2103 of process 2414] [New Thread 0x2203 of process 2414] [New Thread 0x2303 of process 2414] [New Thread 0x2403 of process 2414] [New Thread 0x2503 of process 2414] [New Thread 0x2603 of process 2414] [New Thread 0x2703 of process 2414] [New Thread 0x2803 of process 2414] [New Thread 0x2903 of process 2414] [New Thread 0x2a03 of process 2414] Thread 3 received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x1807 of process 2414] 0x00007fffc2556330 in ?? ()
#0 0x00007fffc2556330 in ?? () #1 0x0000700001a1f7c0 in ?? () #2 0x0000000100d14b95 in combo (read_frame=<optimized out>, user_data=<optimized out>, w=1920, h=1080, fmt=<optimized out>, adm_num_array=<optimized out>, adm_den_array=<optimized out>, adm_num_scale0_array=<optimized out>, adm_den_scale0_array=<optimized out>, adm_num_scale1_array=<optimized out>, adm_den_scale1_array=<optimized out>, adm_num_scale2_array=<optimized out>, adm_den_scale2_array=<optimized out>, adm_num_scale3_array=<optimized out>, adm_den_scale3_array=<optimized out>, motion_array=<optimized out>, vif_num_scale0_array=<optimized out>, vif_den_scale0_array=<optimized out>, vif_num_scale1_array=<optimized out>, vif_den_scale1_array=<optimized out>, vif_num_scale2_array=<optimized out>, vif_den_scale2_array=<optimized out>, vif_num_scale3_array=<optimized out>, vif_den_scale3_array=<optimized out>, vif_array=<optimized out>, psnr_array=<optimized out>, ssim_array=<optimized out>, ms_ssim_array=<optimized out>, errmsg=<optimized out>) at /Users/werner/Documents/Software/vmaf/wrapper/src/combo.c:171 Backtrace stopped: frame did not save the PC
Dump of assembler code from 0x7fffc2556310 to 0x7fffc2556350: 0x00007fffc2556310: (bad) 0x00007fffc2556311: sub %r8,%rax 0x00007fffc2556314: jne 0x7fffc25562ab 0x00007fffc2556316: test %r8,%r8 0x00007fffc2556319: je 0x7fffc25562ab 0x00007fffc255631b: test $0xf,%rdi 0x00007fffc2556322: jne 0x7fffc2556303 0x00007fffc2556324: mov $0xff0,%r9 0x00007fffc255632b: jmp 0x7fffc25562d0 0x00007fffc255632d: nopl (%rax) => 0x00007fffc2556330: movdqa (%rdi,%rcx,1),%xmm0 0x00007fffc2556335: movdqu (%rsi,%rcx,1),%xmm1 0x00007fffc255633a: pcmpeqb %xmm1,%xmm0 0x00007fffc255633e: pcmpeqb %xmm2,%xmm1 0x00007fffc2556342: pandn %xmm0,%xmm1 0x00007fffc2556346: pmovmskb %xmm1,%eax 0x00007fffc255634a: add $0x10,%rcx 0x00007fffc255634e: cmp $0xffff,%eax End of assembler dump.
(gdb) info all-registers rax 0x0 0 rbx 0x0 0 rcx 0x0 0 rdx 0x10230b0f0 4331712752 rsi 0x1010b9040 4312502336 rdi 0x0 0 rbp 0x700001a1f610 0x700001a1f610 rsp 0x700001a1f610 0x700001a1f610 r8 0x10230b0e8 4331712744 r9 0x100 256 r10 0x100 256 r11 0x780 1920 r12 0x780 1920 r13 0x1e00 7680 r14 0x438 1080 r15 0x0 0 rip 0x7fffc2556330 0x7fffc2556330 eflags 0x10246 [ PF ZF IF RF ] cs 0x2b 43 ss <unavailable> ds <unavailable> es <unavailable> fs 0x0 0 gs 0x0 0 st0 -inf (raw 0xffff0000000000000000) st1 -nan(0x000000100) (raw 0xffff0000000000000100) st2 0 (raw 0x00000000000000000000) st3 0 (raw 0x00000000000000000000) st4 0 (raw 0x00000000000000000000) st5 -inf (raw 0xffff0000000000000000) st6 5999 (raw 0x400bbb78000000000000) st7 2147483647 (raw 0x401dfffffffe00000000) fctrl 0x37f 895 fstat 0x0 0 ftag 0xffff 65535 fiseg 0x0 0 fioff 0x0 0 foseg 0x0 0 fooff 0x0 0 fop 0x0 0 xmm0 {v4_float = {0x10, 0x10, 0x10, 0x10}, v2_double = {0x2000008, 0x2000008}, v16_int8 = {0x0, 0x0, 0x80, 0x41, 0x0, 0x0, 0x80, 0x41, 0x0, 0x0, 0x80, 0x41, 0x0, 0x0, 0x80, 0x41}, v8_int16 = {0x0, 0x4180, 0x0, 0x4180, 0x0, 0x4180, 0x0, 0x4180}, v4_int32 = {0x41800000, 0x41800000, 0x41800000, 0x41800000}, v2_int64 = {0x4180000041800000, 0x4180000041800000}, uint128 = 0x41800000418000004180000041800000} xmm1 {v4_float = {0x10, 0x10, 0x10, 0x10}, v2_double = {0x2000008, 0x2000008}, v16_int8 = {0x0, 0x0, 0x80, 0x41, 0x0, 0x0, 0x80, 0x41, 0x0, 0x0, 0x80, 0x41, 0x0, 0x0, 0x80, 0x41}, v8_int16 = {0x0, 0x4180, 0x0, 0x4180, 0x0, 0x4180, 0x0, 0x4180}, v4_int32 = {0x41800000, 0x41800000, 0x41800000, 0x41800000}, v2_int64 = {0x4180000041800000, 0x4180000041800000}, uint128 = 0x41800000418000004180000041800000} xmm2 {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, ---Type <return> to continue, or q <return> to quit--- 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0}, uint128 = 0x00000000000000000000000000000000} 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 = {0x34, 0x20, 0x36, 0x3a, 0x30, 0x2e, 0x38, 0x35, 0x38, 0x39, 0x32, 0x36, 0x35, 0x37, 0x20, 0xa}, v8_int16 = {0x2034, 0x3a36, 0x2e30, 0x3538, 0x3938, 0x3632, 0x3735, 0xa20}, v4_int32 = {0x3a362034, 0x35382e30, 0x36323938, 0xa203735}, v2_int64 = {0x35382e303a362034, 0xa20373536323938}, uint128 = 0x0a2037353632393835382e303a362034} 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 0x1fa0 [ PE IM DM ZM OM UM PM ]
Attachments (2)
Change History (6)
by , 7 years ago
Attachment: | test-in.mp4 added |
---|
by , 7 years ago
Attachment: | test-out.mp4 added |
---|
comment:1 by , 7 years ago
Keywords: | crash SIGSEGV added |
---|---|
Priority: | normal → important |
comment:2 by , 7 years ago
My thinking was that the libvmaf maintainer would check these bug reports. The crash only occurs when using VMAF in ffmpeg. I don't get any segfault on the same sequences after converting them to YUV and running VMAF directly:
$ ffmpeg -i test-in.mp4 -c:v rawvideo -pix_fmt yuv420p in.yuv $ ffmpeg -i test-out.mp4 -c:v rawvideo -pix_fmt yuv420p out.yuv $ cd ~/Documents/Software/vmaf $ ./run_psnr yuv420p 1920 1080 ~/Downloads/in.yuv ~/Downloads/out.yuv ... Aggregate (mean): PSNR_score:46.498158
comment:3 by , 7 years ago
That said, I can also report the bug in VMAF's GitHub issue tracker, if you would prefer that.
comment:4 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in 4c38aa79ece4fa0ea7533774197d6408d7d3b9e5.
Why do you believe that thus issue can be fixed in FFmpeg?