GNOME Bugzilla – Bug 667774
telepathy-glib unit test fails since glib 2.31.x
Last modified: 2012-01-13 09:44:02 UTC
I have glib 2.31.8 and a unit test of telepathy-glib (stream-tube) fails. That unit test is working fine with glib 2.30.x and was still working fine with previous glib 2.31.x version (I'm not sure which version it regressed). The problem is a g_socket_client_connect_async() call that never finish and then the unit test timeout. The test code: http://cgit.freedesktop.org/telepathy/telepathy-glib/tree/tests/dbus/stream-tube.c#n805
Backtrace of where it is stuck:
+ Trace 229441
You are running the client and server in the same main loop, so once the socket connection succeeds at the kernel level, there is a race as to whether g_socket_client_connected_callback() on the client side or g_socket_service_ready() on the server side gets called first. If the client side runs first, then the test will work, but if the server side runs first, then it will end up in stream-tube-channel.c:service_incoming_cb() doing a blocking read and thus preventing the client side callback from ever running. I guess this means you'll have to fix bug 629503, as suggested in service_incoming_cb(). :-) (Or run the server in its own thread+context.)
Guillaume, you reported bug 629503, so you're probably the best to fix this :D
If I was about to fix it I would have done it since a while. :p
But now you have a motivation for that: our unit test fails !!