GNOME Bugzilla – Bug 724239
soup_session_queue_message - Connection terminated unexpectedly
Last modified: 2014-02-17 16:38:41 UTC
Created attachment 268919 [details] reproducer for my problem.. I'm not sure how to describe what is happening. I have a reproducer and hope that I'm simply using/implementing things incorrectly. The situation is that I have a global SoupSession. The reproducer spawns several processes using forkpty. I read the output via a GIOChannel and send the data via the SoupSession. If one of these processes finishes while I'm in the middle of a soup_session_queue_message transaction I get error code 7 - Connection terminated unexpectedly. If I do one of the following I can eliminate the issue: - Open SoupSession with timeout = 0 - Create a new SoupSession from inside GIOChannel and don't use the static global SoupSession. Is there a real bug here? or am I leaking file descriptors and causing the problem? Thanks! To run the reproducer: % make Shell 1 % ./soup-server Shell 2 % ./soup-client --server http://localhost:8081/ You will get the following output on Shell 2 ** (soup-client:22971): WARNING **: output code:7 Reason:Connection terminated unexpectedly run again if you don't get the error. It happens every time for me, but it is time sensitive.
Created attachment 269136 [details] strace of soup-client run where issue was seen. Here is an starce -tt -f of soup-client when it showed the issue.
Created attachment 269143 [details] [review] gsocket: fix g_socket_condition_timed_wait() recovery after EINTR After getting an EINTR, g_socket_condition_timed_wait() has to adjust its timeout, but it was trying to convert from nanoseconds to microseconds by multiplying by 1000 rather than dividing... Oops.
Bill: test F19 build at http://koji.fedoraproject.org/koji/taskinfo?taskID=6531992
Hi Dan, This does indeed fix the problem for me. Thank you so much!
Attachment 269143 [details] pushed as 4139b26 - gsocket: fix g_socket_condition_timed_wait() recovery after EINTR