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 741900 - gl: xcb threading assertion after some time
gl: xcb threading assertion after some time
Status: RESOLVED NOTGNOME
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal major
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-12-23 11:35 UTC by Sebastian Dröge (slomo)
Modified: 2016-11-15 07:39 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastian Dröge (slomo) 2014-12-23 11:35:11 UTC
$ env GST_GL_XINITTHREADS=1 gst-launch-1.0 videotestsrc ! queue ! tee name=t   t. ! queue ! glvideomixer name=mixer sink_1::xpos=320 ! glimagesink   t. ! queue ! glimagesink    videotestsrc pattern=ball ! mixer.

Running this for a few minutes gives:

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Got context from element 'mixer': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayX11\)\ gldisplayx11-0";
Redistribute latency...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...
lt-gst-launch-1.0: ../../src/xcb_conn.c:186: write_vec: Assertion `!c->out.queue_len' failed.
fish: 'env GST_GL_XINITTHREADS=1 gst-l…' terminated by signal SIGABRT (Abort)



Thread 12 (Thread 0x7f484f7fe700 (LWP 17962))

  • #0 syscall
    at ../sysdeps/unix/sysv/linux/x86_64/syscall.S line 38
  • #1 g_cond_wait
    at /tmp/buildd/glib2.0-2.42.1/./glib/gthread-posix.c line 1396
  • #2 _chain
    at gstaggregator.c line 1663
  • #3 gst_pad_chain_data_unchecked
    at gstpad.c line 3830
  • #4 gst_pad_push_data
    at gstpad.c line 4063
  • #5 gst_queue_push_one
    at gstqueue.c line 1182
  • #6 gst_queue_loop
    at gstqueue.c line 1311
  • #7 gst_task_func
    at gsttask.c line 316
  • #8 g_thread_pool_thread_proxy
    at /tmp/buildd/glib2.0-2.42.1/./glib/gthreadpool.c line 307
  • #9 g_thread_proxy
    at /tmp/buildd/glib2.0-2.42.1/./glib/gthread.c line 764
  • #10 start_thread
    at pthread_create.c line 309
  • #11 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 111

Thread 11 (Thread 0x7f484ffff700 (LWP 17961))

  • #0 syscall
    at ../sysdeps/unix/sysv/linux/x86_64/syscall.S line 38
  • #1 g_cond_wait
    at /tmp/buildd/glib2.0-2.42.1/./glib/gthread-posix.c line 1396
  • #2 gst_gl_window_default_send_message
    at gstglwindow.c line 473
  • #3 gst_gl_window_x11_draw
    at gstglwindow_x11.c line 448
  • #4 gst_glimage_sink_redisplay
    at gstglimagesink.c line 1414
  • #5 gst_glimage_sink_show_frame
    at gstglimagesink.c line 944
  • #6 gst_base_sink_chain_unlocked
    at gstbasesink.c line 3439
  • #7 gst_base_sink_chain_main
    at gstbasesink.c line 3547
  • #8 gst_pad_chain_data_unchecked
    at gstpad.c line 3830
  • #9 gst_pad_push_data
    at gstpad.c line 4063
  • #10 gst_videoaggregator_aggregate
    at gstvideoaggregator.c line 1341
  • #11 aggregate_func
    at gstaggregator.c line 599
  • #12 gst_task_func
    at gsttask.c line 316
  • #13 g_thread_pool_thread_proxy
    at /tmp/buildd/glib2.0-2.42.1/./glib/gthreadpool.c line 307
  • #14 g_thread_proxy
    at /tmp/buildd/glib2.0-2.42.1/./glib/gthread.c line 764
  • #15 start_thread
    at pthread_create.c line 309
  • #16 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 111

Thread 10 (Thread 0x7f484effd700 (LWP 17963))

  • #0 syscall
    at ../sysdeps/unix/sysv/linux/x86_64/syscall.S line 38
  • #1 g_cond_wait
    at /tmp/buildd/glib2.0-2.42.1/./glib/gthread-posix.c line 1396
  • #2 gst_queue_chain
    at gstqueue.c line 1078
  • #3 gst_pad_chain_data_unchecked
    at gstpad.c line 3830
  • #4 gst_pad_push_data
    at gstpad.c line 4063
  • #5 gst_tee_do_push
    at gsttee.c line 591
  • #6 gst_tee_handle_data
    at gsttee.c line 663
  • #7 gst_tee_chain
    at gsttee.c line 735
  • #8 gst_pad_chain_data_unchecked
    at gstpad.c line 3830
  • #9 gst_pad_push_data
    at gstpad.c line 4063
  • #10 gst_queue_push_one
    at gstqueue.c line 1182
  • #11 gst_queue_loop
    at gstqueue.c line 1311
  • #12 gst_task_func
    at gsttask.c line 316
  • #13 g_thread_pool_thread_proxy
    at /tmp/buildd/glib2.0-2.42.1/./glib/gthreadpool.c line 307
  • #14 g_thread_proxy
    at /tmp/buildd/glib2.0-2.42.1/./glib/gthread.c line 764
  • #15 start_thread
    at pthread_create.c line 309
  • #16 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 111

Thread 9 (Thread 0x7f4854f21700 (LWP 17960))

  • #0 syscall
    at ../sysdeps/unix/sysv/linux/x86_64/syscall.S line 38
  • #1 g_cond_wait
    at /tmp/buildd/glib2.0-2.42.1/./glib/gthread-posix.c line 1396
  • #2 gst_gl_window_default_send_message
    at gstglwindow.c line 473
  • #3 gst_gl_window_x11_draw
    at gstglwindow_x11.c line 448
  • #4 gst_glimage_sink_redisplay
    at gstglimagesink.c line 1414
  • #5 gst_glimage_sink_show_frame
    at gstglimagesink.c line 944
  • #6 gst_base_sink_chain_unlocked
    at gstbasesink.c line 3439
  • #7 gst_base_sink_chain_main
    at gstbasesink.c line 3547
  • #8 gst_pad_chain_data_unchecked
    at gstpad.c line 3830
  • #9 gst_pad_push_data
    at gstpad.c line 4063
  • #10 gst_queue_push_one
    at gstqueue.c line 1182
  • #11 gst_queue_loop
    at gstqueue.c line 1311
  • #12 gst_task_func
    at gsttask.c line 316
  • #13 g_thread_pool_thread_proxy
    at /tmp/buildd/glib2.0-2.42.1/./glib/gthreadpool.c line 307
  • #14 g_thread_proxy
    at /tmp/buildd/glib2.0-2.42.1/./glib/gthread.c line 764
  • #15 start_thread
    at pthread_create.c line 309
  • #16 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 111

Thread 6 (Thread 0x7f484dffb700 (LWP 17965))

  • #0 syscall
    at ../sysdeps/unix/sysv/linux/x86_64/syscall.S line 38
  • #1 g_cond_wait
    at /tmp/buildd/glib2.0-2.42.1/./glib/gthread-posix.c line 1396
  • #2 gst_queue_chain
    at gstqueue.c line 1078
  • #3 gst_pad_chain_data_unchecked
    at gstpad.c line 3830
  • #4 gst_pad_push_data
    at gstpad.c line 4063
  • #5 gst_base_src_loop
    at gstbasesrc.c line 2845
  • #6 gst_task_func
    at gsttask.c line 316
  • #7 g_thread_pool_thread_proxy
    at /tmp/buildd/glib2.0-2.42.1/./glib/gthreadpool.c line 307
  • #8 g_thread_proxy
    at /tmp/buildd/glib2.0-2.42.1/./glib/gthread.c line 764
  • #9 start_thread
    at pthread_create.c line 309
  • #10 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 111

Thread 5 (Thread 0x7f484e7fc700 (LWP 17964))

  • #0 syscall
    at ../sysdeps/unix/sysv/linux/x86_64/syscall.S line 38
  • #1 g_cond_wait
    at /tmp/buildd/glib2.0-2.42.1/./glib/gthread-posix.c line 1396
  • #2 _chain
    at gstaggregator.c line 1663
  • #3 gst_pad_chain_data_unchecked
    at gstpad.c line 3830
  • #4 gst_pad_push_data
    at gstpad.c line 4063
  • #5 gst_base_src_loop
    at gstbasesrc.c line 2845
  • #6 gst_task_func
    at gsttask.c line 316
  • #7 g_thread_pool_thread_proxy
    at /tmp/buildd/glib2.0-2.42.1/./glib/gthreadpool.c line 307
  • #8 g_thread_proxy
    at /tmp/buildd/glib2.0-2.42.1/./glib/gthread.c line 764
  • #9 start_thread
    at pthread_create.c line 309
  • #10 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 111

Thread 2 (Thread 0x7f482e8cf700 (LWP 17970))

  • #0 __lll_lock_wait
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S line 135
  • #1 _L_lock_909
    from /lib/x86_64-linux-gnu/libpthread.so.0
  • #2 __GI___pthread_mutex_lock
    at ../nptl/pthread_mutex_lock.c line 79
  • #3 ??
    from /usr/lib/x86_64-linux-gnu/libX11.so.6
  • #4 XSync
    from /usr/lib/x86_64-linux-gnu/libX11.so.6
  • #5 ??
    from /usr/lib/x86_64-linux-gnu/libGL.so.1
  • #6 gst_gl_context_glx_swap_buffers
    at gstglcontext_glx.c line 381
  • #7 gst_gl_window_x11_draw_unlocked
    at gstglwindow_x11.c line 374
  • #8 draw_cb
    at gstglwindow_x11.c line 433
  • #9 _run_message_sync
    at gstglwindow.c line 447
  • #10 _run_message
    at gstglwindow_x11.c line 690
  • #11 g_main_dispatch
    at /tmp/buildd/glib2.0-2.42.1/./glib/gmain.c line 3111
  • #12 g_main_context_dispatch
    at /tmp/buildd/glib2.0-2.42.1/./glib/gmain.c line 3710
  • #13 g_main_context_iterate
    at /tmp/buildd/glib2.0-2.42.1/./glib/gmain.c line 3781
  • #14 g_main_loop_run
    at /tmp/buildd/glib2.0-2.42.1/./glib/gmain.c line 3975
  • #15 gst_gl_context_create_thread
    at gstglcontext.c line 1355
  • #16 g_thread_proxy
    at /tmp/buildd/glib2.0-2.42.1/./glib/gthread.c line 764
  • #17 start_thread
    at pthread_create.c line 309
  • #18 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 111

Thread 1 (Thread 0x7f482ffff700 (LWP 17968))

  • #0 __GI_raise
    at ../nptl/sysdeps/unix/sysv/linux/raise.c line 56
  • #1 __GI_abort
    at abort.c line 89
  • #2 __assert_fail_base
    at assert.c line 92
  • #3 __GI___assert_fail
    at assert.c line 101
  • #4 ??
    from /usr/lib/x86_64-linux-gnu/libxcb.so.1
  • #5 ??
    from /usr/lib/x86_64-linux-gnu/libxcb.so.1
  • #6 ??
    from /usr/lib/x86_64-linux-gnu/libxcb.so.1
  • #7 xcb_take_socket
    from /usr/lib/x86_64-linux-gnu/libxcb.so.1
  • #8 ??
    from /usr/lib/x86_64-linux-gnu/libX11.so.6
  • #9 _XFlush
    from /usr/lib/x86_64-linux-gnu/libX11.so.6
  • #10 _XGetRequest
    from /usr/lib/x86_64-linux-gnu/libX11.so.6
  • #11 XSync
    from /usr/lib/x86_64-linux-gnu/libX11.so.6
  • #12 ??
    from /usr/lib/x86_64-linux-gnu/libGL.so.1
  • #13 gst_gl_context_glx_swap_buffers
    at gstglcontext_glx.c line 381
  • #14 gst_gl_window_x11_draw_unlocked
    at gstglwindow_x11.c line 374
  • #15 draw_cb
    at gstglwindow_x11.c line 433
  • #16 _run_message_sync
    at gstglwindow.c line 447
  • #17 _run_message
    at gstglwindow_x11.c line 690
  • #18 g_main_dispatch
    at /tmp/buildd/glib2.0-2.42.1/./glib/gmain.c line 3111
  • #19 g_main_context_dispatch
    at /tmp/buildd/glib2.0-2.42.1/./glib/gmain.c line 3710
  • #20 g_main_context_iterate
    at /tmp/buildd/glib2.0-2.42.1/./glib/gmain.c line 3781
  • #21 g_main_loop_run
    at /tmp/buildd/glib2.0-2.42.1/./glib/gmain.c line 3975
  • #22 gst_gl_context_create_thread
    at gstglcontext.c line 1355
  • #23 g_thread_proxy
    at /tmp/buildd/glib2.0-2.42.1/./glib/gthread.c line 764
  • #24 start_thread
    at pthread_create.c line 309
  • #25 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 111

Comment 1 Matthew Waters (ystreet00) 2015-01-12 08:45:33 UTC
I cannot seem to be able to reproduce this.

It honestly looks like a bug in libxcb/libx11 or maybe mesa's glx code. What version of libxcb/libx11/mesa do you have.  If possible could you try the latest stable of each?

I have
libx11 - 1.6.2
libxcb - 1.11
mesa - 10.4.1
Comment 2 Sebastian Dröge (slomo) 2015-01-13 16:08:47 UTC
Still happens here

libX11 1.6.2
libxcb 1.10
mesa 10.3.2

It only happens if there are multiple glimagesinks, if I replace one of them with a xvimagesink it doesn't crash.
Comment 3 Sebastian Dröge (slomo) 2015-01-14 08:43:22 UTC
Happens with mesa 10.4.2 too
Comment 4 Vincent Penquerc'h 2015-04-07 14:03:57 UTC
This has been running fine for about 15 minutes now.

libX11-dev          1.4.99.1-0ubuntu2.2
libxcb1-dev         1.8.1-1ubuntu0.2
libgl1-mesa-glx     8.0.4-0ubuntu0.7
Comment 5 Vincent Penquerc'h 2015-04-07 14:26:23 UTC
Interestingly, I ^C it when I noticed it was still running in the background, and I got a SIGSEGV:

  • #0 nanosleep
    at ../sysdeps/unix/syscall-template.S line 82
  • #1 g_usleep
    at gtimer.c line 259
  • #2 fault_spin
    at gst-launch.c line 112
  • #3 fault_handler_sighandler
    at gst-launch.c line 93
  • #4 <signal handler called>
  • #5 ??
    from /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1
  • #6 ??
    from /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1
  • #7 XCloseDisplay
    from /usr/lib/x86_64-linux-gnu/libX11.so.6
  • #8 gst_gl_display_x11_finalize
    at gstgldisplay_x11.c line 62
  • #9 g_object_unref
    at gobject.c line 3112
  • #10 g_value_unset
    at gvalue.c line 272
  • #11 gst_structure_free
    at gststructure.c line 383
  • #12 _gst_context_free
    at gstcontext.c line 100
  • #13 g_list_foreach
    at glist.c line 993
  • #14 g_list_free_full
    at glist.c line 217
  • #15 gst_bin_dispose
    at gstbin.c line 533
  • #16 g_object_unref
    at gobject.c line 3075
  • #17 main
    at gst-launch.c line 1185
  • #8 gst_gl_display_x11_finalize
    at gstgldisplay_x11.c line 62
$1 = {parent = {object = {object = {g_type_instance = {g_class = 0x1356a50}, ref_count = 0, qdata = 0x2}, lock = {
        p = 0x1356b20, i = {20278048, 0}}, name = 0x1331890 "gldisplayx11-0", parent = 0x0, flags = 0, 
      control_bindings = 0x0, control_rate = 100000000, last_sync = 18446744073709551615, _gst_reserved = 0x0}, 
    type = GST_GL_DISPLAY_TYPE_X11, priv = 0x1336490}, name = 0x0, display = 0x135b000, foreign_display = 0}


diaplay_x11 seems to have lost its last ref by then.
Comment 6 Vincent Penquerc'h 2015-04-07 14:29:07 UTC
Actually, this is in _finalize, so it's normal to have 0 refcount here I think, ignore that last comment.
Comment 7 Vincent Penquerc'h 2015-04-07 15:14:47 UTC
Annoyingly, after rebuilding -bad, I don't see it anymore (and it was reliable).

Instead, the wide window's left side now usually shows a flickering version of the right side, where it was showing a moving ball before the rebuild. But not always, from time to time, both show the moving ball, but way less smoothly that before the rebuild :S
Comment 8 Matthew Waters (ystreet00) 2015-07-07 06:58:20 UTC
These days this craps out in the intel driver in dri with a swap buffers or invalidate buffers or a 'something' buffers.  mesa master also seems to fail with multiple drawables/surfaces to render into.
Comment 9 Vincent Penquerc'h 2016-04-01 13:29:45 UTC
It's behaving perfectly now. It's been running for 10 minutes, smoothly, with no artifacts nor asserts/crashes.
Comment 10 Vincent Penquerc'h 2016-07-08 14:13:50 UTC
Trying this now, I got a SIGSEGV once on ^C (no core to look at though), but that was a one off, I could not reproduce it again. No asserts.
Comment 11 Vincent Penquerc'h 2016-09-23 09:32:41 UTC
All fine, libxcb 1.11.1, libX11 1.6.3, mesa-libglapi 11.1.0, both waiting minutes and with ^C.
Comment 12 Matthew Waters (ystreet00) 2016-11-15 07:39:39 UTC
I think we can close this as it was probably an issue with libxcb/mesa/something else.