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 766703 - glvideomixer: Using an invalid, already destroyed context
glvideomixer: Using an invalid, already destroyed context
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal blocker
: 1.9.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-05-20 09:15 UTC by Sebastian Dröge (slomo)
Modified: 2016-05-25 08:31 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastian Dröge (slomo) 2016-05-20 09:15:00 UTC
GST_VALIDATE_SCENARIOS_PATH=/home/slomo/Projects/gstreamer/head/gst-devtools/validate/data/scenarios: GST_GL_XINITTHREADS=1 DISPLAY=:0 GST_VALIDATE_SCENARIO=play_15s /home/slomo/Projects/gstreamer/head/gst-devtools/validate/tools/gst-validate-1.0-debug  glvideomixer sink_1::alpha=0.5 sink_1::xpos=50 sink_1::ypos=50 name=_mixer !  deinterlace ! videoconvert ! 'fakesink' videotestsrc pattern=snow timestamp-offset=3000000000 ! 'video/x-raw,format=AYUV,width=640,height=480,framerate=(fraction)30/1' !  timeoverlay ! _mixer. videotestsrc pattern=smpte ! 'video/x-raw,format=AYUV,width=800,height=600,framerate=(fraction)10/1' ! timeoverlay ! _mixer.

This fails with assertions every now and then:
0:00:00.405870420 22018 0x7fffdc004000 ERROR               validate gst-validate-reporter.c:176:gst_validate_report_valist: <pipeline0> 2272 (critical) : g-log: We got a g_log critical issue : g_object_ref: assertion 'object->ref_count > 0' failed

  • #6 gst_gl_buffer_pool_new
    at gstglbufferpool.c line 300
  • #0 g_logv
    at /build/glib2.0-wnDt2X/glib2.0-2.48.1/./glib/gmessages.c line 325
  • #1 g_logv
    at /build/glib2.0-wnDt2X/glib2.0-2.48.1/./glib/gmessages.c line 1080
  • #2 g_log
    at /build/glib2.0-wnDt2X/glib2.0-2.48.1/./glib/gmessages.c line 1119
  • #3 g_return_if_fail_warning
    at /build/glib2.0-wnDt2X/glib2.0-2.48.1/./glib/gmessages.c line 1134
  • #4 g_object_ref
    at /build/glib2.0-wnDt2X/glib2.0-2.48.1/./gobject/gobject.c line 3050
  • #5 gst_object_ref
    at gstobject.c line 256
  • #6 gst_gl_buffer_pool_new
    at gstglbufferpool.c line 300
  • #7 gst_gl_mixer_propose_allocation
    at gstglmixer.c line 157
  • #8 gst_gl_video_mixer_propose_allocation
    at gstglvideomixer.c line 940
  • #9 gst_gl_base_mixer_sink_query
    at gstglbasemixer.c line 287
  • #10 gst_gl_mixer_sink_query
    at gstglmixer.c line 300
  • #11 gst_validate_pad_monitor_query_func
    at gst-validate-pad-monitor.c line 2198
  • #12 gst_pad_query
    at gstpad.c line 3940
  • #13 gst_pad_peer_query
    at gstpad.c line 4072
  • #14 gst_base_transform_setcaps
    at gstbasetransform.c line 1003
  • #15 gst_base_transform_setcaps
    at gstbasetransform.c line 1392
  • #16 gst_base_transform_sink_eventfunc
    at gstbasetransform.c line 1939
  • #17 gst_validate_pad_monitor_downstream_event_check
    at gst-validate-pad-monitor.c line 1830
  • #18 gst_validate_pad_monitor_sink_event_full_func
    at gst-validate-pad-monitor.c line 2154
  • #19 gst_validate_pad_monitor_sink_event_func
    at gst-validate-pad-monitor.c line 2167
  • #20 gst_pad_send_event_unchecked
    at gstpad.c line 5594
  • #21 gst_pad_push_event_unchecked
    at gstpad.c line 5252
  • #22 push_sticky
    at gstpad.c line 3797
  • #23 events_foreach
    at gstpad.c line 603
  • #24 gst_pad_push_event
    at gstpad.c line 3854
  • #25 gst_pad_push_event
    at gstpad.c line 5383
  • #26 gst_base_transform_setcaps
    at ../../../gst/gstcompat.h line 58
  • #27 gst_base_transform_setcaps
    at gstbasetransform.c line 1387
  • #28 gst_base_transform_sink_eventfunc
    at gstbasetransform.c line 1939
  • #29 gst_validate_pad_monitor_downstream_event_check
    at gst-validate-pad-monitor.c line 1830
  • #30 gst_validate_pad_monitor_sink_event_full_func
    at gst-validate-pad-monitor.c line 2154
  • #31 gst_validate_pad_monitor_sink_event_func
    at gst-validate-pad-monitor.c line 2167
  • #32 gst_pad_send_event_unchecked
    at gstpad.c line 5594
  • #33 gst_pad_push_event_unchecked
    at gstpad.c line 5252
  • #34 push_sticky
    at gstpad.c line 3797
  • #35 events_foreach
    at gstpad.c line 603
  • #36 gst_pad_push_event
    at gstpad.c line 3854
  • #37 gst_pad_push_event
    at gstpad.c line 5383
  • #38 event_forward_func
    at gstpad.c line 2984
  • #39 gst_pad_forward
    at gstpad.c line 2938
  • #40 gst_pad_event_default
    at gstpad.c line 3035
  • #41 gst_pad_send_event_unchecked
    at gstpad.c line 5594
  • #42 gst_pad_push_event_unchecked
    at gstpad.c line 5252
  • #43 push_sticky
    at gstpad.c line 3797
  • #44 events_foreach
    at gstpad.c line 603
  • #45 gst_pad_push_event
    at gstpad.c line 3854
  • #46 gst_pad_push_event
    at gstpad.c line 5383
  • #47 gst_base_text_overlay_negotiate
    at /home/slomo/Projects/gstreamer/head/gstreamer/gst/gstcompat.h line 58
  • #48 gst_base_text_overlay_negotiate
    at gstbasetextoverlay.c line 913
  • #49 gst_base_text_overlay_video_event
    at gstbasetextoverlay.c line 969
  • #50 gst_base_text_overlay_video_event
    at gstbasetextoverlay.c line 2415
  • #51 gst_validate_pad_monitor_downstream_event_check
    at gst-validate-pad-monitor.c line 1830
  • #52 gst_validate_pad_monitor_sink_event_full_func
    at gst-validate-pad-monitor.c line 2154
  • #53 gst_validate_pad_monitor_sink_event_func
    at gst-validate-pad-monitor.c line 2167
  • #54 gst_pad_send_event_unchecked
    at gstpad.c line 5594
  • #55 gst_pad_push_event_unchecked
    at gstpad.c line 5252
  • #56 push_sticky
    at gstpad.c line 3797
  • #57 events_foreach
    at gstpad.c line 603
  • #58 gst_pad_push_event
    at gstpad.c line 3854
  • #59 gst_pad_push_event
    at gstpad.c line 5383
  • #60 gst_base_transform_setcaps
    at ../../../gst/gstcompat.h line 58
  • #61 gst_base_transform_setcaps
    at gstbasetransform.c line 1387
  • #62 gst_base_transform_sink_eventfunc
    at gstbasetransform.c line 1939
  • #63 gst_capsfilter_sink_event
    at gstcapsfilter.c line 521
  • #64 gst_validate_pad_monitor_downstream_event_check
    at gst-validate-pad-monitor.c line 1830
  • #65 gst_validate_pad_monitor_sink_event_full_func
    at gst-validate-pad-monitor.c line 2154
  • #66 gst_validate_pad_monitor_sink_event_func
    at gst-validate-pad-monitor.c line 2167
  • #67 gst_pad_send_event_unchecked
    at gstpad.c line 5594
  • #68 gst_pad_push_event_unchecked
    at gstpad.c line 5252
  • #69 push_sticky
    at gstpad.c line 3797
  • #70 events_foreach
    at gstpad.c line 603
  • #71 gst_pad_push_event
    at gstpad.c line 3854
  • #72 gst_pad_push_event
    at gstpad.c line 5383
  • #73 gst_base_src_set_caps
    at gstbasesrc.c line 924
  • #74 gst_base_src_default_negotiate
    at gstbasesrc.c line 3231
  • #75 gst_base_src_loop
    at gstbasesrc.c line 3271
  • #76 gst_base_src_loop
    at gstbasesrc.c line 2697
  • #77 gst_task_func
    at gsttask.c line 332
  • #78 g_thread_pool_thread_proxy
    at /build/glib2.0-wnDt2X/glib2.0-2.48.1/./glib/gthreadpool.c line 307
  • #79 g_thread_proxy
    at /build/glib2.0-wnDt2X/glib2.0-2.48.1/./glib/gthread.c line 780
  • #80 start_thread
    at pthread_create.c line 334
  • #81 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 109

Comment 1 Sebastian Dröge (slomo) 2016-05-21 07:03:32 UTC
The only GL element here is glvideomixer, and nowhere in it I see any suspicious unreffing of the context. It might be inside libgstgl somewhere.
Comment 2 Matthew Waters (ystreet00) 2016-05-25 08:31:22 UTC
commit 061a157ef57df81dd1e87ae7a78cdcf94fd42be0
Author: Matthew Waters <matthew@centricular.com>
Date:   Tue May 24 23:39:27 2016 +1000

    glvideomixer: fix race retrieving the GL context from the display
    
    _get_gl_context() can be called concurrently from either propose_allocation() or
    decide_allocation().  If it so happens that this happens at the same time,
    the check for whether we already had a GL context was outside the lock.  Inside
    the lock and loop, the first thing that happens is that we unref the current GL
    context (if valid) as if there was a conflict adding it to the display.  If the
    timing was unlucky, subsequent use of the GL context would be referencing an
    already unreffed GL context object resulting in a critical:
    
    g_object_ref: assertion 'object->ref_count > 0' failed
    
    https://bugzilla.gnome.org/show_bug.cgi?id=766703