Bug 334406

Summary: possible timing problem at startup - setting resources online and mail check failing
Product: [Applications] kmail2 Reporter: Jonathan Marten <jjm>
Component: miscAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED UNMAINTAINED    
Severity: normal    
Priority: NOR    
Version: Git (master)   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: KMail startup log file

Description Jonathan Marten 2014-05-06 10:17:21 UTC
If KMail needs to start the Akonadi server because it is not currently running, there appears to be a timing problem between the server starting up and KMail doing things which assume that the server is fully available.  In my case, this results in resources not being set online when they should be (notably Local Folders, this may be the root cause of bug 334175) and a mail check not being done on startup (assuming that this is configured).

I have added debug messages to KMKernel::setAccountStatus() and KMKernel::checkMailOnStartup() to report when they are called and how many agent instances are reported from MailCommon::Util::agentInstances().  The server state is initially 4 (Broken) and no agents are reported;  only when the state changes to 2 (Running) is the list available.  By then it is too late.

Attached is an extract from a voluminous log file, with all lines are still in the original time order.

Reproducible: Always
Comment 1 Jonathan Marten 2014-05-06 10:18:17 UTC
Created attachment 86485 [details]
KMail startup log file
Comment 2 Denis Kurz 2016-09-24 18:09:59 UTC
This bug has only been reported for versions before 4.14, which have been unsupported for at least two years now. Can anyone tell if this bug still present?

If noone confirms this bug for a Framework-based version of kmail2 (version 5.0 or later, as part of KDE Applications 15.12 or later), it gets closed in about three months.
Comment 3 Denis Kurz 2017-01-07 21:58:57 UTC
Just as announced in my last comment, I close this bug. If you encounter it again in a recent version (at least 5.0 aka 15.08), please open a new one unless it already exists. Thank you for all your input.