After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 733013 - opus: Fix a double-unref in the Opus header code
opus: Fix a double-unref in the Opus header code
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
unspecified
Other All
: Normal normal
: 1.3.91
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-07-10 14:55 UTC by Philip Withnall
Modified: 2014-07-11 07:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
opus: Fix a double-unref in the Opus header code (1.45 KB, patch)
2014-07-10 14:55 UTC, Philip Withnall
committed Details | Review

Description Philip Withnall 2014-07-10 14:55:23 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.
Comment 1 Philip Withnall 2014-07-10 14:55:25 UTC
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()).
Comment 2 Philip Withnall 2014-07-10 14:55:52 UTC
$ 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

Thread 1 (Thread 0x7ffff74ea740 (LWP 24726))

  • #0 _g_log_abort
    at gmessages.c line 308
  • #1 g_logv
    at gmessages.c line 1033
  • #2 g_log
    at gmessages.c line 1071
  • #3 g_return_if_fail_warning
    at gmessages.c line 1080
  • #4 gst_mini_object_unref
    at gstminiobject.c line 440
  • #5 gst_buffer_unref
    at /opt/gnome3/build/include/gstreamer-1.0/gst/gstbuffer.h line 360
  • #6 g_slist_foreach
    at gslist.c line 877
  • #7 gst_opus_parse_stop
    at gstopusparse.c line 122
  • #8 gst_base_parse_activate
    at gstbaseparse.c line 3340
  • #9 gst_base_parse_sink_activate_mode
    at gstbaseparse.c line 3360
  • #10 gst_pad_activate_mode
    at gstpad.c line 1147
  • #11 gst_pad_set_active
    at gstpad.c line 1031
  • #12 activate_pads
    at gstelement.c line 2686
  • #13 gst_iterator_fold
    at gstiterator.c line 612
  • #14 iterator_activate_fold_with_resync
    at gstelement.c line 2706
  • #15 gst_element_pads_activate
    at gstelement.c line 2750
  • #16 gst_element_change_state_func
    at gstelement.c line 2814
  • #17 gst_base_parse_change_state
    at gstbaseparse.c line 4491
  • #18 gst_element_change_state
    at gstelement.c line 2601
  • #19 gst_element_set_state_func
    at gstelement.c line 2557
  • #20 gst_element_set_state
    at gstelement.c line 2458
  • #21 gst_bin_element_set_state
    at gstbin.c line 2328
  • #22 gst_bin_change_state_func
    at gstbin.c line 2665
  • #23 gst_pipeline_change_state
    at gstpipeline.c line 469
  • #24 gst_element_change_state
    at gstelement.c line 2601
  • #25 gst_element_set_state_func
    at gstelement.c line 2557
  • #26 gst_element_set_state
    at gstelement.c line 2458
  • #27 main
    at gst-launch.c line 1147
A debugging session is active.

	Inferior 1 [process 24726] will be killed.

Quit anyway? (y or n) y
Comment 3 Sebastian Dröge (slomo) 2014-07-11 07:06:19 UTC
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