Segfault in Gstreamer audio decoder
Hi,
I'm getting a segfault when using Shotwell in certain scenarios and it seems to be a problem with Gstreamer.
Stack Trace:
Thread 61 (Thread 0x7fff877fe700 (LWP 21542)):
#0 0x00007ffff7eafe3d in syscall () at /usr/lib/libc.so.6
#1 0x00007ffff7a83461 in g_cond_wait () at /usr/lib/libglib-2.0.so.0
#2 0x00007ffff6a38c0e in do_probe_callbacks (pad=pad@entry=0x7fff902119e0, info=info@entry=0x7fff877fcda0, defaultval=defaultval@entry=GST_FLOW_OK) at ../gstreamer/gst/gstpad.c:3773
#3 0x00007ffff6a41093 in gst_pad_peer_query (pad=0x7fff902119e0, query=query@entry=0x555556723cf0) at ../gstreamer/gst/gstpad.c:4192
#4 0x00007ffff53c7af1 in gst_video_decoder_negotiate_pool (decoder=0x7fff9c07c1c0, caps=<optimized out>) at ../gst-plugins-base/gst-libs/gst/video/gstvideodecoder.c:3721
#5 0x00007ffff53cffbf in gst_video_decoder_negotiate (decoder=0x7fff9c07c1c0) at ../gst-plugins-base/gst-libs/gst/video/gstvideodecoder.c:3913
#6 0x00007fffcc8148fe in () at /usr/lib/gstreamer-1.0/libgstlibav.so
#7 0x00007fffcc815962 in () at /usr/lib/gstreamer-1.0/libgstlibav.so
#8 0x00007ffff53c8182 in gst_video_decoder_decode_frame (decoder=decoder@entry=0x7fff9c07c1c0, frame=0x7fff88008c00) at ../gst-plugins-base/gst-libs/gst/video/gstvideodecoder.c:3402
#9 0x00007ffff53cc95e in gst_video_decoder_chain_forward (decoder=decoder@entry=0x7fff9c07c1c0, buf=buf@entry=0x7fff9c0465a0, at_eos=at_eos@entry=0) at ../gst-plugins-base/gst-libs/gst/video/gstvideodecoder.c:2123
#10 0x00007ffff53cd02b in gst_video_decoder_chain (pad=<optimized out>, parent=0x7fff9c07c1c0, buf=0x7fff9c0465a0) at ../gst-plugins-base/gst-libs/gst/video/gstvideodecoder.c:2438
#11 0x00007ffff6a3f739 in gst_pad_chain_data_unchecked (pad=pad@entry=0x7fff90211c30, type=type@entry=4112, data=data@entry=0x7fff9c0465a0) at ../gstreamer/gst/gstpad.c:4326
#12 0x00007ffff6a401fb in gst_pad_push_data (pad=pad@entry=0x7fff90211540, type=type@entry=4112, data=data@entry=0x7fff9c0465a0) at ../gstreamer/gst/gstpad.c:4582
#13 0x00007ffff6a405da in gst_pad_push (pad=0x7fff90211540, buffer=0x7fff9c0465a0) at ../gstreamer/gst/gstpad.c:4701
#14 0x00007ffff527b9c4 in gst_base_transform_chain (pad=<optimized out>, parent=0x7fff6001ac80, buffer=<optimized out>) at ../gstreamer/libs/gst/base/gstbasetransform.c:2330
#15 0x00007ffff6a3f739 in gst_pad_chain_data_unchecked (pad=pad@entry=0x555556cf1550, type=type@entry=4112, data=data@entry=0x7fff9c0465a0) at ../gstreamer/gst/gstpad.c:4326
#16 0x00007ffff6a401fb in gst_pad_push_data (pad=pad@entry=0x7fff902112f0, type=type@entry=4112, data=data@entry=0x7fff9c0465a0) at ../gstreamer/gst/gstpad.c:4582
#17 0x00007ffff6a405da in gst_pad_push (pad=0x7fff902112f0, buffer=buffer@entry=0x7fff9c0465a0) at ../gstreamer/gst/gstpad.c:4701
#18 0x00007ffff52a37a9 in gst_base_parse_push_frame (parse=parse@entry=0x7fff9c071a60, frame=frame@entry=0x555556720140) at ../gstreamer/libs/gst/base/gstbaseparse.c:2580
#19 0x00007ffff52a435d in gst_base_parse_handle_and_push_frame (frame=0x555556720140, parse=0x7fff9c071a60) at ../gstreamer/libs/gst/base/gstbaseparse.c:2394
#20 0x00007ffff52a435d in gst_base_parse_finish_frame (parse=0x7fff9c071a60, frame=0x555556720140, size=<optimized out>) at ../gstreamer/libs/gst/base/gstbaseparse.c:2738
#21 0x00007fffcc8a57af in () at /usr/lib/gstreamer-1.0/libgstvideoparsersbad.so
#22 0x00007ffff529dd78 in gst_base_parse_handle_buffer (parse=parse@entry=0x7fff9c071a60, buffer=<optimized out>, skip=skip@entry=0x7fff877fd868, flushed=flushed@entry=0x7fff877fd86c) at ../gstreamer/libs/gst/base/gstbaseparse.c:2202
#23 0x00007ffff52a1121 in gst_base_parse_chain (pad=<optimized out>, parent=0x7fff9c071a60, buffer=<optimized out>) at ../gstreamer/libs/gst/base/gstbaseparse.c:3287
#24 0x00007ffff6a3f739 in gst_pad_chain_data_unchecked (pad=pad@entry=0x7fff90210e50, type=type@entry=4112, data=data@entry=0x7fff90120000) at ../gstreamer/gst/gstpad.c:4326
#25 0x00007ffff6a401fb in gst_pad_push_data (pad=pad@entry=0x7fff90020f10, type=type@entry=4112, data=data@entry=0x7fff90120000) at ../gstreamer/gst/gstpad.c:4582
#26 0x00007ffff6a405da in gst_pad_push (pad=0x7fff90020f10, buffer=buffer@entry=0x7fff90120000 [None]) at ../gstreamer/gst/gstpad.c:4701
#27 0x00007fffcc97f6cd in gst_single_queue_push_one (allow_drop=<synthetic pointer>, object=0x7fff90120000 [None], sq=0x7fff9c061800, mq=0x7fff90004da0) at ../gstreamer/plugins/elements/gstmultiqueue.c:1639
#28 0x00007fffcc97f6cd in gst_multi_queue_loop (pad=<optimized out>) at ../gstreamer/plugins/elements/gstmultiqueue.c:1959
#29 0x00007ffff6a1a409 in gst_task_func (task=0x7fff9c034dd0) at ../gstreamer/gst/gsttask.c:328
#30 0x00007ffff7aa9df6 in () at /usr/lib/libglib-2.0.so.0
#31 0x00007ffff7ab0f21 in () at /usr/lib/libglib-2.0.so.0
#32 0x00007ffff645b57f in start_thread () at /usr/lib/libpthread.so.0
#33 0x00007ffff7eb50e3 in clone () at /usr/lib/libc.so.6
Thread 60 (Thread 0x7fffb4ff9700 (LWP 21541)):
#0 0x00007ffff7eafe3d in syscall () at /usr/lib/libc.so.6
#1 0x00007ffff7a83461 in g_cond_wait () at /usr/lib/libglib-2.0.so.0
#2 0x00007ffff5274b4c in gst_data_queue_push (queue=0x7fffa000e690, item=item@entry=0x7fff900090a0) at ../gstreamer/libs/gst/base/gstdataqueue.c:521
#3 0x00007fffcc97deef in gst_multi_queue_chain (pad=<optimized out>, parent=<optimized out>, buffer=<optimized out>) at ../gstreamer/plugins/elements/gstmultiqueue.c:2148
#4 0x00007ffff6a3f739 in gst_pad_chain_data_unchecked (pad=pad@entry=0x7fff90021aa0, type=type@entry=4112, data=data@entry=0x7fff9c438a20) at ../gstreamer/gst/gstpad.c:4326
#5 0x00007ffff6a401fb in gst_pad_push_data (pad=pad@entry=0x7fff90020cc0, type=type@entry=4112, data=data@entry=0x7fff9c438a20) at ../gstreamer/gst/gstpad.c:4582
#6 0x00007ffff6a405da in gst_pad_push (pad=0x7fff90020cc0, buffer=0x7fff9c438a20) at ../gstreamer/gst/gstpad.c:4701
#7 0x00007fffcc90ca9b in () at /usr/lib/gstreamer-1.0/libgstisomp4.so
--Type <RET> for more, q to quit, c to continue without paging--c
#8 0x00007fffcc8f0901 in () at /usr/lib/gstreamer-1.0/libgstisomp4.so
#9 0x00007fffcc913879 in () at /usr/lib/gstreamer-1.0/libgstisomp4.so
#10 0x00007ffff6a1a409 in gst_task_func (task=0x7fff901205f0) at ../gstreamer/gst/gsttask.c:328
#11 0x00007ffff7aa9df6 in () at /usr/lib/libglib-2.0.so.0
#12 0x00007ffff7ab0f21 in () at /usr/lib/libglib-2.0.so.0
#13 0x00007ffff645b57f in start_thread () at /usr/lib/libpthread.so.0
#14 0x00007ffff7eb50e3 in clone () at /usr/lib/libc.so.6
Thread 59 (Thread 0x7fff867fc700 (LWP 21516)):
#0 0x00007ffff7eaa756 in ppoll () at /usr/lib/libc.so.6
#1 0x00007ffff6a304bb in ppoll (__ss=0x0, __timeout=0x7fff867fb6a0, __nfds=<optimized out>, __fds=<optimized out>) at /usr/include/bits/poll2.h:77
#2 0x00007ffff6a304bb in gst_poll_wait (set=0x555557474370, timeout=500000000 [0:00:00.500000000]) at ../gstreamer/gst/gstpoll.c:1468
#3 0x00007ffff6a6bd67 in gst_bus_timed_pop_filtered (bus=0x5555573aa4d0, timeout=timeout@entry=500000000 [0:00:00.500000000], types=types@entry=GST_MESSAGE_ANY) at ../gstreamer/gst/gstbus.c:581
#4 0x00007ffff6a6c10b in gst_bus_timed_pop (bus=<optimized out>, timeout=timeout@entry=500000000 [0:00:00.500000000]) at ../gstreamer/gst/gstbus.c:623
#5 0x00007ffff6af5a4e in handle_current_sync (dc=0x7fff9c0778c0) at ../gst-plugins-base/gst-libs/gst/pbutils/gstdiscoverer.c:1754
#6 0x00007ffff6af5a4e in start_discovering (dc=dc@entry=0x7fff9c0778c0) at ../gst-plugins-base/gst-libs/gst/pbutils/gstdiscoverer.c:2046
#7 0x00007ffff6af5d26 in gst_discoverer_discover_uri (discoverer=discoverer@entry=0x7fff9c0778c0, uri=uri@entry=0x7fff58002650 "file:///run/media/meyer9/Samsung_T5/photos-all/2019/02/14/FVSF6642.MP4", err=err@entry=0x7fff867fb9c8) at ../gst-plugins-base/gst-libs/gst/pbutils/gstdiscoverer.c:2581
#8 0x00005555556339d2 in video_reader_read_internal (error=0x7fff867fb9c0, self=Python Exception <class 'ValueError'> Variable 'static_fundamental_type_nodes' not found.:
) at ../shotwell-0.30.4/src/VideoSupport.vala:208
#9 0x00005555556339d2 in video_reader_read_clip_duration (self=self@entry=Python Exception <class 'ValueError'> Variable 'static_fundamental_type_nodes' not found.:
, error=error@entry=0x7fff867fba88) at ../shotwell-0.30.4/src/VideoSupport.vala:310
#10 0x000055555563b07b in video_reader_prepare_for_import (params=Python Exception <class 'ValueError'> Variable 'static_fundamental_type_nodes' not found.:
) at ../shotwell-0.30.4/src/VideoSupport.vala:136
#11 0x000055555569e872 in prepared_file_import_job_real_execute (base=<optimized out>) at ../shotwell-0.30.4/src/BatchImport.vala:2005
#12 0x0000555555822080 in workers_thread_start (ignored=<optimized out>, self=Python Exception <class 'ValueError'> Variable 'static_fundamental_type_nodes' not found.:
) at ../shotwell-0.30.4/src/threads/Workers.vala:96
#13 0x0000555555822080 in _workers_thread_start_gfunc (data=<optimized out>, self=0x555557429520) at ../shotwell-0.30.4/src/threads/Workers.vala:31
#14 0x00007ffff7aa9df6 in () at /usr/lib/libglib-2.0.so.0
#15 0x00007ffff7ab0f21 in () at /usr/lib/libglib-2.0.so.0
#16 0x00007ffff645b57f in start_thread () at /usr/lib/libpthread.so.0
#17 0x00007ffff7eb50e3 in clone () at /usr/lib/libc.so.6
Thread 58 (Thread 0x7fff85ffb700 (LWP 21515)):
#0 0x00007ffff6a462c2 in gst_mini_object_ref (mini_object=mini_object@entry=0x0) at ../gstreamer/gst/gstminiobject.c:462
#1 0x00007ffff5329fd9 in gst_caps_ref (caps=0x0) at /usr/include/gstreamer-1.0/gst/gstcaps.h:210
#2 0x00007ffff5329fd9 in gst_audio_decoder_negotiate_default (dec=0x7fff9c1d4980) at ../gst-plugins-base/gst-libs/gst/audio/gstaudiodecoder.c:642
#3 0x00007ffff5331109 in gst_audio_decoder_negotiate_unlocked (dec=0x7fff9c1d4980) at ../gst-plugins-base/gst-libs/gst/audio/gstaudiodecoder.c:727
#4 0x00007ffff5331109 in gst_audio_decoder_handle_gap (dec=dec@entry=0x7fff9c1d4980, event=0x7fff9c042e00) at ../gst-plugins-base/gst-libs/gst/audio/gstaudiodecoder.c:2235
#5 0x00007ffff53331fc in gst_audio_decoder_sink_eventfunc (dec=0x7fff9c1d4980, event=0x7fff9c042e00) at ../gst-plugins-base/gst-libs/gst/audio/gstaudiodecoder.c:2385
#6 0x00007ffff6a3cda5 in gst_pad_send_event_unchecked (pad=pad@entry=0x7fff900213b0, event=event@entry=0x7fff9c042e00, type=<optimized out>, type@entry=GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) at ../gstreamer/gst/gstpad.c:5765
#7 0x00007ffff6a3d478 in gst_pad_push_event_unchecked (pad=pad@entry=0x7fff902102c0, event=event@entry=0x7fff9c042e00, type=<optimized out>, type@entry=GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) at ../gstreamer/gst/gstpad.c:5410
#8 0x00007ffff6a3ddde in gst_pad_push_event (pad=0x7fff902102c0, event=event@entry=0x7fff9c042e00) at ../gstreamer/gst/gstpad.c:5547
#9 0x00007ffff52a4f70 in gst_base_parse_sink_event_default (parse=0x7fff9c1d3420, event=0x7fff9c042e00) at ../gstreamer/libs/gst/base/gstbaseparse.c:1508
#10 0x00007ffff6a3cda5 in gst_pad_send_event_unchecked (pad=pad@entry=0x7fff90211790, event=event@entry=0x7fff9c042e00, type=<optimized out>, type@entry=GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) at ../gstreamer/gst/gstpad.c:5765
#11 0x00007ffff6a3d478 in gst_pad_push_event_unchecked (pad=pad@entry=0x555556cf0c10, event=event@entry=0x7fff9c042e00, type=<optimized out>, type@entry=GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) at ../gstreamer/gst/gstpad.c:5410
#12 0x00007ffff6a3ddde in gst_pad_push_event (pad=0x555556cf0c10, event=event@entry=0x7fff9c042e00) at ../gstreamer/gst/gstpad.c:5547
#13 0x00007fffcc97f790 in gst_single_queue_push_one (allow_drop=<synthetic pointer>, object=0x7fff9c042e00, sq=0x7fff9c052800, mq=0x7fff90004da0) at ../gstreamer/plugins/elements/gstmultiqueue.c:1688
#14 0x00007fffcc97f790 in gst_multi_queue_loop (pad=<optimized out>) at ../gstreamer/plugins/elements/gstmultiqueue.c:1959
#15 0x00007ffff6a1a409 in gst_task_func (task=0x7fff9c034830) at ../gstreamer/gst/gsttask.c:328
#16 0x00007ffff7aa9df6 in () at /usr/lib/libglib-2.0.so.0
#17 0x00007ffff7ab0f21 in () at /usr/lib/libglib-2.0.so.0
#18 0x00007ffff645b57f in start_thread () at /usr/lib/libpthread.so.0
#19 0x00007ffff7eb50e3 in clone () at /usr/lib/libc.so.6
dec->priv->ctx.caps
is NULL, so I'm guessing that wasn't setup properly? It could also be a problem with Shotwell, but it's difficult for me to tell because I don't know how it works.
Threads:
(gdb) info threads
Id Target Id Frame
1 Thread 0x7ffff40f2a40 (LWP 17868) "shotwell" 0x00007ffff7eaa667 in poll () from /usr/lib/libc.so.6
2 Thread 0x7ffff40ad700 (LWP 17872) "gmain" 0x00007ffff7eaa667 in poll () from /usr/lib/libc.so.6
3 Thread 0x7ffff38ac700 (LWP 17873) "gdbus" 0x00007ffff7eaa667 in poll () from /usr/lib/libc.so.6
4 Thread 0x7ffff2650700 (LWP 17874) "dconf worker" 0x00007ffff7eaa667 in poll () from /usr/lib/libc.so.6
5 Thread 0x7fffddabb700 (LWP 17875) "pool-shotwell" 0x00007ffff7eafe3d in syscall () from /usr/lib/libc.so.6
6 Thread 0x7fffdd2ba700 (LWP 17876) "pool-shotwell" 0x00007ffff7eafe3d in syscall () from /usr/lib/libc.so.6
7 Thread 0x7fffdcab9700 (LWP 17877) "pool-shotwell" 0x00007ffff7eafe3d in syscall () from /usr/lib/libc.so.6
8 Thread 0x7fffcffff700 (LWP 17878) "pool-shotwell" 0x00007ffff7eafe3d in syscall () from /usr/lib/libc.so.6
9 Thread 0x7fffcf7fe700 (LWP 17879) "pool-shotwell" 0x00007ffff7eafe3d in syscall () from /usr/lib/libc.so.6
10 Thread 0x7fffceffd700 (LWP 17880) "pool-shotwell" 0x00007ffff7eafe3d in syscall () from /usr/lib/libc.so.6
11 Thread 0x7fffce7fc700 (LWP 17881) "pool-shotwell" 0x00007ffff7eafe3d in syscall () from /usr/lib/libc.so.6
12 Thread 0x7fffcdffb700 (LWP 17882) "pool-shotwell" 0x00007ffff7eafe3d in syscall () from /usr/lib/libc.so.6
22 Thread 0x7fffb57fa700 (LWP 17907) "pool-shotwell" 0x00007ffff7eaa667 in poll () from /usr/lib/libc.so.6
34 Thread 0x7fff73405700 (LWP 17919) "typefind:sink" 0x00007ffff7eafe3d in syscall () from /usr/lib/libc.so.6
36 Thread 0x7fffb4ff9700 (LWP 17936) "pool-shotwell" 0x00007ffff7eaa756 in ppoll () from /usr/lib/libc.so.6
37 Thread 0x7fff97fff700 (LWP 17954) "qtdemux1:sink" 0x00007ffff7eafe3d in syscall () from /usr/lib/libc.so.6
38 Thread 0x7fff977fe700 (LWP 17955) "multiqueue1:src" 0x00007ffff7eafe3d in syscall () from /usr/lib/libc.so.6
39 Thread 0x7fffb67fc700 (LWP 17956) "qtdemux1:sink" 0x00007ffff6461415 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
40 Thread 0x7fffb7aff700 (LWP 17957) "qtdemux1:sink" 0x00007ffff6461415 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
41 Thread 0x7fffb72fe700 (LWP 17958) "qtdemux1:sink" 0x00007ffff6461415 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
42 Thread 0x7fffb5ffb700 (LWP 17959) "qtdemux1:sink" 0x00007ffff6461415 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
43 Thread 0x7fff8e1c1700 (LWP 17960) "qtdemux1:sink" 0x00007ffff6461415 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
44 Thread 0x7fff8d9c0700 (LWP 17961) "qtdemux1:sink" 0x00007ffff6461415 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
45 Thread 0x7fff8d1bf700 (LWP 17962) "qtdemux1:sink" 0x00007ffff6461415 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
46 Thread 0x7fff8c9be700 (LWP 17963) "qtdemux1:sink" 0x00007ffff6461415 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
* 47 Thread 0x7fff87fff700 (LWP 17964) "multiqueue1:src" 0x00007ffff6a462c2 in gst_mini_object_ref (mini_object=mini_object@entry=0x0) at ../gstreamer/gst/gstminiobject.c:462