Bug 34166 - Idle eats 100% cpu if there is no text handler
Summary: Idle eats 100% cpu if there is no text handler
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: idle (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-11 00:41 UTC by Guillaume Desmottes
Modified: 2011-02-11 06:34 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
ImChannel: include Destroyable in Channel.Interfaces. (1.94 KB, patch)
2011-02-11 06:05 UTC, Will Thompson
Details | Splinter Review

Description Guillaume Desmottes 2011-02-11 00:41:14 UTC
- Connect an Idle account
- Be sure you don't have any text handler running or activatable
- Receive a message on IRC
- Idle starts looping like a crazy


** (telepathy-idle:13023): DEBUG: idle_im_channel_close: called on 0x1202d40
** (telepathy-idle:13023): DEBUG: idle_im_channel_close: Not really closing, I still have pending messages
** (telepathy-idle:13023): DEBUG: _im_channel_closed_cb: reopening channel with handle 2 due to pending messages
** (telepathy-idle:13023): DEBUG: idle_im_channel_close: called on 0x1202d40
** (telepathy-idle:13023): DEBUG: idle_im_channel_close: Not really closing, I still have pending messages
** (telepathy-idle:13023): DEBUG: _im_channel_closed_cb: reopening channel with handle 2 due to pending messages
** (telepathy-idle:13023): DEBUG: idle_im_channel_close: called on 0x1202d40
** (telepathy-idle:13023): DEBUG: idle_im_channel_close: Not really closing, I still have pending messages
** (telepathy-idle:13023): DEBUG: _im_channel_closed_cb: reopening channel with handle 2 due to pending messages
** (telepathy-idle:13023): DEBUG: idle_im_channel_close: called on 0x1202d40
...



method call sender=:1.141 -> dest=:1.176 serial=1546 path=/org/freedesktop/Telepathy/Connection/idle/irc/bar_2dci_40irc_2efreenode_2enet0x1215070/ImChannel2; interface=org.freedesktop.Telepathy.Channel; member=Close
method return sender=:1.176 -> dest=:1.141 reply_serial=1544
   array [
      string "org.freedesktop.Telepathy.Channel.Interface.Messages"
   ]
signal sender=:1.176 -> dest=(null destination) serial=60 path=/org/freedesktop/Telepathy/Connection/idle/irc/bar_2dci_40irc_2efreenode_2enet0x1215070/ImChannel2; interface=org.freedesktop.Telepathy.Channel; member=Closed
signal sender=:1.176 -> dest=(null destination) serial=61 path=/org/freedesktop/Telepathy/Connection/idle/irc/bar_2dci_40irc_2efreenode_2enet0x1215070; interface=org.freedesktop.Telepathy.Connection.Interface.Requests; member=ChannelClosed
   object path "/org/freedesktop/Telepathy/Connection/idle/irc/bar_2dci_40irc_2efreenode_2enet0x1215070/ImChannel2"
signal sender=:1.176 -> dest=(null destination) serial=62 path=/org/freedesktop/Telepathy/Connection/idle/irc/bar_2dci_40irc_2efreenode_2enet0x1215070; interface=org.freedesktop.Telepathy.Connection.Interface.Requests; member=NewChannels
   array [
      struct {
         object path "/org/freedesktop/Telepathy/Connection/idle/irc/bar_2dci_40irc_2efreenode_2enet0x1215070/ImChannel2"
         array [
            dict entry(
               string "org.freedesktop.Telepathy.Channel.ChannelType"
               variant                   string "org.freedesktop.Telepathy.Channel.Type.Text"
            )
            dict entry(
               string "org.freedesktop.Telepathy.Channel.TargetHandleType"
               variant                   uint32 1
            )
            dict entry(
               string "org.freedesktop.Telepathy.Channel.InitiatorHandle"
               variant                   uint32 2
            )
            dict entry(
               string "org.freedesktop.Telepathy.Channel.TargetID"
               variant                   string "cassidy"
            )
            dict entry(
               string "org.freedesktop.Telepathy.Channel.InitiatorID"
               variant                   string "cassidy"
            )
            dict entry(
               string "org.freedesktop.Telepathy.Channel.Interfaces"
               variant                   array [
                     string "org.freedesktop.Telepathy.Channel.Interface.Messages"
                  ]
            )
            dict entry(
               string "org.freedesktop.Telepathy.Channel.TargetHandle"
               variant                   uint32 2
            )
            dict entry(
               string "org.freedesktop.Telepathy.Channel.Requested"
               variant                   boolean false
            )
         ]
      }
   ]
signal sender=:1.176 -> dest=(null destination) serial=63 path=/org/freedesktop/Telepathy/Connection/idle/irc/bar_2dci_40irc_2efreenode_2enet0x1215070; interface=org.freedesktop.Telepathy.Connection; member=NewChannel
   object path "/org/freedesktop/Telepathy/Connection/idle/irc/bar_2dci_40irc_2efreenode_2enet0x1215070/ImChannel2"
   string "org.freedesktop.Telepathy.Channel.Type.Text"
   uint32 1
   uint32 2
   boolean false
signal sender=:1.141 -> dest=(null destination) serial=1547 path=/org/freedesktop/Telepathy/Account/idle/irc/bar_2dci0; interface=com.nokia.Account.Interface.Stats; member=StatsChanged
   array [
      dict entry(
         string "ChannelCount"
         variant             array [
            ]
      )
   ]
method call sender=:1.141 -> dest=org.freedesktop.DBus serial=1548 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=RemoveMatch
   string "type='signal',sender=':1.176',path='/org/freedesktop/Telepathy/Connection/idle/irc/bar_2dci_40irc_2efreenode_2enet0x1215070/ImChannel2',interface='org.freedesktop.Telepathy.Channel'"
method call sender=:1.141 -> dest=org.freedesktop.DBus serial=1549 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=RemoveMatch
   string "type='signal',sender='org.freedesktop.DBus',path='/org/freedesktop/DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged',arg0=':1.176'"
method call sender=:1.141 -> dest=org.freedesktop.DBus serial=1550 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
   string "type='signal',sender=':1.176',path='/org/freedesktop/Telepathy/Connection/idle/irc/bar_2dci_40irc_2efreenode_2enet0x1215070/ImChannel2',interface='org.freedesktop.Telepathy.Channel'"
method call sender=:1.141 -> dest=org.freedesktop.DBus serial=1551 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
   string "type='signal',sender='org.freedesktop.DBus',path='/org/freedesktop/DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged',arg0=':1.176'"
method call sender=:1.141 -> dest=:1.176 serial=1552 path=/org/freedesktop/Telepathy/Connection/idle/irc/bar_2dci_40irc_2efreenode_2enet0x1215070/ImChannel2; interface=org.freedesktop.Telepathy.Channel; member=GetInterfaces
signal sender=:1.141 -> dest=(null destination) serial=1553 path=/org/freedesktop/Telepathy/Account/idle/irc/bar_2dci0; interface=com.nokia.Account.Interface.Stats; member=StatsChanged
   array [
      dict entry(
         string "ChannelCount"
         variant             array [
               dict entry(
                  string "org.freedesktop.Telepathy.Channel.Type.Text"
                  uint32 1
               )
            ]
      )
   ]

And then Close() is called again, etc.
Comment 1 Simon McVittie 2011-02-11 03:13:44 UTC
This probably means Idle doesn't implement Destroyable on its text channels. Every CM with this respawning behaviour must also implement Destroyable, to avoid this loop.
Comment 2 Will Thompson 2011-02-11 05:53:49 UTC
telepathy-idle 0.1.5 (2009-09-14)

...


* Implement Destroyable for IM channels. (wjt)
Comment 3 Will Thompson 2011-02-11 05:54:36 UTC
Stupid me. It's not in the interfaces list. Patch to follow...
Comment 4 Will Thompson 2011-02-11 06:05:45 UTC
Created attachment 43250 [details] [review]
ImChannel: include Destroyable in Channel.Interfaces.
Comment 5 Simon McVittie 2011-02-11 06:17:33 UTC
Review of attachment 43250 [details] [review]:

r+
Comment 6 Will Thompson 2011-02-11 06:34:47 UTC
Fixed in master; will be in 0.1.9.


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.