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 166917 - deadlock in queue
deadlock in queue
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins
git master
Other Linux
: Normal normal
: 0.8.8
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-02-10 12:56 UTC by Jan Schmidt
Modified: 2005-02-16 03:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add locking and queueing of navigation events in xvimagesink (4.80 KB, patch)
2005-02-14 16:41 UTC, Jan Schmidt
none Details | Review
same patch for ximagesink (5.49 KB, patch)
2005-02-14 16:56 UTC, Jan Schmidt
none Details | Review

Description Jan Schmidt 2005-02-10 12:56:17 UTC
Here's a deadlock scenario I keep encountering in totem. It's happening a lot
because of the high rate navigation events, I think.

Particularly, note that both thread 1 and thread 2 are waiting on the item_add
for the same queue, one sending a src_event and one calling _get. I don't know
how that happens other than a bug in opt?

(gdb) thread 1
[Switching to thread 1 (Thread -1224661536 (LWP 4379))]#0  0xffffe410 in ?? ()
(gdb) bt
  • #0 ??
  • #1 ??
  • #2 ??
  • #3 ??
  • #4 pthread_cond_timedwait
    from /lib/tls/i686/cmov/libpthread.so.0
  • #5 ??
    from /usr/lib/libgthread-2.0.so.0
  • #6 ??
  • #7 ??
  • #8 ??
  • #9 gst_debug_log
    at gstinfo.c line 318
  • #10 gst_queue_handle_src_event
    at gstqueue.c line 919
  • #11 gst_pad_send_event
    at gstpad.c line 4214
  • #12 gst_pad_event_default_dispatch
    at gstpad.c line 4071
  • #13 gst_pad_event_default
    at gstpad.c line 4136
  • #14 gst_pad_send_event
    at gstpad.c line 4214
  • #15 gst_pad_event_default_dispatch
    at gstpad.c line 4071
  • #16 gst_pad_event_default
    at gstpad.c line 4136
  • #17 gst_pad_send_event
    at gstpad.c line 4214
  • #18 gst_pad_event_default_dispatch
    at gstpad.c line 4071
  • #19 gst_pad_event_default
    at gstpad.c line 4136
  • #20 gst_videoscale_handle_src_event
    at gstvideoscale.c line 511
  • #21 gst_pad_send_event
    at gstpad.c line 4214
  • #22 gst_xvimagesink_navigation_send_event
    at xvimagesink.c line 1577
  • #23 gst_navigation_send_event
    at navigation.c line 70
  • #24 gst_navigation_send_mouse_event
    at navigation.c line 87
  • #25 bacon_video_widget_motion_notify
    at bacon-video-widget-gst.c line 397
  • #26 _gtk_marshal_BOOLEAN__BOXED
    from /usr/lib/libgtk-x11-2.0.so.0
  • #27 g_cclosure_new_swap
    from /usr/lib/libgobject-2.0.so.0
  • #28 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #29 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #30 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #31 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #32 gtk_widget_send_expose
    from /usr/lib/libgtk-x11-2.0.so.0
  • #33 gtk_propagate_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #34 gtk_main_do_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #35 _gdk_events_queue
    from /usr/lib/libgdk-x11-2.0.so.0
  • #36 g_main_depth
    from /usr/lib/libglib-2.0.so.0
  • #37 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #38 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #39 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #40 gtk_main
    from /usr/lib/libgtk-x11-2.0.so.0
  • #41 main
    at totem.c line 3527
  • #0 ??
  • #1 ??
  • #2 ??
  • #3 ??
  • #4 pthread_cond_wait
    from /lib/tls/i686/cmov/libpthread.so.0
  • #5 gst_queue_get
    at gstqueue.c line 826
  • #6 gst_pad_call_get_function
    at gstpad.c line 4519
  • #7 get_group_schedule_function
    at gstoptimalscheduler.c line 1409
  • #8 schedule_group
    at gstoptimalscheduler.c line 1222
  • #9 gst_opt_scheduler_schedule_run_queue
    at gstoptimalscheduler.c line 1274
  • #10 schedule_chain
    at gstoptimalscheduler.c line 1331
  • #11 gst_opt_scheduler_iterate
    at gstoptimalscheduler.c line 2789
  • #12 gst_scheduler_iterate
    at gstscheduler.c line 744
  • #13 gst_bin_iterate_func
    at gstbin.c line 1246
  • #14 gst_marshal_BOOLEAN__VOID
    at gstmarshal.c line 509
  • #15 g_cclosure_new_swap
    from /usr/lib/libgobject-2.0.so.0
  • #16 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #17 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #18 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #19 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #20 gst_bin_iterate
    at gstbin.c line 1306
  • #21 gst_thread_main_loop
    at gstthread.c line 688
  • #22 g_static_private_free
    from /usr/lib/libglib-2.0.so.0
  • #23 start_thread
    from /lib/tls/i686/cmov/libpthread.so.0
  • #24 clone
    from /lib/tls/i686/cmov/libc.so.6
  • #0 ??
  • #1 ??
  • #2 ??
  • #3 ??
  • #4 pthread_cond_wait
    from /lib/tls/i686/cmov/libpthread.so.0
  • #5 gst_queue_get
    at gstqueue.c line 826
  • #6 gst_pad_call_get_function
    at gstpad.c line 4519
  • #7 get_group_schedule_function
    at gstoptimalscheduler.c line 1409
  • #8 schedule_group
    at gstoptimalscheduler.c line 1222
  • #9 gst_opt_scheduler_schedule_run_queue
    at gstoptimalscheduler.c line 1274
  • #10 schedule_chain
    at gstoptimalscheduler.c line 1331
  • #11 gst_opt_scheduler_iterate
    at gstoptimalscheduler.c line 2789
  • #12 gst_scheduler_iterate
    at gstscheduler.c line 744
  • #13 gst_bin_iterate_func
    at gstbin.c line 1246
  • #14 gst_marshal_BOOLEAN__VOID
    at gstmarshal.c line 509
  • #15 g_cclosure_new_swap
    from /usr/lib/libgobject-2.0.so.0
  • #16 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #17 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #18 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #19 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #20 gst_bin_iterate
    at gstbin.c line 1306
  • #21 gst_thread_main_loop
    at gstthread.c line 688
  • #22 g_static_private_free
    from /usr/lib/libglib-2.0.so.0
  • #23 start_thread
    from /lib/tls/i686/cmov/libpthread.so.0
  • #24 clone
    from /lib/tls/i686/cmov/libc.so.6
  • #0 ??
  • #1 ??
  • #2 ??
  • #3 ??
  • #4 pthread_cond_wait
    from /lib/tls/i686/cmov/libpthread.so.0
  • #5 gst_queue_chain
    at gstqueue.c line 706
  • #6 gst_pad_call_chain_function
    at gstpad.c line 4496
  • #7 gst_pad_push
    at gstpad.c line 3298
  • #8 gst_stream_selector_chain
    at gststreamselector.c line 292
  • #9 gst_pad_call_chain_function
    at gstpad.c line 4496
  • #10 gst_pad_push
    at gstpad.c line 3298
  • #11 gst_dtsdec_handle_frame
    at gstdtsdec.c line 438
  • #12 gst_dtsdec_chain
    at gstdtsdec.c line 492
  • #13 gst_pad_call_chain_function
    at gstpad.c line 4496
  • #14 gst_pad_push
    at gstpad.c line 3298
  • #15 gst_mpeg_demux_send_subbuffer
    at gstmpegdemux.c line 943
  • #16 gst_dvd_demux_send_subbuffer
    at gstdvddemux.c line 937
  • #17 gst_dvd_demux_process_private
    at gstdvddemux.c line 901
  • #18 gst_mpeg_demux_parse_pes
    at gstmpegdemux.c line 887
  • #19 gst_mpeg_parse_loop
    at gstmpegparse.c line 599
  • #20 loop_group_schedule_function
    at gstoptimalscheduler.c line 1451
  • #21 schedule_group
    at gstoptimalscheduler.c line 1222
  • #22 gst_opt_scheduler_schedule_run_queue
    at gstoptimalscheduler.c line 1274
  • #23 schedule_chain
    at gstoptimalscheduler.c line 1331
  • #24 gst_opt_scheduler_iterate
    at gstoptimalscheduler.c line 2789
  • #25 gst_scheduler_iterate
    at gstscheduler.c line 744
  • #26 gst_bin_iterate_func
    at gstbin.c line 1246
  • #27 gst_marshal_BOOLEAN__VOID
    at gstmarshal.c line 509
  • #28 g_cclosure_new_swap
    from /usr/lib/libgobject-2.0.so.0
  • #29 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #30 g_signal_emit_by_name
    from /usr/lib/libgobject-2.0.so.0
  • #31 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #32 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #33 gst_bin_iterate
    at gstbin.c line 1306
  • #34 gst_thread_main_loop
    at gstthread.c line 688
  • #35 g_static_private_free
    from /usr/lib/libglib-2.0.so.0
  • #36 start_thread
    from /lib/tls/i686/cmov/libpthread.so.0
  • #37 clone
    from /lib/tls/i686/cmov/libc.so.6
  • #0 ??
  • #1 ??
  • #2 ??
  • #3 ??
  • #4 poll
    from /lib/tls/i686/cmov/libc.so.6
  • #5 g_main_loop_get_context
    from /usr/lib/libglib-2.0.so.0
  • #6 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #7 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #8 link_thread_io_context
    from /usr/lib/libORBit-2.so.0
  • #9 ??
    from /usr/lib/libglib-2.0.so.0
  • #10 ??
  • #11 g_static_private_free
    from /usr/lib/libglib-2.0.so.0

Comment 1 Jan Schmidt 2005-02-14 16:41:21 UTC
Created attachment 37458 [details] [review]
Add locking and queueing of navigation events in xvimagesink

so, this would seem to be because totem sends mouse movements from the main
thread and they get forwarded upstream. Attaching a patch to add locking and
defer sending the navigation events until the next call to the chain function.
Patch for ximagesink soon
Comment 2 Jan Schmidt 2005-02-14 16:56:35 UTC
Created attachment 37459 [details] [review]
same patch for ximagesink
Comment 3 Jan Schmidt 2005-02-14 16:58:13 UTC
for the bug history, a symptom was also random crashes in the queue src event
handling from the same cause. Also appears fixed by these patches.
Comment 4 Jan Schmidt 2005-02-16 03:19:02 UTC
Committed.