[FFmpeg-devel] Segmentation fault when running vulkan
Dylan Fernando
dylanf123 at gmail.com
Fri May 14 20:49:14 EEST 2021
When running vulkan on arch linux, I get a segmentation fault.
Command:
ffmpeg -v verbose -init_hw_device vulkan=gpu:0.0 -filter_hw_device gpu -i
atm.mp4 -filter_complex hwupload,avgblur_vulkan,hwdownload atmvulk.mp4
-loglevel debug
Output:
ffmpeg version N-102515-g175f675f7b Copyright (c) 2000-2021 the FFmpeg
developers
built with gcc 10.2.0 (GCC)
configuration: --enable-opencl --enable-vulkan --enable-libglslang
libavutil 57. 0.100 / 57. 0.100
libavcodec 59. 1.100 / 59. 1.100
libavformat 59. 0.101 / 59. 0.101
libavdevice 59. 0.100 / 59. 0.100
libavfilter 8. 0.101 / 8. 0.101
libswscale 6. 0.100 / 6. 0.100
libswresample 4. 0.100 / 4. 0.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with
argument 'verbose'.
Reading option '-init_hw_device' ... matched as option 'init_hw_device'
(initialise hardware device) with argument 'vulkan=gpu:0.0'.
Reading option '-filter_hw_device' ... matched as option 'filter_hw_device'
(set hardware device used when filtering) with argument 'gpu'.
Reading option '-i' ... matched as input url with argument 'atm.mp4'.
Reading option '-filter_complex' ... matched as option 'filter_complex'
(create a complex filtergraph) with argument
'hwupload,avgblur_vulkan=10,hwdownload'.
Reading option 'atmvulk.mp4' ... matched as output url.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging
level) with argument 'debug'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument verbose.
[AVHWDeviceContext @ 0x563094799c80] GPU listing:
[AVHWDeviceContext @ 0x563094799c80] 0: NVIDIA GeForce RTX 2070 SUPER
(discrete) (0x1e84)
[AVHWDeviceContext @ 0x563094799c80] Using queue family 0 (total queues:
16) for graphics
[AVHWDeviceContext @ 0x563094799c80] QF 0 flags: (graphics) (compute)
(transfers) (sparse)
[AVHWDeviceContext @ 0x563094799c80] Using queue family 2 (total queues: 8)
for compute
[AVHWDeviceContext @ 0x563094799c80] QF 2 flags: (compute) (transfers)
(sparse)
[AVHWDeviceContext @ 0x563094799c80] Using queue family 1 (total queues: 2)
for transfers
[AVHWDeviceContext @ 0x563094799c80] QF 1 flags: (transfers) (sparse)
[AVHWDeviceContext @ 0x563094799c80] Using device extension
"VK_KHR_external_memory_fd"
[AVHWDeviceContext @ 0x563094799c80] Using device extension
"VK_KHR_external_semaphore_fd"
[AVHWDeviceContext @ 0x563094799c80] Using device extension
"VK_EXT_external_memory_host"
[AVHWDeviceContext @ 0x563094799c80] Using device extension
"VK_KHR_push_descriptor"
[AVHWDeviceContext @ 0x563094799c80] Using device extension
"VK_EXT_host_query_reset"
[AVHWDeviceContext @ 0x563094799c80] Using device extension
VK_KHR_external_memory_fd
[AVHWDeviceContext @ 0x563094799c80] Using device extension
VK_KHR_external_semaphore_fd
[AVHWDeviceContext @ 0x563094799c80] Using device extension
VK_EXT_external_memory_host
[AVHWDeviceContext @ 0x563094799c80] Using device extension
VK_KHR_push_descriptor
[AVHWDeviceContext @ 0x563094799c80] Using device extension
VK_EXT_host_query_reset
[AVHWDeviceContext @ 0x563094799c80] Using device: NVIDIA GeForce RTX 2070
SUPER
[AVHWDeviceContext @ 0x563094799c80] Alignments:
[AVHWDeviceContext @ 0x563094799c80]
optimalBufferCopyRowPitchAlignment: 1
[AVHWDeviceContext @ 0x563094799c80] minMemoryMapAlignment:
64
[AVHWDeviceContext @ 0x563094799c80] minImportedHostPointerAlignment:
4096
Successfully parsed a group of options.
Parsing a group of options: input url atm.mp4.
Successfully parsed a group of options.
Opening an input file: atm.mp4.
[NULL @ 0x563094a2a3c0] Opening 'atm.mp4' for reading
[file @ 0x563094a2ac00] Setting default whitelist 'file,crypto,data'
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x563094a2a3c0] Format mov,mp4,m4a,3gp,3g2,mj2
probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x563094a2a3c0] ISO: File Type Major Brand: mp42
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x563094a2a3c0] Unknown dref type 0x206c7275
size 12
Last message repeated 1 times
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x563094a2a3c0] Before
avformat_find_stream_info() pos: 23751465 bytes read:74604 seeks:1
nb_streams:2
[h264 @ 0x563094a33c00] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x563094a33c00] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0x563094a33c00] nal_unit_type: 9(AUD), nal_ref_idc: 0
[h264 @ 0x563094a33c00] nal_unit_type: 6(SEI), nal_ref_idc: 0
Last message repeated 1 times
[h264 @ 0x563094a33c00] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x563094a33c00] Format yuv420p chosen by get_format().
[h264 @ 0x563094a33c00] Reinit context to 1024x576, pix_fmt: yuv420p
[h264 @ 0x563094a33c00] nal_unit_type: 9(AUD), nal_ref_idc: 0
[h264 @ 0x563094a33c00] nal_unit_type: 1(Coded slice of a non-IDR picture),
nal_ref_idc: 3
[h264 @ 0x563094a33c00] nal_unit_type: 9(AUD), nal_ref_idc: 0
[h264 @ 0x563094a33c00] nal_unit_type: 1(Coded slice of a non-IDR picture),
nal_ref_idc: 3
[h264 @ 0x563094a33c00] nal_unit_type: 9(AUD), nal_ref_idc: 0
[h264 @ 0x563094a33c00] nal_unit_type: 1(Coded slice of a non-IDR picture),
nal_ref_idc: 3
[h264 @ 0x563094a33c00] nal_unit_type: 9(AUD), nal_ref_idc: 0
[h264 @ 0x563094a33c00] nal_unit_type: 1(Coded slice of a non-IDR picture),
nal_ref_idc: 3
[h264 @ 0x563094a33c00] nal_unit_type: 9(AUD), nal_ref_idc: 0
[h264 @ 0x563094a33c00] nal_unit_type: 1(Coded slice of a non-IDR picture),
nal_ref_idc: 3
[h264 @ 0x563094a33c00] nal_unit_type: 9(AUD), nal_ref_idc: 0
[h264 @ 0x563094a33c00] nal_unit_type: 1(Coded slice of a non-IDR picture),
nal_ref_idc: 3
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x563094a2a3c0] All info found
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x563094a2a3c0] After
avformat_find_stream_info() pos: 99174 bytes read:205676 seeks:2 frames:9
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'atm.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: mp41isom
Duration: 00:02:08.45, start: 0.000000, bitrate: 1479 kb/s
Stream #0:0(und), 8, 1/25000: Video: h264 (Constrained Baseline), 1
reference frame (avc1 / 0x31637661), yuv420p(left), 1024x576, 0/1, 1386
kb/s, 25 fps, 25 tbr, 25k tbn (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
encoder : AVC Coding
Stream #0:1(und), 1, 1/48000: Audio: aac (LC) (mp4a / 0x6134706D), 48000
Hz, stereo, fltp, 90 kb/s (default)
Metadata:
handler_name : SoundHandler
vendor_id : [0][0][0][0]
Successfully opened the file.
[Parsed_avgblur_vulkan_1 @ 0x563096362e00] Setting 'sizeX' to value '10'
Parsing a group of options: output url atmvulk.mp4.
Successfully parsed a group of options.
Opening an output file: atmvulk.mp4.
File 'atmvulk.mp4' already exists. Overwrite? [y/N] y
[file @ 0x563094b05b80] Setting default whitelist 'file,crypto,data'
Successfully opened the file.
detected 8 logical cores
[h264 @ 0x563094afe700] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x563094afe700] nal_unit_type: 8(PPS), nal_ref_idc: 3
Stream mapping:
Stream #0:0 (h264) -> hwupload (graph 0)
hwdownload (graph 0) -> Stream #0:0 (mpeg4)
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if
it occurs once at the start per stream)
Last message repeated 1 times
[h264 @ 0x563094afe700] nal_unit_type: 9(AUD), nal_ref_idc: 0
[h264 @ 0x563094afe700] nal_unit_type: 6(SEI), nal_ref_idc: 0
Last message repeated 1 times
[h264 @ 0x563094afe700] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x563094afe700] Format yuv420p chosen by get_format().
[h264 @ 0x563094afe700] Reinit context to 1024x576, pix_fmt: yuv420p
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if
it occurs once at the start per stream)
[h264 @ 0x563094a300c0] nal_unit_type: 9(AUD), nal_ref_idc: 0
[h264 @ 0x563094a300c0] nal_unit_type: 1(Coded slice of a non-IDR picture),
nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if
it occurs once at the start per stream)
[h264 @ 0x563096313040] nal_unit_type: 9(AUD), nal_ref_idc: 0
[h264 @ 0x563096313040] nal_unit_type: 1(Coded slice of a non-IDR picture),
nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if
it occurs once at the start per stream)
[h264 @ 0x56309619b5c0] nal_unit_type: 9(AUD), nal_ref_idc: 0
[h264 @ 0x56309619b5c0] nal_unit_type: 1(Coded slice of a non-IDR picture),
nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if
it occurs once at the start per stream)
[h264 @ 0x56309619d780] nal_unit_type: 9(AUD), nal_ref_idc: 0
[h264 @ 0x56309619d780] nal_unit_type: 1(Coded slice of a non-IDR picture),
nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if
it occurs once at the start per stream)
[h264 @ 0x5630961a3280] nal_unit_type: 9(AUD), nal_ref_idc: 0
[h264 @ 0x5630961a3280] nal_unit_type: 1(Coded slice of a non-IDR picture),
nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if
it occurs once at the start per stream)
[h264 @ 0x5630961f6540] nal_unit_type: 9(AUD), nal_ref_idc: 0
[h264 @ 0x5630961f6540] nal_unit_type: 1(Coded slice of a non-IDR picture),
nal_ref_idc: 3
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if
it occurs once at the start per stream)
[h264 @ 0x563096220f00] nal_unit_type: 9(AUD), nal_ref_idc: 0
[h264 @ 0x563096220f00] nal_unit_type: 1(Coded slice of a non-IDR picture),
nal_ref_idc: 3
[graph_1_in_0_1 @ 0x563096534840] Setting 'time_base' to value '1/48000'
[graph_1_in_0_1 @ 0x563096534840] Setting 'sample_rate' to value '48000'
[graph_1_in_0_1 @ 0x563096534840] Setting 'sample_fmt' to value 'fltp'
[graph_1_in_0_1 @ 0x563096534840] Setting 'channel_layout' to value '0x3'
[graph_1_in_0_1 @ 0x563096534840] tb:1/48000 samplefmt:fltp
samplerate:48000 chlayout:0x3
[format_out_0_1 @ 0x563096535840] Setting 'sample_fmts' to value 'fltp'
[format_out_0_1 @ 0x563096535840] Setting 'sample_rates' to value
'96000|88200|64000|48000|44100|32000|24000|22050|16000|12000|11025|8000|7350'
[AVFilterGraph @ 0x5630964a8480] query_formats: 4 queried, 9 merged, 0
already done, 0 delayed
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if
it occurs once at the start per stream)
Last message repeated 14 times
[h264 @ 0x563096474e80] nal_unit_type: 9(AUD), nal_ref_idc: 0
[h264 @ 0x563096474e80] nal_unit_type: 1(Coded slice of a non-IDR picture),
nal_ref_idc: 3
[Parsed_avgblur_vulkan_1 @ 0x5630965da980] Setting 'sizeX' to value '10'
[graph 0 input from stream 0:0 @ 0x5630965dc500] Setting 'video_size' to
value '1024x576'
[graph 0 input from stream 0:0 @ 0x5630965dc500] Setting 'pix_fmt' to value
'0'
[graph 0 input from stream 0:0 @ 0x5630965dc500] Setting 'time_base' to
value '1/25000'
[graph 0 input from stream 0:0 @ 0x5630965dc500] Setting 'pixel_aspect' to
value '0/1'
[graph 0 input from stream 0:0 @ 0x5630965dc500] Setting 'frame_rate' to
value '25/1'
[graph 0 input from stream 0:0 @ 0x5630965dc500] w:1024 h:576
pixfmt:yuv420p tb:1/25000 fr:25/1 sar:0/1
[format @ 0x5630965d6680] Setting 'pix_fmts' to value 'yuv420p'
[AVFilterGraph @ 0x5630965def40] query_formats: 6 queried, 5 merged, 0
already done, 0 delayed
[hwupload @ 0x563096490540] Surface format is yuv420p.
Segmentation fault (core dumped)
backtrace from gdb:
Thread 1 "ffmpeg" received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) backtrace
#0 0x0000000000000000 in ?? ()
#1 0x000055555645fc52 in create_exec_ctx (hwfc=0x555558f7dc00,
cmd=0x555558f7e080,
queue_family_index=2, num_queues=8)
at libavutil/hwcontext_vulkan.c:1018
#2 0x0000555556464b34 in vulkan_frames_init (hwfc=0x555558f7dc00) at
libavutil/hwcontext_vulkan.c:2025
#3 0x0000555556457e80 in av_hwframe_ctx_init (ref=0x555558e98940) at
libavutil/hwcontext.c:363
#4 0x00005555557d9dac in hwupload_config_output (outlink=0x555558f3d800)
at libavfilter/vf_hwupload.c:154
#5 0x00005555557341c8 in avfilter_config_links (filter=0x555558f37c80) at
libavfilter/avfilter.c:306
#6 0x00005555557341af in avfilter_config_links (filter=0x555558f3da00) at
libavfilter/avfilter.c:295
#7 0x00005555557341af in avfilter_config_links (filter=0x555558f3a7c0) at
libavfilter/avfilter.c:295
#8 0x00005555557341af in avfilter_config_links (filter=0x555558f3a300) at
libavfilter/avfilter.c:295
#9 0x00005555557385df in graph_config_links (log_ctx=<optimized out>,
graph=<optimized
out>) at libavfilter/avfiltergraph.c:258
#10 avfilter_graph_config (graphctx=<optimized out>, log_ctx=log_ctx at entry=0x0)
at libavfilter/avfiltergraph.c:1223
#11 0x00005555556fb35e in configure_filtergraph (fg=fg at entry=0x55555738c480)
at fftools/ffmpeg_filter.c:1053
#12 0x000055555570d970 in ifilter_send_frame (frame=0x555558cadc40,
ifilter=0x555557461900)
at fftools/ffmpeg.c:2234
#13 send_frame_to_filters (ist=ist at entry=0x555558e26100,
decoded_frame=decoded_frame at entry=0x555558cadc40) at fftools/ffmpeg.c:2315
#14 0x000055555570e039 in decode_video (decode_failed=<optimized out>,
eof=<optimized
out>, duration_pts=<optimized out>,
got_output=<optimized out>, pkt=<optimized out>, ist=<optimized out>) at
fftools/ffmpeg.c:2512
#15 process_input_packet (ist=ist at entry=0x555558e26100, pkt=0x555558e20680,
no_eof=no_eof at entry=0) at fftools/ffmpeg.c:2672
#16 0x0000555555710366 in process_input (file_index=<optimized out>) at
fftools/ffmpeg.c:4614
#17 transcode_step () at fftools/ffmpeg.c:4754
#18 transcode () at fftools/ffmpeg.c:4808
#19 0x00005555556eb46e in main (argc=12, argv=0x7fffffffe608) at
fftools/ffmpeg.c:5013
More information about the ffmpeg-devel
mailing list