GNOME Bugzilla – Bug 743386
gst_omx_audio_dec_flush() causes a hang issue
Last modified: 2018-11-03 13:00:30 UTC
Simply I found that the newly added 'gst_pad_stop_task()' in gst_omx_audio_dec_flush() causes a hang issue when the this function is called seamlessly 10~20 times. Once I remove the 'gst_pad_stop_task()', the hang issue isn't produced even with 100 consecutive flush(). Is it ok that I use this flush() function removed 'gst_pad_stop_task()' while I don't edit any other code in the latest gstreamer package?
Can you provide a backtrace of all threads when this hang happens? And also a GStreamer debug log with GST_DEBUG=omx*:6?
Created attachment 295496 [details] aacdec hang issue
Hi slomo, I attached a log file. It contains several successful seeking finishing with the hang issue.
Since this gstreamer doesn't run alone, I need to find a way to debug it running inside of other process. If you need the backtrace, please let me know.
Should the new call to stop_task in _flush being called only if it is a hard flush ? (https://cgit.freedesktop.org/gstreamer/gst-omx/commit/?id=19d77004d2f5bd2ef76a7262c7a26cdaacc5c018)
Created attachment 352264 [details] only_gst_omx_logs.txt Can reproduce the hang with Bellagio's mp3 software decoder.
Created attachment 352265 [details] deadlock.txt backtrace for the hang.
To reproduce the hang, just run: GST_OMX_CONFIG_DIR=$HOME/gst/master/gst-omx/config/bellagio/ gst-launch-1.0 filesrc location=mpthreetest.mp3 ! id3demux ! mpegaudioparse ! omxmp3dec ! audioconvert ! goom ! navseek seek-offset=1 ! ximagesink and keep pressing hard the left or right arrow. No hang if revert https://cgit.freedesktop.org/gstreamer/gst-omx/commit/?id=19d77004d2f5bd2ef76a7262c7a26cdaacc5c018 . It hangs on the (last) gst_omx_component_get_state that this commit above added. (also note that hack "drain-may-not-return" does not help)
Could it be related to bug #784972 ?
(In reply to Guillaume Desmottes from comment #9) > Could it be related to bug #784972 ? It's not. This lock is in decoders while bug #784972 is encoders.
Yup and it has it since its initial commit https://cgit.freedesktop.org/gstreamer/gst-omx/commit/omx/gstomxaudiodec.c?id=0c3b3ef3d091fdd67a16c0dc2dcddb5f564ee3e4
Could be the same problem as the one I fixed in the video decoder, see #796207
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-omx/issues/6.