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 795981 - playbin3: Segfault when adaptivedemux usecase
playbin3: Segfault when adaptivedemux usecase
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal blocker
: 1.14.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-05-09 16:18 UTC by Seungha Yang
Modified: 2018-05-10 07:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
urisourcebin: Do not modify structure of EOS event (2.85 KB, patch)
2018-05-09 16:37 UTC, Seungha Yang
committed Details | Review
decodebin3: Do not modify structure of EOS event (4.90 KB, patch)
2018-05-09 16:56 UTC, Seungha Yang
committed Details | Review
error log (250.58 KB, text/x-log)
2018-05-10 06:29 UTC, Seungha Yang
  Details

Description Seungha Yang 2018-05-09 16:18:19 UTC
When adaptviedemux is used with playbin3, segfault is reported randomly.
With valgrind, I guess custom-eos handling in urisourcebin might cause issue (not sure).

Can reproduce with this command
USE_PLAYBIN3=1 G_SLICE=always-malloc valgrind --tool=memcheck --leak-check=full --trace-children=yes --show-possibly-lost=no --leak-resolution=high gst-play-1.0 http://vm2.dashif.org/livesim-dev/testpic2_2s/Manifest.mpd
Comment 1 Seungha Yang 2018-05-09 16:37:43 UTC
Created attachment 371862 [details] [review]
urisourcebin: Do not modify structure of EOS event

This patch can fix the issue, but still not sure the root cause.
Comment 2 Seungha Yang 2018-05-09 16:56:31 UTC
Created attachment 371863 [details] [review]
decodebin3: Do not modify structure of EOS event
Comment 3 Edward Hervey 2018-05-10 05:28:52 UTC
Do you have a log/backtrace of the failure ?
Comment 4 Edward Hervey 2018-05-10 05:41:14 UTC
I have no objection to using qdata for this btw.
Comment 5 Seungha Yang 2018-05-10 06:29:26 UTC
Created attachment 371877 [details]
error log

command:
GST_DEBUG_NO_COLOR=1 GST_DEBUG_FILE=gst.log GST_DEBUG=urisourcebin:6,decodebin3:6,adaptivedemux:6 USE_PLAYBIN3=1 gst-play-1.0 http://vm2.dashif.org/livesim-dev/testpic2_2s/Manifest.mpd
Error seems to observed with 'q' (meaning exit), since custom-eos events are broken.

Also, although there might no fault,  this error message is shown always
(gst-play-1.0:19229): GStreamer-CRITICAL **: _gst_event_free: assertion 'GST_IS_EVENT (event)' failed
or
(gst-play-1.0:19125): GStreamer-CRITICAL **: gst_mini_object_unref: assertion 'GST_MINI_OBJECT_REFCOUNT_VALUE (mini_object) > 0' failed
Comment 6 Edward Hervey 2018-05-10 06:50:03 UTC
Confirmed here also. For some reason I'm seeing an eos event appear in the log ... without a constructor
Comment 7 Edward Hervey 2018-05-10 07:06:59 UTC
This is definitely an issue in the probe handlers. The contents of the pad probe data *can* be replaced but can only be unreferenced (which happens when doing gst_event_make_writable()) if we return GST_PAD_PROBE_HANDLED.

So either we use qdata, or we don't remove the reference (and instead blindly copy it).

Marking this as a blocker, the issue is also in 1.14.
Comment 8 Edward Hervey 2018-05-10 07:16:47 UTC
commit 3678866474f54fa36e4e9e9168a493737899d15f (HEAD -> master, origin/master, origin/HEAD)
Author: Seungha Yang <seungha.yang@navercorp.com>
Date:   Thu May 10 01:54:36 2018 +0900

    decodebin3: Do not modify structure of EOS event
    
    https://bugzilla.gnome.org/show_bug.cgi?id=795981

commit 4567fcc64c4fd96c4de010b2a82eca80320e2972
Author: Seungha Yang <seungha.yang@navercorp.com>
Date:   Thu May 10 01:33:55 2018 +0900

    urisourcebin: Do not modify structure of EOS event
    
    https://bugzilla.gnome.org/show_bug.cgi?id=795981