[Kde-pim] Proposal for a solution for bug 77862

Thomas McGuire mcguire at kde.org
Fri May 14 21:53:53 BST 2010


Hi,

On Friday 14 May 2010 19:17:05 Guy Maurel wrote:
> Some more information as I wrote: the kio_imap4 cannot be use anymore.
> 
> Let us make an experiment.
> Restart the kdeinit4, so we can catch the kio_imap4-slave.
> Start the kmail and get some mail from a imap-server.
> Attach a debugger to the kio_imap4-slave.
> Change the IP-address, may be from 192.168.2.2 to 192.168.3.3
> Push the "Check Mail"-button again.
> kmail is frozen.
> 
> Within the debugger (I use cgdb), type a CTRL-C to get the command-prompt.
> a bt-command give us the information we need, such as (little changes for
> better read):
> 
> #0  0x00007fc382ada8b3 in __select_nocancel () from /lib/libc.so.6
> #1  0x00007fc38475b02a in qt_safe_select(int, fd_set*, fd_set*, fd_set*,
> timeval const*) () from /usr/lib/libQtCore.so.4 it is at
> qt/corelib/kernel/qcore_unix.cpp:137
> #2  0x00007fc3856b995a in ?? () from /usr/lib/libQtNetwork.so.4
> #3  0x00007fc3856a2bd8 in ?? () from /usr/lib/libQtNetwork.so.4
> #4  0x00007fc3856b3d11 in QAbstractSocket::waitForReadyRead(int) () from
> /usr/lib/libQtNetwork.so.4 it is at
> qt/network/socket/qabstractsocket.cpp:1775
> #5  0x00007fc3856c72c9 in QSslSocket::waitForReadyRead(int) () from
> /usr/lib/libQtNetwork.so.4 it is at qt/network/ssl/qsslsocket.cpp:1420
> #6  0x00007fc3865a4fa6 in KTcpSocket::waitForReadyRead (this=0x13dc040,
> msecs=600000) at src/kdelibs/kdecore/network/ktcpsocket.cpp:462 #7 
> 0x00007fc385b02685 in KIO::TCPSlaveBase::waitForResponse (this=0x13d6930,
> t=600) at src/kdelibs/kio/kio/tcpslavebase.cpp:937 #8  0x00007fc378bf7593
> in IMAP4Protocol::parseReadLine (this=0x13d6930, buffer=..., relay=0) at
> src/kdepimlibs/kioslave/imap4/imap4.cpp:750
> 
> very low within qt, the function  "qt_safe_select" uses the "select" from
> libc. short before, one needs a "bind" between the IP-address and a file
> descriptor.
> 
> This is why we have to wait until the timeout as the IP-address has
> changed. After the timeout, we have to do something with this... But it is
> a long time and we already know from the Solid::Notifier that the
> IP-address has changed.

Oh, I see, this explains why closing the connection does not work, as the IO 
slave probably is waiting somewhere, so the commands get not dispatched.

However, all the waitForReadyRead have a timeout parameter. Is that timeout to 
high? We might just be enable to lower it.

> **WHY** do we need this "if (getState() == ISTATE_NO)" ?

The documentation says ISTATE_NO stands for "Not connected", so if it is not 
connected, we don't need to disconnect. Are you sure the slave is actually 
connected at that point?

> This is why I propose to kill the kio_imap4-slave.

I'd rather find out why the timeout is not working. Looks like there might be 
some defect, and usually it is better to fix the defect (the root cause) 
instead on working around that.
As the last resort, killing the slave is an option of course :)

Regards,
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20100514/20596003/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list