Bug 398407 - undeleted email with empty message body causes excessive cpu use
Summary: undeleted email with empty message body causes excessive cpu use
Status: RESOLVED WORKSFORME
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: MBox Resource (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-08 22:22 UTC by jms.daley
Modified: 2023-01-02 05:29 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Script to find maildir messages with empty bodies (563 bytes, text/x-python)
2018-11-13 22:32 UTC, Paul Eggleton
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jms.daley 2018-09-08 22:22:46 UTC
email in a mbox with an empty message body causes continuous cpu use by mbox_resource, akonadiserver & mysqld. Deleting the message in kontact causes the cpu use to return to normal.

fully updated kubuntu 18.04
Comment 1 Paul Eggleton 2018-11-13 22:32:32 UTC
Created attachment 116292 [details]
Script to find maildir messages with empty bodies

I've had this same issue with a local maildir for about a week - high CPU usage persisting over reboots and akonadi restarts with mysqld and akonadi processes using up most of the available CPU time.

I had some rules set up to move messages from an IMAP folder to the local maildir when they get to a certain age, but for some reason some of the moved messages ended up with an empty body when they arrived in the maildir, and these messages seemed to be tripping up akonadi (not at the time of moving - just by being present at the destination). This was visible via akonadiconsole - I could see the message IDs by enabling the debugger briefly, then I could use the DB Query tab to find the messages with those ids in the pimitemtable, and the "rev" field was constantly incrementing. Oddly I could not see those messages in the "Browser" tab, but at least some of them were visible in KMail.

In order to work around the issue I wrote a script (attached) to find messages with an empty body in a specific directory (in my case, ~/.local/share/local-mail/inbox/new/ ) and then I moved the listed files out somewhere else. Shortly thereafter the machine calmed down, though I did have to finally run akonadictl restart to stop mysqld from using ~90% CPU so presumably there was still an expensive query running.
Comment 2 Paul Eggleton 2018-11-13 22:35:08 UTC
I forgot to mention in the preceding comment - my system is Fedora 28 and is up-to-date.
Comment 3 Justin Zobel 2022-12-03 09:01:39 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 4 Bug Janitor Service 2022-12-18 05:15:01 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Bug Janitor Service 2023-01-02 05:29:02 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!