anacron does not execute cron.daily jobs if system is suspended between 6 and 8 am
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
anacron (Ubuntu) |
Triaged
|
Medium
|
Unassigned |
Bug Description
Binary package hint: anacron
The cron.daily jobs are not executed daily (at least update-manager fails to find new updates) if system is suspended (sleeping) between 6 am and 8 am. According to /etc/crontab cron.daily jobs are executed at 06:25 and according to /etc/cron.d/anacron anacron is run daily at 07:30. As a result, daily jobs are not executed if system is suspended over that period of time.
An easy fix would be to change /etc/cron.d/anacron to execute every hour. Such a change should not cause excessive load because 23 or 24 times a day it would simply check the timestamps for the three jobs anacron is handling and exit immediately. Granted, it would do a bit more work than the absolute minimum but it would work for sure. A more advanced fix would execute anacron while returning from suspend or hibernation but that seems to be a bit fragile (see previous bugs where such setup has been broken). I'd suggest implementing both fixes if *automatic* regression testing cannot verify that suspend and hibernation works if the system is suspended during the problematic period.
$ lsb_release -rd
Description: Ubuntu 9.04
Release: 9.04
$ apt-cache policy anacron
anacron:
Installed: 2.3-13.1ubuntu6
Candidate: 2.3-13.1ubuntu6
Version table:
*** 2.3-13.1ubuntu6 0
500 http://
100 /var/lib/
See also / possibly related to:
bug 399863
bug 366119
bug 208792
bug 249220
bug 36816
The suspend is initiated from fast user switching applet (desktop top right by default).
(Why there're so many different suspend scripts? For example, why do not /etc/acpi/suspend.d and /usr/lib/
Changed in anacron (Ubuntu): | |
importance: | Undecided → Medium |
status: | New → Triaged |
It just occurred to me that update-manager could fail after resume from suspend if network manager cannot get the network up immediately and update-manager skips looking for the updates if network is down at the moment it looks for daily update. Perhaps update-manager should be smarter to make sure that daily updates get complete daily there's daily connection to internet?