Bug 317656

Summary: Postponed reminders are sometimes lost when KOrganizer/Kontact/korgac are shut down
Product: [Applications] korganizer Reporter: gidantribal <aedo999>
Component: reminder daemon (korgac)Assignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: bingmybong, chealer, gjditchfield, ianseeks, isr81, kdenis, winter
Priority: NOR    
Version: 5.3.3   
Target Milestone: ---   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=282535
https://bugs.kde.org/show_bug.cgi?id=332448
Latest Commit: Version Fixed In:

Description gidantribal 2013-03-31 23:10:32 UTC
Using KDE 4.9.5 and korganizer 4.9.5, I'm having a problem with suspended reminders being forgotten after logout. What I've tried is:

-    Create an Event and set a reminder.
-    Wait until the reminder pops up.
-    Suspend the reminder for a few minutes.
-    Repeat wait/suspend a few times to see that the reminders do keep popping up after the suspend time is over.
-    After suspending the reminder, logout and login again.
-    Wait until after the reminder should have popped up again.

Doing the above, after logout/login, I never see a popup for that reminder again. Other Events or ToDos will cause reminders to popup, but reminders for the suspended one are never seen again.

This affect the reliability of the reminders: I have to switch back to thunderbird/sunbird, which works perfectly from this point of view, but doing this only for this reason is a pity.

Thanks.
Comment 1 Allen Winter 2013-06-09 01:03:28 UTC
this should have been fixed sometime in KDE 4.10 timeframe.

if the bug reappears when you are using KDE 4.10.3 or above please reopen.
Comment 2 Ioannis Ramfos 2013-09-26 09:21:23 UTC
Please reopen, as it does not seem to work for 4.11.1 once again, following the same steps as described initially.
I am using Kubuntu backports ppa on Kubuntu 12.10 and I remember that it used to work correctly after logouts/reboots for a version prior to 4.11.1, perhaps 4.11.0, but most probably 4.10.5 (not quite sure which update broke it).
Comment 3 Denis Kurz 2016-08-31 18:08:49 UTC
*** Bug 356429 has been marked as a duplicate of this bug. ***
Comment 4 Denis Kurz 2016-08-31 18:09:32 UTC
*** Bug 332448 has been marked as a duplicate of this bug. ***
Comment 5 Denis Kurz 2016-09-21 09:48:26 UTC
The bug was confirmed for version 5.2.2 in bug 356429.
Comment 6 BingMyBong 2016-12-16 12:34:16 UTC
This still happens in the latest release.

opensuse:tumbleweed:20161214
Qt: 5.7.0
KDE Frameworks: 5.29.0
KDE Plasma: 5.8.4
kwin5-5.8.4-171.1.x86_64 (5.3.3)
kmail5-16.08.3-1.1.x86_64
Kernel:  4.8.13-1-default
Comment 7 BingMyBong 2017-01-09 09:52:51 UTC
This still happens in the latest release.
Qt: 5.7.1
KDE Frameworks: 5.29.0
KDE Plasma: 5.8.5
kwin5-5.8.5-172.1.x86_64
Kernel:  4.9.0-2-default
Comment 8 Philippe Cloutier 2019-07-20 16:23:22 UTC
Having used KOrganizer for 15 years, I can definitely confirm that its reminders are unreliable. However, I never understood how to reproduce loss, and I could not reproduce with a logout. Both a reminder I set to trigger while my session was closed and one set to trigger after I opened a new session "popped up" fine, under Kubuntu 19.04 (KOrganizer 5.10.3, KDE Frameworks 5.56.0).

