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
Created attachment 86485 [details] KMail startup log file
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.
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.