Summary: | CallChannels still awaiting caps when we disconnect are leaked. | ||
---|---|---|---|
Product: | Telepathy | Reporter: | Will Thompson <will> |
Component: | gabble | Assignee: | Telepathy bugs list <telepathy-bugs> |
Status: | RESOLVED MOVED | QA Contact: | Telepathy bugs list <telepathy-bugs> |
Severity: | normal | ||
Priority: | medium | ||
Version: | git master | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Bug Depends on: | |||
Bug Blocks: | 29796 |
Description
Will Thompson
2010-08-24 15:00:40 UTC
Unfortunately there is a second leak in this stuff. The media factory calls init_async() on the Call channel. If we're already waiting for the contact's caps, the Call channel waits for them to arrive before succeeding or failing to initialize. If they don't arrive before the connection dies, the signal the call channel is waiting for never arrives, so the async operation never finishes. The fix ought to be straightforward: in the Call channel, keep track of outstanding init_async() operations. Watch the connection state, and if it changes to Disconnected, fail all the operations, safe in the knowledge that capabilities-discovered will not fire. (Unfortunately, I don't think this is quite true — Disconnected is signalled when we send </stream:stream>, and we might receive the replies before the server sends back </stream:stream> — so some care needs to be taken here.) But I have other things to attend to, I'm afraid. (In reply to comment #0) > http://git.collabora.co.uk/?p=user/wjt/telepathy-gabble-wjt.git;a=shortlog;h=refs/heads/get_source_object-refleak r+ > http://git.collabora.co.uk/?p=user/wjt/wocky.git;a=commitdiff;h=refs/heads/refleaks r+, and pre-r+ on the Gabble patch to update to this Wocky :-) (In reply to comment #1) > Unfortunately there is a second leak in this stuff. If the two branches above are harmless, please merge them, retitle and leave this bug open? Yes! I have done so. (In reply to comment #1) > The fix ought to be straightforward: in the Call channel, keep track of > outstanding init_async() operations. Watch the connection state, and if it > changes to Disconnected, fail all the operations, safe in the knowledge that > capabilities-discovered will not fire. (Unfortunately, I don't think this is > quite true — Disconnected is signalled when we send </stream:stream>, and we > might receive the replies before the server sends back </stream:stream> — so > some care needs to be taken here.) But I have other things to attend to, I'm > afraid. A better fix would be to replace the gboolean contact_is_media_capable(..., gboolean *wait, ...) functions with gboolean gabble_presence_cache_contact_has_caps (cache, handle, caps); and void gabble_presence_cache_contact_has_caps_async(...); gboolean ..._finish(); with the former returning immediately, and the latter waiting for the caps to arrive if retrieval is in progress. -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/telepathy/telepathy-gabble/issues/95. |
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.