[Bug 49163] New: Connection time out : msg_sending flag unset before behing set

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Apr 26 09:49:10 CEST 2012


https://bugs.freedesktop.org/show_bug.cgi?id=49163

             Bug #: 49163
           Summary: Connection time out : msg_sending flag unset before
                    behing set
    Classification: Unclassified
           Product: Telepathy
           Version: git master
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: medium
         Component: idle
        AssignedTo: telepathy-bugs at lists.freedesktop.org
        ReportedBy: prahal at yahoo.com
         QAContact: telepathy-bugs at lists.freedesktop.org


Telepathy idle ends up with "Connection time out" all the time. It turns out
that with glib/gio git master priv->msg_sending flag in idle-connection.c
msg_queue_timeout_cb is set to FALSE in the _msg_queue_timeout_ready before
behing set to TRUE. This leads to infinite msg_timed_out_cb calls (ie until the
server send the connection timed out).

The backtrace of the tp idle shows that :
g_output_stream_write_real_async triggers _write_async_pollable and in this use
case it ends up calling the non idle version g_simple_async_result_complete.
All this happens before idle_server_connection_send_async with callback
_msg_queue_timeout_ready completes. As this callback set back priv->msg_sending
to FALSE, and the initialization of this variable to TRUE happens after the
idle_server_connection_send_async call, priv->msg_sending stays at TRUE until
connection is aborted by the server.

To avoid this the patch calls g_simple_async_result_complete_in_idle instead
ofg_simple_async_result_complete_in_idle in  idle-server-connection.c function
_write_ready.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
You are the assignee for the bug.



More information about the telepathy-bugs mailing list