Bug 424246 - KMail sometimes won't exit (closes the windows but stays running)
Summary: KMail sometimes won't exit (closes the windows but stays running)
Status: REPORTED
Alias: None
Product: kmail2
Classification: Applications
Component: general (show other bugs)
Version: 5.14.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-15 17:41 UTC by Thiago Macieira
Modified: 2020-07-15 17:41 UTC (History)
0 users

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 Thiago Macieira 2020-07-15 17:41:23 UTC
SUMMARY
Under certain conditions I am not sure how to reproduce reliably, but can describe, the KMail process will not exit after Ctrl+Q. All windows close, but the process stays running in the background.

This usually happens after selecting an email that, for reasons unknown, fails to be displayed. The KMail message window says it's fetching the email (from an offline-cached IMAP account, so there's nothing to be fetched) and stays there forever. No amount of time waited will get it out of this condition.

STEPS TO REPRODUCE
1. Cause the condition.
2. Exit KMail by Ctrl+Q, File > Exit or clicking the X button at the top right

OBSERVED RESULT
KMail windows close, but process stays running in the background. Forever.

EXPECTED RESULT
KMail process exits within reasonable time (less than 15 seconds).

SOFTWARE/OS VERSIONS
openSUSE Tumbleweed 20200701
Qt: 5.15.0
KDE Frameworks: 5.71.0
kf5-config: 1.0

ADDITIONAL INFORMATION
Hypothesis for the fault is the same as bug #424244: an Akonadi::Job fails to finish, holding the reference count up from 0.

In fact, using the Akonadiconsole's job tracker, I can see there's a job that never finishes. That is, by itself, a bug. But KMail needs to exit even if there's a valid reason for the job to take a long time (say, you've clicked on an email with a Blu-Ray attached on an online-IMAP account).