GNOME Bugzilla – Bug 733013
opus: Fix a double-unref in the Opus header code
Last modified: 2014-07-11 07:06:21 UTC
Patch attached. Found with the following pipeline: gst-launch-1.0 -v matroskamux name=mux ! filesink location=out.mkv \ filesrc location=dest.opus ! queue ! oggdemux ! opusparse ! mux.audio_0 \ filesrc location=dest.webm ! queue ! matroskademux ! mux.video_0 where dest.[opus|webm] are ogg/opus and vp8/mkv files. Backtrace coming up.
Created attachment 280415 [details] [review] opus: Fix a double-unref in the Opus header code The headers were never getting reffed when being added to the headers list, which is later unreffed-and-freed by the caller (e.g. gst_opus_parse_parse_frame()).
$ G_DEBUG=fatal-warnings gdb --args gst-launch-1.0 -v matroskamux name=mux ! filesink location=out.mkv filesrc location=dest.opus ! queue ! oggdemux ! opusparse ! mux.audio_0 filesrc location=dest.webm ! queue ! matroskademux ! mux.video_0 GNU gdb (GDB) Fedora 7.6.1-46.fc19 Copyright (C) 2013 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-redhat-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /opt/gnome3/build/bin/gst-launch-1.0...done. (gdb) r Starting program: /opt/gnome3/build/bin/gst-launch-1.0 -v matroskamux name=mux \! filesink location=out.mkv filesrc location=dest.opus \! queue \! oggdemux \! opusparse \! mux.audio_0 filesrc location=dest.webm \! queue \! matroskademux \! mux.video_0 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Setting pipeline to PAUSED ... [New Thread 0x7fffef70e700 (LWP 24730)] [New Thread 0x7fffeef0d700 (LWP 24731)] [New Thread 0x7fffee70c700 (LWP 24732)] [New Thread 0x7fffedf0b700 (LWP 24733)] Pipeline is PREROLLING ... [New Thread 0x7fffed70a700 (LWP 24734)] [New Thread 0x7fffecf09700 (LWP 24735)] /GstPipeline:pipeline0/GstOpusParse:opusparse0.GstPad:sink: caps = "audio/x-opus\,\ streamheader\=\(buffer\)\<\ 4f707573486561640102000080bb0000000000\,\ 4f70757354616773150000004a616e757320706f73742d70726f63657373696e6700000000\ \>" /GstPipeline:pipeline0/GstOpusParse:opusparse0.GstPad:src: caps = "audio/x-opus\,\ multistream\=\(boolean\)false\,\ streamheader\=\(buffer\)\<\ 4f707573486561640102000080bb0000000000\,\ 4f70757354616773150000004a616e757320706f73742d70726f63657373696e6700000000\ \>" /GstPipeline:pipeline0/GstOpusParse:opusparse0.GstPad:src: caps = "audio/x-opus\,\ multistream\=\(boolean\)false\,\ streamheader\=\(buffer\)\<\ 4f707573486561640102000080bb0000000000\,\ 4f70757354616773150000004a616e757320706f73742d70726f63657373696e6700000000\ \>" /GstPipeline:pipeline0/GstMatroskaMux:mux.GstMatroskamuxPad:audio_0: caps = "audio/x-opus\,\ multistream\=\(boolean\)false\,\ streamheader\=\(buffer\)\<\ 4f707573486561640102000080bb0000000000\,\ 4f70757354616773150000004a616e757320706f73742d70726f63657373696e6700000000\ \>" /GstPipeline:pipeline0/GstMatroskaMux:mux.GstPad:src: caps = video/x-matroska /GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/x-matroska Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstSystemClock /GstPipeline:pipeline0/GstMatroskaMux:mux.GstPad:src: caps = "video/x-matroska\,\ streamheader\=\(buffer\)\<\ 1a45dfa301000000000000144282896d6174726f736b610042878102428581021853806701ffffffffffffff114d9b74010000000000008c4dbb010000000000001253ab841549a96653ac88ffffffffffffffff4dbb010000000000001253ab841654ae6b53ac88ffffffffffffffff4dbb010000000000001253ab841043a77053ac88ffffffffffffffff4dbb010000000000001253ab841c53bb6b53ac88ffffffffffffffff4dbb010000000000001253ab841254c36753ac88ffffffffffffffff1549a966010000000000006f73a490b5019ed2ed348765a404f6f9a08d43442ad7b1830f42404489884113ca38000000004d80a04753747265616d657220706c7567696e2076657273696f6e20312e332e3930005741994753747265616d6572204d6174726f736b61206d757865720044618805ebeddffd4fd0001654ae6b010000000000007eae0100000000000039d7810183810273c5884ef526a21b84c38a536e86417564696f00e1010000000000000db58800000000000000009f81008687415f4f50555300ae0100000000000033d7810283810173c588e377d36e060bd11f536e86566964656f00e00100000000000008b0820280ba8201e08686565f56503800\ \>" /GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = "video/x-matroska\,\ streamheader\=\(buffer\)\<\ 1a45dfa301000000000000144282896d6174726f736b610042878102428581021853806701ffffffffffffff114d9b74010000000000008c4dbb010000000000001253ab841549a96653ac88ffffffffffffffff4dbb010000000000001253ab841654ae6b53ac88ffffffffffffffff4dbb010000000000001253ab841043a77053ac88ffffffffffffffff4dbb010000000000001253ab841c53bb6b53ac88ffffffffffffffff4dbb010000000000001253ab841254c36753ac88ffffffffffffffff1549a966010000000000006f73a490b5019ed2ed348765a404f6f9a08d43442ad7b1830f42404489884113ca38000000004d80a04753747265616d657220706c7567696e2076657273696f6e20312e332e3930005741994753747265616d6572204d6174726f736b61206d757865720044618805ebeddffd4fd0001654ae6b010000000000007eae0100000000000039d7810183810273c5884ef526a21b84c38a536e86417564696f00e1010000000000000db58800000000000000009f81008687415f4f50555300ae0100000000000033d7810283810173c588e377d36e060bd11f536e86566964656f00e00100000000000008b0820280ba8201e08686565f56503800\ \>" Got EOS from element "pipeline0". Execution ended after 0:00:12.680115685 Setting pipeline to PAUSED ... Setting pipeline to READY ... (gst-launch-1.0:24726): GStreamer-CRITICAL **: gst_mini_object_unref: assertion 'mini_object->refcount > 0' failed Program received signal SIGTRAP, Trace/breakpoint trap. 0x00007ffff754ae06 in _g_log_abort (breakpoint=1) at gmessages.c:308 warning: Source file is more recent than executable. 308 * abort()ing, to avoid triggering any system crash-reporting Missing separate debuginfos, use: debuginfo-install bzip2-libs-1.0.6-8.fc19.x86_64 libffi-3.0.13-4.fc19.x86_64 libgcc-4.8.2-7.fc19.x86_64 libogg-1.3.0-5.fc19.x86_64 opus-1.1-1.fc19.x86_64 zlib-1.2.7-10.fc19.x86_64 (gdb) bt
+ Trace 233803
Thread 1 (Thread 0x7ffff74ea740 (LWP 24726))
A debugging session is active. Inferior 1 [process 24726] will be killed. Quit anyway? (y or n) y
commit c57500a7f459555c5426d30d31b1ed3dfd0f1d87 Author: Philip Withnall <philip.withnall@collabora.co.uk> Date: Thu Jul 10 15:52:46 2014 +0100 opus: Fix a double-unref in the Opus header code The headers were never getting reffed when being added to the headers list, which is later unreffed-and-freed by the caller (e.g. gst_opus_parse_parse_frame()). https://bugzilla.gnome.org/show_bug.cgi?id=733013