Bug 306955 - Akonadi IMAP resource runs amok when using a server with a self-signed certificate
Summary: Akonadi IMAP resource runs amok when using a server with a self-signed certif...
Status: RESOLVED FIXED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: IMAP resource (show other bugs)
Version: 4.11
Platform: Arch Linux Linux
: NOR critical
Target Milestone: ---
Assignee: Christian Mollekopf
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-17 19:24 UTC by Jan Binder
Modified: 2014-03-25 09:08 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Binder 2012-09-17 19:24:00 UTC
All the confirmation dialogs visible in the screenshot are frozen and do not react to clicks or keystrokes.
Occasionally, a new confirmation window appears and is really sluggish during any interaction.
Also, Akonadi does not remember that a certain certificate should be accepted forever.

Reproducible: Always

Steps to Reproduce:
1. Set up IMAP server with self-signed certificate on localhost.
2. Use this server with Akonadi IMAP resource.
3. Set check interval to 1 min.
4. Start kmail2
Actual Results:  
Get flooded by "pop-under" certificate confirmation dialog which get stuck and bring kwin to its knees.

Expected Results:  
When one certificate confirmation window is open, do not open another.
Remember the settings form the confirmation dialog and the following duration dialog.

Kmail is also unusably slow while this happens.
Kwin takes about ten seconds to react to any event.
CPU load is ~25-50%
Comment 1 Jan Binder 2012-09-17 19:36:14 UTC
Screenshot too large, uploaded at http://intern.sfz-bw.de/~jan.binder/img/amok.png
Comment 2 Kevin Ottens 2013-11-16 07:33:02 UTC
The IMAP resource has a new maintainer, reassigning to him.
Comment 3 Christian Mollekopf 2013-11-24 19:56:32 UTC
This dialog is part of KTcpSocket I think, but maybe we can somehow work around it.
Comment 4 Christian Mollekopf 2014-03-08 16:54:54 UTC
I just reproduced this with an account where the password changed and indeed it spawns a new dialog on every reconnect. I could also trigger it manually by simply reconnecting the wlan or entering sleep.
Comment 5 Christian Mollekopf 2014-03-08 17:14:14 UTC
(In reply to comment #4)
> I just reproduced this with an account where the password changed and indeed
> it spawns a new dialog on every reconnect. I could also trigger it manually
> by simply reconnecting the wlan or entering sleep.

Just to clarify, I didn't reproduce that the imap resource was going crazy, I just reproduced many dialogs appearing due to a frequently reconnecting internet connection. (and the dialog is spawned by the settingspasswordrequester, not KTcpSocket)
Comment 6 Christian Mollekopf 2014-03-25 09:08:55 UTC
Git commit a13c4655ea54d9902d98d97c11b5e4ba996bbceb by Christian Mollekopf.
Committed on 23/03/2014 at 17:37.
Pushed by cmollekopf into branch 'KDE/4.13'.

IMAP-Resource: Async dialogs.

Async password request dialog that is aborted after disconnecting.

This properly aborts the dialog after the connection attempt is no longer relevant,
and avoids the stacking of dialogs.

The configuration dialog is also made async to avoid similar problems.

With this change the dialog appears at most once, and vanishes if the network is disconnected again.
Related: bug 319171

M  +16   -12   resources/imap/imapresource.cpp
M  +3    -1    resources/imap/imapresource.h
M  +3    -0    resources/imap/passwordrequesterinterface.cpp
M  +1    -0    resources/imap/passwordrequesterinterface.h
M  +7    -0    resources/imap/sessionpool.cpp
M  +1    -0    resources/imap/sessionpool.h
M  +69   -20   resources/imap/settingspasswordrequester.cpp
M  +8    -0    resources/imap/settingspasswordrequester.h

http://commits.kde.org/kdepim-runtime/a13c4655ea54d9902d98d97c11b5e4ba996bbceb