[Bug 203715] kio_imap4 eats randomly too much cpu
Tomas Trnka
TomTrnka at seznam.cz
Wed Jan 6 23:23:20 GMT 2010
https://bugs.kde.org/show_bug.cgi?id=203715
Tomas Trnka <TomTrnka at seznam.cz> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
CC| |TomTrnka at seznam.cz
--- Comment #3 from Tomas Trnka <TomTrnka seznam cz> 2010-01-07 00:23:17 ---
I had recently been hitting this bug few times a day and today I finally found
time to investigate it.
kio_imap4 falls into an infinite loop if any connection error occurs during
authentication (e.g. connection is suddenly lost). The backtrace looks like
this:
#0 0x00007f86a8bdd91e in IMAP4Protocol::parseReadLine (this=0xdea4e0,
buffer=<value optimized out>, relay=0)
at /usr/src/debug/kdepimlibs-4.3.4/kioslave/imap4/imap4.cpp:766
#1 0x00007f86a8c08ef2 in imapParser::parseLoop (this=0xdea510)
at /usr/src/debug/kdepimlibs-4.3.4/kioslave/imap4/imapparser.cpp:1725
#2 0x00007f86a8c0b863 in imapParser::clientAuthenticate (this=0xdea510,
slave=<value optimized out>,
ai=<value optimized out>, aFQDN=<value optimized out>, aAuth=<value
optimized out>, isSSL=<value optimized out>,
resultInfo=<value optimized out>) at
/usr/src/debug/kdepimlibs-4.3.4/kioslave/imap4/imapparser.cpp:268
#3 0x00007f86a8be15fd in IMAP4Protocol::makeLogin (this=0xdea4e0)
at /usr/src/debug/kdepimlibs-4.3.4/kioslave/imap4/imap4.cpp:2133
When IMAP4Protocol::parseReadLine detects it's not connected, it returns false.
This causes imapParser::parseLoop to return -1. However,
imapParser::clientAuthenticate doesn't check for this and (using a while(true)
loop) keeps retrying indefinitely.
This should be trivial to fix (properly check the return value of
imapParser::parseLoop and bail out if -1). However, I do not currently have
time to test the fix properly, so it will have to wait for a week or so...
--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Kdepim-bugs
mailing list