APT daily cronjobs hangs, prevents other cronjobs to be executed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Hi,
I've created a cronjob in /etc/cron.daily (a very simple mysqldump) and have been looking for weeks why it wouldnt execute... Following the advice of a friend I run:
sudo su -
run-parts --report /etc/cron.daily
Which seemed to hang completely. I straced the process, and it seemed it was hanging on the APT cron job;
access(
pipe([3, 4]) = 0
pipe([5, 6]) = 0
clone(child_
close(4) = 0
close(6) = 0
select(6, [3 5], NULL, NULL, NULL
I removed the APT cronjob and now the run-parts works fine... would be worth testing but I wonder if all the cronjobs following /etc/cron.daily/apt are executed properly...
Maybe this bug is linked to https:/
I am using Jeos 8.04 built with uvb - tell me if I can provide any additional information, thanks!
I had the same problem. To solve it, I narrowed the search to the function random_sleep...... It sleeps....... 30 min????
# sleep for a random intervall of time (default 30min) =1800 :RandomSleep)
# (some code taken from cron-apt, thanks)
random_sleep()
{
RandomSleep
eval $(apt-config shell RandomSleep APT::Periodic:
if [ $RandomSleep -eq 0 ]; then
return
fi
if [ -z "$RANDOM" ] ; then
# A fix for shells that do not have this bash feature.
RANDOM=$(dd if=/dev/urandom count=1 2> /dev/null | cksum | cut -c"1-5")
fi
TIME=$(($RANDOM % $RandomSleep))
sleep $TIME
}
Very odd, I just commented it at apt, line 222, and It's working again.