Bug 144040 - pre, post actions repeated over 100 times when kalarm is restarted
Summary: pre, post actions repeated over 100 times when kalarm is restarted
Alias: None
Product: kalarm
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: David Jarvie
Depends on:
Reported: 2007-04-10 19:08 UTC by Charles Evans
Modified: 2008-07-02 15:06 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description Charles Evans 2007-04-10 19:08:07 UTC
Version:            (using KDE KDE 3.5.5)
Installed from:    Debian testing/unstable Packages
OS:                Linux

This bug effectively disables my system if kalarm is not quickly shut down.

I have several daily repeating alarms; all are set to cancel 
if late by one day.
I quit kalarm when I need to time various procedures; some run over a weekend.
When I restart kalarm, several daily alarms are now past the 1 day cancel time.
The post actions for these alarms immediately run repeatedly without any additional prompts.
They seem to run each twice at once, then after 10 seconds or so,
run twice more. 
Post actions that require interaction stay open awaiting my response.
With over 100 windows open and dozens of jobs thrashing the swap file, system response becomes very sluggish.
If I kill any jobs, new ones open immediately.
Repeated restarts of kalarm repeat fewer post actions
until eventually none run.

Many alarms are still scheduled for the day kalarm was originally
shut down, and never run again until the date is set manually to a future day.

1. uncheck actions/alarms-enabled before quitting kalarm.
2. after restarting kalarm, manually set all next run times to a
future date.
3. check actions/alarms-enabled
Comment 1 David Jarvie 2007-04-11 11:51:07 UTC
Am I right in thinking that the alarms are set to have a daily type recurrence with a recurrence interval of more than one day?

Are post actions ever executed without the alarm window having been displayed? Or is there also a problem with alarms being displayed even though they are too late and should have been cancelled?
Comment 2 David Jarvie 2007-04-14 11:57:50 UTC
I've fixed one bug whereby the alarm daemon triggers the same alarm multiple times (SVN commit 653810). This will reduce, but not yet eliminate, multiple executions of pre-alarm actions.
Comment 3 David Jarvie 2007-04-14 22:17:26 UTC
The bug concerning multiple execution of pre-alarm actions is now fixed (SVN commits 653990 and 653991).

I haven't been able to reproduce multiple execution of POST-alarm actions. Can you please confirm that this does indeed happen (as opposed to PRE-alarm actions), and provide an example calendar file which demonstrates the problem. The calendar file is $KDEHOME/share/apps/kalarm/calendar.ics .
Comment 4 Charles Evans 2007-04-15 21:44:06 UTC
Most alarms are daily with cancel if 1 day late. A few are every 3 or 4 hours.
Post-alarm actions run dozens of times each if it is time for the alarm to 
be cancelled and re-issued. 

I think the actions do alarm on first restart.
I think they run without a popup on additional restarts.
I will try to pin this down next weekend.

I have not checked out KDE source yet.
Could you please provide a sample svn command to get kalarm anonymously?

I will try to test a scaled-down calendar file next weekend, time permitting.
Thanks for the quick action!
Comment 5 David Jarvie 2007-04-16 12:42:28 UTC
I think that I may now have seen something of what you describe on login. It looks as if alarms displayed at logout are sometimes displayed so fleetingly at login that you don't see them, but they still execute the post-alarm action. The fix to prevent the alarm daemon triggering the same alarm multiple times should, I think, have helped reduce the number of multiple post-action executions as well as pre-actions. I'll investigate more, and with any luck will find a fix before next weekend.

To obtain the latest official KDE 3.5 sources (including the latest fixes), use the command:

svn co svn://anonsvn.kde.org/home/kde/branches/KDE/3.5/kdepim

This downloads the whole of kdepim. You need to run 'make -f Makefile.cvs' first on the SVN sources before running ./configure. You have to build kdepim as a whole in order to build kalarm since it contains several libraries which kalarm needs - but once the kalarm module has built, you can cancel the rest of the build if you want. See http://techbase.kde.org/Getting_Started/Build/Stable_Version for more details.
Comment 6 David Jarvie 2007-04-17 01:49:13 UTC
I've fixed another bug (bug 143891) which may have some impact on your problem. I can't see any further error, so it would be great if you could download the latest SVN sources and let me know if it now works correctly.
Comment 7 David Jarvie 2007-04-24 14:36:05 UTC
I've now issued version 1.4.11 with the corrections on the KAlarm website (http://www.astrojar.org.uk/kalarm). It's easier to build that than to download and build kdepim from SVN.
Comment 8 David Jarvie 2007-07-03 19:15:20 UTC
I will assume the bug is fixed in KDE 3.5.7 unless I hear to the contrary.