Can one of you still reproduce this, and if so, which distribution do you use? And if so, does this affect events only or todo-s too?
Comment 9 BingMyBong 2019-07-21 06:13:49 UTC
(In reply to Filipus Klutiero from comment #8)
> Having used KOrganizer for 15 years, I can definitely confirm that its
> reminders are unreliable. However, I never understood how to reproduce loss,
> and I could not reproduce with a logout. Both a reminder I set to trigger
> while my session was closed and one set to trigger after I opened a new
> session "popped up" fine, under Kubuntu 19.04 (KOrganizer 5.10.3, KDE
> Frameworks 5.56.0).
> 
> Can one of you still reproduce this, and if so, which distribution do you
> use? And if so, does this affect events only or todo-s too?

It no longer happens for me.  I thought this had been closed. I don't use To-dos.
Comment 10 Philippe Cloutier 2019-07-29 11:58:10 UTC
I must confirm that this affects both Debian 9 and Kubuntu 19.04 (KOrganizer 5.10.3). However, when KOrganizer is shut down (or restarted), either this issue happens, or it does not happen. When it happens, all suspended reminders fail to display. When it does not happen, all suspended reminders do display. And in some cases, all fail to display, but display when KOrganizer is restarted again.

Unfortunately, I have no idea when each case occurs. I tried with 1 or 2 suspended reminders, and it happened in both cases. I tried with suspended reminder postponed until a time before or after korgac's restart, and it happened in both cases.
However, ticket #282535 documents that this was completely broken after the switch to Akonadi: https://bugs.kde.org/show_bug.cgi?id=282535
But the contributor who developed the fix was not familiar with Akonadi, and wasn't sure the fix would always work. korgac's communication with Akonadi appears to be quite a hack:

    // Check if Akonadi is already configured
    const QString akonadiConfigFile = Akonadi::ServerManager::serverConfigFilePath(
        Akonadi::ServerManager::ReadWrite);
    if (QFileInfo::exists(akonadiConfigFile)) {
        // Akonadi is configured, create ETM and friends, which will start Akonadi
        // if its not running yet
        setupAkonadi();
    } else {
        // Akonadi has not been set up yet, wait for someone else to start it,
        // so that we don't unnecessarily slow session start up
        connect(Akonadi::ServerManager::self(), &Akonadi::ServerManager::stateChanged,
                this, [this](Akonadi::ServerManager::State state) {
            if (state == Akonadi::ServerManager::Running) {
                setupAkonadi();
            }
        });
    }

There's also a doubtful if in KOAlarmClient::checkAlarms():
    // We do not want to miss any reminders, so don't perform check unless
    // the collections are available and populated.
    if (!collectionsAvailable()) {
        qCDebug(KOALARMCLIENT_LOG) << "Collections are not available; aborting check.";
        return;
    }

Unfortunately, I can't find what goes in KOALARMCLIENT_LOG on my session, so I can't use the logs to determine if that's the problem.
Comment 11 Peter Gückel 2019-08-06 15:19:00 UTC
By the way, I am now using Fedora 30 with korganizer-19.04.2-1.fc30.x86_64.
Comment 12 Peter Gückel 2019-08-06 16:44:03 UTC
It seems that the package number and application number are not the same: I have Korganizer 5.11.2.

Anyway, I did in fact just create an amnesia test and I suspended the computer before and resumed after the trigger time and the reminder DID NOT occur upon system resumption. I believe this is an error, as important reminders will simply be lost.

[I use Korganizer daily for important reminders, such as renewal times for my passports, registration renewals for my motorcycles and truck, firearms license renewals, recurring sports classes, monthly condo fee and credit card payments, etc.—basically anything that recurs on a longterm and recurring basis. I am on my laptop a lot and these reminders are VERY IMPORTANT to me. I use android's calendar on my phone primarily for one-time reminders, like doctor's appointments, dentist, bankers, etc.—things I need to plan my day and prevent future appointment conflicts.]
Comment 13 Peter Gückel 2019-08-06 17:53:59 UTC
OK, I made a mistake with the first test. I set the reminder, but I forgot to set a trigger time. I just ran another test. I verified the calendar.ics file and it was shown and so was a triger time. I even manually clicked Update Calendar on the lower left panel of korganizer, because I just never know how often akonadi and calendar.ics get synced (but it appears to be immediate). Anyway, I did not log out, I just unplugged the laptop and closed the lid. I waited until 5 minutes after the trigger time and no reminder appeared. The reminder seems to be lost. What is curious, is that I created the appointment to begin at 11:15 and end at 11:30, but it did not show in the main (right) panel in korganizer, even though it was in calendar.ics (I verified with kwrite). Is this because the appointment was only 15 minutes in duration, too skinny for display? I verified and I definitely had left the 'blocks from other appointments' box (don't recall exact name) in the default activated setting.

I will run some more tests tomorrow (enough for today), but I think this problem persists!
Comment 14 Philippe Cloutier 2019-08-07 00:58:02 UTC
(In reply to Peter Gückel from comment #13)
> OK, I made a mistake with the first test. I set the reminder, but I forgot
> to set a trigger time. I just ran another test. I verified the calendar.ics
> file and it was shown and so was a triger time. I even manually clicked
> Update Calendar on the lower left panel of korganizer, because I just never
> know how often akonadi and calendar.ics get synced (but it appears to be
> immediate). Anyway, I did not log out, I just unplugged the laptop and
> closed the lid. I waited until 5 minutes after the trigger time and no
> reminder appeared. The reminder seems to be lost. What is curious, is that I
> created the appointment to begin at 11:15 and end at 11:30, but it did not
> show in the main (right) panel in korganizer, even though it was in
> calendar.ics (I verified with kwrite). Is this because the appointment was
> only 15 minutes in duration, too skinny for display? I verified and I
> definitely had left the 'blocks from other appointments' box (don't recall
> exact name) in the default activated setting.
> 
> I will run some more tests tomorrow (enough for today), but I think this
> problem persists!

Thanks but I am afraid that problem is different. The issue tracked in this ticket is about postponed reminders (reminders can only be postponed after they initially trigger).

A 15 minutes duration is sufficient for events to display in the monthly view. But you can create a longer event if you want to be sure.
Comment 15 Peter Gückel 2019-08-07 05:25:47 UTC
(In reply to Filipus Klutiero from comment #14)
> Thanks but I am afraid that problem is different. The issue tracked in this
> ticket is about postponed reminders (reminders can only be postponed after
> they initially trigger).
> 
> A 15 minutes duration is sufficient for events to display in the monthly
> view. But you can create a longer event if you want to be sure.

If this is only about postponed reminders, then why is my "different" bug #332448, as you indicate, listed as a duplicate of this one?
Comment 16 Philippe Cloutier 2019-08-07 12:01:30 UTC
(In reply to Peter Gückel from comment #15)
> (In reply to Filipus Klutiero from comment #14)
> > Thanks but I am afraid that problem is different. The issue tracked in this
> > ticket is about postponed reminders (reminders can only be postponed after
> > they initially trigger).
> > 
> > A 15 minutes duration is sufficient for events to display in the monthly
> > view. But you can create a longer event if you want to be sure.
> 
> If this is only about postponed reminders, then why is my "different" bug
> #332448, as you indicate, listed as a duplicate of this one?

I am trying to clarify the bug reported in ticket #332448 so the ticket can be properly triaged.
Comment 17 Philippe Cloutier 2019-10-14 02:21:31 UTC
I just tested this once more and KOrganizer did not lose the reminders. When KOrganizer started, it displayed the 2 reminders which it was supposed to show. There was 1 event reminder, and 1 task reminder. I postponed these reminders again, and later restarted KOrganizer again. KOrganizer then lost both reminders. However, I had reminders other than these 2 trigger between the time when I started KOrganizer and closed it. If someone sees KOrganizer has remembered postponed reminders when it starts, please immediately restart and report whether it managed to keep these reminders, so that we can figure out whether the nature of the postponed reminders is what determines whether or not this bug occurs.

Also, please increase this ticket's importance to at least major.
Comment 18 Philippe Cloutier 2019-10-16 12:13:16 UTC
I just managed to not reproduce this once more. I suspended 1 recurrent reminder for 1 hour, then closed KOrganizer. Many hours later, I (re)started KOrganizer, and it displayed 2 reminders: the suspended reminder and another recurrent reminder which had triggered in the meantime.

I then suspended both reminders (individually) for 1 hour, and immediately restarted KOrganizer. Both reminders had disappeared, so no reminder appeared at launch.
Comment 19 gjditchfield 2022-05-20 02:36:25 UTC
korgac has been replaced by a new reminder daemon, kalendarac.
Please watch for unreliable reminders and report them as bugs for
product "Reminder Daemon".