Bug 392357 - kalarm thrashes hard drive forever
Summary: kalarm thrashes hard drive forever
Status: RESOLVED DUPLICATE of bug 403124
Alias: None
Product: kalarm
Classification: Applications
Component: Akonadi (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: David Jarvie
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-26 09:52 UTC by Cyp
Modified: 2019-07-29 13:31 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 Cyp 2018-03-26 09:52:25 UTC
I have kde-apps/kalarm-17.08.3, but that version isn't listed in the version multiple choice box. I don't remember exactly when the problem started, but it might have been some versions ago.

On logging in, kalarm thrashes the hard drive until stopping it by running `killall -v -9 akonadi_kalarm_resource` a few times until all threads are dead.

While today I didn't see it, another time I saw it shuffling the alarms a few times per second until killing akonadi_kalarm_resource. It's possible that only alarms which were set for the same time as each other were being shuffled with each other.

Also, when logging in, kalarm often pops up lots of old alarms that have previously been dismissed.
Comment 1 David Jarvie 2018-03-26 13:41:20 UTC
Unfortunately, this is another bug related to Akonadi which because it isn't reproducible on my system, is not really possible to investigate.

Work has started on removing the use of Akonadi for handling KAlarm calendar data. When this is complete (hopefully this year), these problems should go away.
Comment 2 Cyp 2018-03-26 14:41:56 UTC
Looking at the source for anything obvious, I suspect https://github.com/KDE/akonadi/blob/master/src/core/models/entityorderproxymodel.cpp#L110 should have something like this added:

     const int rightPosition = list.indexOf(rightValue);
 
+    if ((leftPosition < 0) != (rightPosition < 0)) {
+        return (leftPosition < 0) < (rightPosition < 0);
+    }
+
     if (leftPosition < 0 || rightPosition < 0) {

Otherwise the sort comparison function is inconsistent if at least on item has position < 0 and at least two items don't (possibly leading to A < B, B < C and C < A).

Although I don't really think it's very likely to fix this particular issue (unless the alarms are sorted by some key which is partially in a list), and not sure how to test.
Comment 3 David Jarvie 2018-03-27 20:44:17 UTC
I suggest that you send your patch to the KDE PIM mailing list, kde-pim@kde.org, where someone who works on Akonadi should see it.
Comment 4 Cyp 2019-01-06 10:52:12 UTC
Configuring kalarm to not start on startup doesn't help.

Even uninstalling kalarm completely doesn't help!

Seems kde-apps/kdepim-runtime spawns the akonadi_kalarm_resource processes even if kalarm is uninstalled. Not sure if uninstalling kdepim_runtime is a good idea, since it sounds like it's responsible for lots of stuff, and I don't know if it does anything important.
Comment 5 David Jarvie 2019-01-06 17:07:08 UTC
I think that the following procedure should prevent kalarm akonadi resources from running, although I can't guarantee that it will work.

1) Stop akonadi using the command 'akonadictl stop' in a terminal window.

2) Delete all files under ~/.config whose names begin with akonadi_kalarm_resource.

3) Restart akonadi using the command 'akonadictl start'.
Comment 6 David Jarvie 2019-07-29 13:31:42 UTC

*** This bug has been marked as a duplicate of bug 403124 ***