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 681575 - [0.11] gstnetclientclock test hangs forever on Ubuntu Quantal
[0.11] gstnetclientclock test hangs forever on Ubuntu Quantal
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.11.x
Other Linux
: Normal critical
: 0.11.x
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-08-10 06:12 UTC by Sebastian Dröge (slomo)
Modified: 2012-08-10 08:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
netclientclock: simplify by using g_socket_condition_timed_wait() (8.40 KB, patch)
2012-08-10 08:21 UTC, Tim-Philipp Müller
committed Details | Review

Description Sebastian Dröge (slomo) 2012-08-10 06:12:09 UTC
The gstnetclientclock test hangs forever on Ubuntu Quantal. Even the timeout of the testrunner is not killing it after some time. No idea why the testrunner does not kill it after some time but the test problem seems to be a deadlock in the GMainContext used by the clock.


Testrunner process:

(gdb) bt
  • #0 waitpid
    from /lib/x86_64-linux-gnu/libpthread.so.0
  • #1 tcase_run_tfun_fork
    at check_run.c line 382
  • #2 srunner_iterate_tcase_tfuns
    at check_run.c line 175
  • #3 srunner_run_tcase
    at check_run.c line 302
  • #4 srunner_iterate_suites
    at check_run.c line 150
  • #5 srunner_run_all
    at check_run.c line 561
  • #6 gst_check_run_suite
    at gstcheck.c line 666
  • #7 main
    at libs/gstnetclientclock.c line 128
  • #0 pthread_join
    from /lib/x86_64-linux-gnu/libpthread.so.0
  • #1 ??
    from /lib/x86_64-linux-gnu/libglib-2.0.so.0
  • #2 g_thread_join
    from /lib/x86_64-linux-gnu/libglib-2.0.so.0
  • #3 gst_net_client_clock_stop
    at gstnetclientclock.c line 517
  • #4 gst_net_client_clock_finalize
    at gstnetclientclock.c line 151
  • #5 g_object_unref
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #6 test_instantiation
    at libs/gstnetclientclock.c line 40
  • #7 tcase_run_tfun_fork
    at check_run.c line 372
  • #8 srunner_iterate_tcase_tfuns
    at check_run.c line 175
  • #9 srunner_run_tcase
    at check_run.c line 302
  • #10 srunner_iterate_suites
    at check_run.c line 150
  • #11 srunner_run_all
    at check_run.c line 561
  • #12 gst_check_run_suite
    at gstcheck.c line 666
  • #13 main
    at libs/gstnetclientclock.c line 128
  • #0 __lll_lock_wait
    from /lib/x86_64-linux-gnu/libpthread.so.0
  • #0 __lll_lock_wait
    from /lib/x86_64-linux-gnu/libpthread.so.0
  • #1 _L_lock_1006
    from /lib/x86_64-linux-gnu/libpthread.so.0
  • #2 pthread_mutex_lock
    from /lib/x86_64-linux-gnu/libpthread.so.0
  • #3 g_mutex_lock
    from /lib/x86_64-linux-gnu/libglib-2.0.so.0
  • #4 ??
    from /lib/x86_64-linux-gnu/libglib-2.0.so.0
  • #5 g_main_context_unref
    from /lib/x86_64-linux-gnu/libglib-2.0.so.0
  • #6 gst_net_client_clock_thread
    at gstnetclientclock.c line 416
  • #7 ??
    from /lib/x86_64-linux-gnu/libglib-2.0.so.0
  • #8 start_thread
    from /lib/x86_64-linux-gnu/libpthread.so.0
  • #9 clone
    from /lib/x86_64-linux-gnu/libc.so.6
  • #10 ??

Comment 1 Tim-Philipp Müller 2012-08-10 08:21:58 UTC
Created attachment 220851 [details] [review]
netclientclock: simplify by using g_socket_condition_timed_wait()
Comment 2 Edward Hervey 2012-08-10 08:30:03 UTC
Comment on attachment 220851 [details] [review]
netclientclock: simplify by using g_socket_condition_timed_wait()

Works for me
Comment 3 Tim-Philipp Müller 2012-08-10 08:33:29 UTC
commit fe082cbe24a4bfd7131921d820df1b7689da7b66
Author: Tim-Philipp Müller <tim@centricular.net>
Date:   Fri Aug 10 09:19:25 2012 +0100

    netclientclock: simplify by using g_socket_condition_timed_wait()
    
    No need to use a custom main context and custom timeout sources,
    just use g_socket_condition_timed_wait() instead, which was added
    for exactly this case.
    
    Also seems to help with the unit test deadlocking with glib 2.33.x
    
    https://bugzilla.gnome.org/show_bug.cgi?id=681575