test-stream-tube fails because of a deadlock. I have initially reported this against glib, but seems it is a tp-glib bug actually. See https://bugzilla.gnome.org/show_bug.cgi?id=667774. Backtrace where it's stuck: #0 0x00007ffff6a22803 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87 #1 0x00007ffff76e1635 in g_socket_condition_wait (error=0x7fffffffd230, cancellable=0x0, condition=<optimized out>, socket=<optimized out>) at /build/buildd/glib2.0-2.31.8/./gio/gsocket.c:2840 #2 g_socket_condition_wait (socket=<optimized out>, condition=<optimized out>, cancellable=0x0, error=0x7fffffffd230) at /build/buildd/glib2.0-2.31.8/./gio/gsocket.c:2750 #3 0x00007ffff76e24c0 in g_socket_receive_message (socket=0x664f20, address=0x0, vectors=0x7fffffffd1c0, num_vectors=<optimized out>, messages=0x7fffffffd1d0, num_messages=0x7fffffffd1e0, flags=0x0, cancellable=0x0, error=0x7fffffffd230) at /build/buildd/glib2.0-2.31.8/./gio/gsocket.c:3341 #4 0x00007ffff7ae86b9 in _tp_unix_connection_receive_credentials_with_byte (error=0x7fffffffd230, cancellable=0x0, byte=0x7fffffffd23f "", connection=<optimized out>) at gnio-util.c:463 #5 tp_unix_connection_receive_credentials_with_byte (connection=<optimized out>, byte=0x7fffffffd23f "", cancellable=0x0, error=0x7fffffffd230) at gnio-util.c:570 #6 0x00007ffff7b1661a in service_incoming_cb (service=<optimized out>, conn=0x683aa0, source_object=<optimized out>, user_data=0x644030) at stream-tube-channel.c:1287 #7 0x00007ffff5cb1a14 in ffi_call_unix64 () from /usr/lib/x86_64-linux-gnu/libffi.so.6 #8 0x00007ffff5cb1435 in ffi_call () from /usr/lib/x86_64-linux-gnu/libffi.so.6 #9 0x00007ffff720b88b in g_cclosure_marshal_generic (closure=0x674ae0, return_gvalue=0x7fffffffd630, n_param_values=3, param_values=<optimized out>, invocation_hint=<optimized out>, marshal_data=0x7ffff7b164c0) at /build/buildd/glib2.0-2.31.8/./gobject/gclosure.c:1189 #10 0x00007ffff720b364 in g_closure_invoke (closure=0x674ae0, return_value=0x7fffffffd630, n_param_values=3, param_values=0x6651e0, invocation_hint=<optimized out>) at /build/buildd/glib2.0-2.31.8/./gobject/gclosure.c:774 #11 0x00007ffff721b615 in signal_emit_unlocked_R (node=<optimized out>, detail=0, instance=<optimized out>, emission_return=0x7fffffffd770, instance_and_params=0x6651e0) at /build/buildd/glib2.0-2.31.8/./gobject/gsignal.c:3302 #12 0x00007ffff7222ecd in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=0x7fffffffd7d8) at /build/buildd/glib2.0-2.31.8/./gobject/gsignal.c:3043 #13 0x00007ffff72231b2 in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at /build/buildd/glib2.0-2.31.8/./gobject/gsignal.c:3090 #14 0x00007ffff76eb7a7 in g_socket_service_incoming (source_object=<optimized out>, connection=0x683aa0, service=0x67e580) at /build/buildd/glib2.0-2.31.8/./gio/gsocketservice.c:236 #15 g_socket_service_ready (object=<optimized out>, result=0x67e5e0, user_data=<optimized out>) at /build/buildd/glib2.0-2.31.8/./gio/gsocketservice.c:299 #16 0x00007ffff76de67d in g_simple_async_result_complete (simple=0x67e5e0) at /build/buildd/glib2.0-2.31.8/./gio/gsimpleasyncresult.c:744 #17 0x00007ffff76de7ac in complete_in_idle_cb (data=0x67e5e0) at /build/buildd/glib2.0-2.31.8/./gio/gsimpleasyncresult.c:756 #18 0x00007ffff6f506ca in g_main_dispatch (context=0x625870) at /build/buildd/glib2.0-2.31.8/./glib/gmain.c:2513 #19 g_main_context_dispatch (context=0x625870) at /build/buildd/glib2.0-2.31.8/./glib/gmain.c:3050 #20 0x00007ffff6f50a90 in g_main_context_iterate (dispatch=1, block=<optimized out>, context=0x625870, self=<optimized out>) at /build/buildd/glib2.0-2.31.8/./glib/gmain.c:3121 #21 g_main_context_iterate (context=0x625870, block=<optimized out>, dispatch=1, self=<optimized out>) at /build/buildd/glib2.0-2.31.8/./glib/gmain.c:3058 #22 0x00007ffff6f50e8a in g_main_loop_run (loop=0x658e40) at /build/buildd/glib2.0-2.31.8/./glib/gmain.c:3315 #23 0x0000000000407943 in test_offer_race (test=0x657ca0, data=<optimized out>) at stream-tube.c:811 #24 0x00007ffff6f70ccb in test_case_run (tc=0x61e6a0) at /build/buildd/glib2.0-2.31.8/./glib/gtestutils.c:1662 #25 g_test_run_suite_internal (suite=0x623480, path=0x7ffff6fbdb3e "") at /build/buildd/glib2.0-2.31.8/./glib/gtestutils.c:1715 #26 0x00007ffff6f70e46 in g_test_run_suite_internal (suite=<optimized out>, path=0x7ffff6fbdb3e "") at /build/buildd/glib2.0-2.31.8/./glib/gtestutils.c:1726 #27 0x00007ffff6f70e46 in g_test_run_suite_internal (suite=<optimized out>, path=0x7ffff6fbdb3e "") at /build/buildd/glib2.0-2.31.8/./glib/gtestutils.c:1726 #28 0x00007ffff6f70e46 in g_test_run_suite_internal (suite=<optimized out>, path=0x7ffff6fbdb3e "") at /build/buildd/glib2.0-2.31.8/./glib/gtestutils.c:1726 #29 0x00007ffff6f70e46 in g_test_run_suite_internal (suite=<optimized out>, path=0x7ffff6fbdb3e "") at /build/buildd/glib2.0-2.31.8/./glib/gtestutils.c:1726 #30 0x00007ffff6f70e46 in g_test_run_suite_internal (suite=<optimized out>, path=0x7ffff6fbdb3e "") at /build/buildd/glib2.0-2.31.8/./glib/gtestutils.c:1726 #31 0x00007ffff6f7119b in g_test_run_suite (suite=0x61d720) at /build/buildd/glib2.0-2.31.8/./glib/gtestutils.c:1771 #32 0x0000000000405e44 in main (argc=1, argv=0x7fffffffe0d8) at stream-tube.c:1082 We should be using async variants for tp_unix_connection_send_credentials_with_byte() and tp_unix_connection_receive_credentials_with_byte() and probably get them into glib (see https://bugzilla.gnome.org/show_bug.cgi?id=629503)
Review of http://cgit.collabora.com/git/user/xclaesse/telepathy-glib.git/commit/?h=fix-ut&id=a8aaf76e128ee3a0dd393f7c8e4734f53fd27c41 You removed the FIXME in tests/lib/stream-tube-chan.c but didn't actually change the code. tp_unix_connection_receive_credentials_with_byte_async() shouldn't take the byte as an arg. Instead it should be returned by the _finish() function. The _async() methods are not documented and added to the doc. "make check" won't pass. client_socket_connected: remove the // comment service_incoming_cb() should wait for the byte being received before processing.
Cool, that fixed the unit tests, I can sleep again :)
+ * @user_data: (closure): the data to pass to callback function "the data to pass to @callback" I'd add a receive_credentials_with_byte_data_new() to make things cleaner. Otherwise, looks good!
Done and merged. Thanks.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.