Bug 32278

Summary: X-TELEPATHY-PASSWORD causes assertion error
Product: Telepathy Reporter: Jonny Lamb <jonny.lamb>
Component: gabbleAssignee: Jonny Lamb <jonny.lamb>
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/jonny/telepathy-gabble.git;a=shortlog;h=refs/heads/sasl-fixes
Whiteboard: review+
i915 platform: i915 features:

Description Jonny Lamb 2010-12-09 15:11:43 UTC
18:29 < jonnylamb> smcv: hm, odd, gabble is crashing for me when I try to 
                   simple SASL it.
18:29 < jonnylamb> wocky-CRITICAL **: wocky_auth_registry_success_finish_func: 
                   assertion `g_simple_async_result_is_valid (result, 
                   G_OBJECT(self), wocky_auth_registry_success_async)' failed
18:30 < jonnylamb> hm, _is_valid does more than checking the source tag.
18:31 < smcv> jonnylamb: by simple SASL do you mean X-TELEPATHY-PASSWORD? I'm 
              fairly sure I did a test for that, but perhaps you're doing 
              something differently and hitting a case I didn't
18:31 < jonnylamb> yeah, X-T-P. I'm looking into it.

...

18:41 < jonnylamb> smcv: wtf, the source object given to _is_valid is a 
                   GabbleAuthManager (the channel manager), and the source 
                   object in the async result is actually a 
                   GabbleServerSaslChannel!
18:42 < smcv> jonnylamb: oh... that might be a side-effect of implementing 
              async methods on one in terms of async methods on the other
18:42 < jonnylamb> hm, yeah looks like it.
18:42 < smcv> yeah I can well believe I got that wrong somewhere
Comment 1 Jonny Lamb 2010-12-10 02:54:52 UTC
Here's a branch. I wrote in detail what was going on in the test. Here is what I wrote for your convenience and for the record of this bug:

> When this was breaking, gabble received AcceptSASL and told the
> success_async GAsyncResult to complete in an idle. But, before
> the result got its callback called, Close was also received and
> the auth manager cleared its channel. When the idle function was
> finally reached it saw it no longer had a channel (it had been
> cleared in the closed callback) and thought it should be
> chaining up to the wocky auth registry but of course it should
> be calling the channel finish function.
Comment 2 Simon McVittie 2010-12-10 03:35:13 UTC
Looks good.
Comment 3 Jonny Lamb 2010-12-10 04:36:01 UTC
POW!

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.