Bug 30182

Summary: Crash in gabble_server_tls_channel_constructed(), apparently NULL connection
Product: Telepathy Reporter: Will Thompson <will>
Component: gabbleAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium Keywords: patch
Version: git master   
Hardware: Other   
OS: All   
URL: http://git.collabora.co.uk/?p=user/wjt/telepathy-gabble-wjt.git;a=commitdiff;h=refs/heads/tls-channel-crash-after-disconnected
Whiteboard:
i915 platform: i915 features:

Description Will Thompson 2010-09-14 07:08:52 UTC
From my commit that I think fixes this bug:

    I received a report of a segfault with the following (trimmed) backtrace:
    
    0  tp_base_channel_constructed () at base-channel.c:604
    1  gabble_server_tls_channel_constructed (object=0x1619f8) at server-tls-channel.c:181
    [ g_object_new crap ]
    5  gabble_server_tls_manager_verify_async ([...]) at server-tls-manager.c:218
    6  wocky_tls_handler_verify_async ([...]) at wocky-tls-handler.c:261
    7  session_handshake_cb () at wocky-tls-connector.c:302
    
    Line 604 of base-channel.c dereferences the channel's connection for the
    first time. I infer that this is caused by the connection being invalid,
    which from reading the code in Gabble was probably caused by the
    TLSManager's connection being NULL, due to being cleared in
    connection_status_changed_cb() on DISCONNECTED to break a reference
    cycle.

I don't have a test case for this patch (see bug 23302 and bug 29799) but I have reproduced this crash, and verified that this patch fixes it.
Comment 1 Will Thompson 2010-09-14 07:23:28 UTC
Merged; will be in 0.9.19.

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.