GNOME Bugzilla – Bug 618641
Unsetting proxy while message is in the queue leads to posterior criticals
Last modified: 2010-05-16 19:44:45 UTC
The attached test case does this: - Enqueue a message. - Before it's callback is called, unset the proxy of the session, resulting in abortion of the message. - Send a new message. This message is never delivered and a critical warning is issued. The critical is libsoup-CRITICAL **: soup_socket_connect_async: assertion `SOUP_IS_SOCKET (sock)' failed Stacktrace: #0 0xb7fe2832 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
+ Trace 221908
Created attachment 161066 [details] test case
Further analysis narrow this down to soup_session_abort() being what actually break things. As I understood it, this is what causes the critical warning: - When the message is enqueued, soup_address_resolve_async() is called at some point by a SoupSocket. This calls g_resolver_lookup_by_name_async() with a callback lookup_resolved(). - When the abortion happens, there is cancellation moving down the stack, but this doesn't reach the GResolver call. The socket is unrefed in soup_connection_disconnect() and therefore finalized. At this point, it doesn't exist anymore. - When the GResolver is done, it cals the callback lookup_resolved(). This is hooked up to call the callback got_address() in soup-socket.c. But, guess what, the socket doesn't exist anymore and boom! By now I start to have my doubts whether this critical is really the cause of the issues with further messages sent.
fixed in master. assuming no problems show up in the next month, i'll pull it into 2.30.2
Works great now, thanks a lot.