Bug 194236 - Hourly cron jobs running too early
Summary: Hourly cron jobs running too early
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 10.0-RELEASE
Hardware: i386 Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-08 08:31 UTC by Uffe Jakobsen
Modified: 2014-10-09 03:45 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Uffe Jakobsen 2014-10-08 08:31:22 UTC
Seen on FreeBSD 10.0-RELEASE-p9 i386

After upgrading from 9.2-RELEASE-p12 (i386) to 10.0-RELEASE-p9 (i386)

cron runs hourly jobs up to a minutte too early.

This causes tasks like newsyslog to skip logrotation at the intended time - rotation will occour one hour delayed.

It has been discussed here:

http://lists.freebsd.org/pipermail/freebsd-stable/2014-June/079106.html

and is reported solved - but I'm seeing the problem on latest official patch level (10.0-RELEASE-p9)

Note: This seems to be an i386 problem only - as the equivalent amd64 installations runs hourly cron at the exact time.

# uname -a
FreeBSD asuseee 10.0-RELEASE-p9 FreeBSD 10.0-RELEASE-p9 #0: Mon Sep 15 14:32:29 UTC 2014     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386


BEFORE upgrade (running 9.2-RELEASE-p12 (i386))

# cat /var/log/cron | grep newsyslog

Oct  5 13:00:00 smtpd /usr/sbin/cron[11742]: (root) CMD (newsyslog)
Oct  5 14:00:00 smtpd /usr/sbin/cron[12271]: (root) CMD (newsyslog)
Oct  5 15:00:00 smtpd /usr/sbin/cron[12995]: (root) CMD (newsyslog)
Oct  5 16:00:00 smtpd /usr/sbin/cron[13595]: (root) CMD (newsyslog)
Oct  5 17:00:00 smtpd /usr/sbin/cron[14654]: (root) CMD (newsyslog)
Oct  5 18:00:00 smtpd /usr/sbin/cron[15614]: (root) CMD (newsyslog)
Oct  5 19:00:00 smtpd /usr/sbin/cron[16319]: (root) CMD (newsyslog)
Oct  5 20:00:00 smtpd /usr/sbin/cron[17884]: (root) CMD (newsyslog)
Oct  5 21:00:00 smtpd /usr/sbin/cron[38642]: (root) CMD (newsyslog)
Oct  6 00:00:00 smtpd /usr/sbin/cron[20850]: (root) CMD (newsyslog)

AFTER upgrade (running 10.0-RELEASE-p9 (i386))

# cat /var/log/cron | grep newsyslog

Oct  6 00:59:42 smtpd /usr/sbin/cron[7632]: (root) CMD (newsyslog)
Oct  6 01:59:38 smtpd /usr/sbin/cron[6222]: (root) CMD (newsyslog)
Oct  6 02:59:34 smtpd /usr/sbin/cron[7616]: (root) CMD (newsyslog)
Oct  6 03:59:34 smtpd /usr/sbin/cron[9793]: (root) CMD (newsyslog)
Oct  6 04:59:38 smtpd /usr/sbin/cron[10369]: (root) CMD (newsyslog)
Oct  6 05:58:55 smtpd /usr/sbin/cron[10897]: (root) CMD (newsyslog)
Oct  6 06:59:34 smtpd /usr/sbin/cron[11420]: (root) CMD (newsyslog)
Oct  6 07:58:55 smtpd /usr/sbin/cron[11848]: (root) CMD (newsyslog)
Oct  6 08:59:51 smtpd /usr/sbin/cron[12478]: (root) CMD (newsyslog)
Oct  6 09:59:47 smtpd /usr/sbin/cron[12995]: (root) CMD (newsyslog)
Oct  6 10:58:42 smtpd /usr/sbin/cron[13733]: (root) CMD (newsyslog)
Oct  6 11:58:55 smtpd /usr/sbin/cron[14416]: (root) CMD (newsyslog)
Oct  6 12:59:34 smtpd /usr/sbin/cron[15188]: (root) CMD (newsyslog)
Oct  6 13:59:29 smtpd /usr/sbin/cron[15935]: (root) CMD (newsyslog)
Oct  6 14:59:38 smtpd /usr/sbin/cron[16440]: (root) CMD (newsyslog)
Oct  6 15:59:42 smtpd /usr/sbin/cron[17655]: (root) CMD (newsyslog)
Oct  6 16:59:47 smtpd /usr/sbin/cron[18513]: (root) CMD (newsyslog)
Oct  6 17:59:34 smtpd /usr/sbin/cron[19025]: (root) CMD (newsyslog)
Oct  6 18:59:47 smtpd /usr/sbin/cron[19916]: (root) CMD (newsyslog)
Oct  6 20:00:00 smtpd /usr/sbin/cron[20624]: (root) CMD (newsyslog)
Oct  6 20:59:29 smtpd /usr/sbin/cron[21680]: (root) CMD (newsyslog)
Oct  6 21:59:34 smtpd /usr/sbin/cron[22962]: (root) CMD (newsyslog)
Oct  6 22:59:38 smtpd /usr/sbin/cron[23582]: (root) CMD (newsyslog)
Oct  6 23:59:47 smtpd /usr/sbin/cron[24275]: (root) CMD (newsyslog)
Oct  7 00:59:47 smtpd /usr/sbin/cron[24988]: (root) CMD (newsyslog)
Oct  7 01:59:34 smtpd /usr/sbin/cron[25758]: (root) CMD (newsyslog)
Oct  7 02:59:21 smtpd /usr/sbin/cron[26291]: (root) CMD (newsyslog)
Oct  7 03:59:47 smtpd /usr/sbin/cron[28272]: (root) CMD (newsyslog)
Oct  7 05:00:00 smtpd /usr/sbin/cron[28715]: (root) CMD (newsyslog)
Oct  7 05:59:12 smtpd /usr/sbin/cron[29252]: (root) CMD (newsyslog)
Oct  7 06:58:46 smtpd /usr/sbin/cron[29821]: (root) CMD (newsyslog)
Oct  7 07:59:51 smtpd /usr/sbin/cron[30357]: (root) CMD (newsyslog)
Oct  7 08:59:34 smtpd /usr/sbin/cron[31222]: (root) CMD (newsyslog)
Oct  7 09:59:51 smtpd /usr/sbin/cron[31980]: (root) CMD (newsyslog)
Oct  7 10:59:47 smtpd /usr/sbin/cron[32710]: (root) CMD (newsyslog)
Oct  7 11:59:51 smtpd /usr/sbin/cron[33278]: (root) CMD (newsyslog)
Oct  7 12:59:55 smtpd /usr/sbin/cron[33832]: (root) CMD (newsyslog)
Oct  7 13:59:34 smtpd /usr/sbin/cron[34276]: (root) CMD (newsyslog)
Oct  7 14:59:51 smtpd /usr/sbin/cron[34833]: (root) CMD (newsyslog)
Oct  7 15:59:21 smtpd /usr/sbin/cron[35492]: (root) CMD (newsyslog)
Oct  7 16:58:42 smtpd /usr/sbin/cron[36213]: (root) CMD (newsyslog)
Oct  7 17:59:42 smtpd /usr/sbin/cron[37072]: (root) CMD (newsyslog)
Oct  7 18:59:47 smtpd /usr/sbin/cron[37958]: (root) CMD (newsyslog)
Oct  7 19:59:47 smtpd /usr/sbin/cron[38780]: (root) CMD (newsyslog)
Oct  7 20:59:12 smtpd /usr/sbin/cron[39330]: (root) CMD (newsyslog)
Oct  7 21:58:55 smtpd /usr/sbin/cron[40561]: (root) CMD (newsyslog)
Oct  7 22:59:55 smtpd /usr/sbin/cron[41477]: (root) CMD (newsyslog)
Oct  7 23:59:25 smtpd /usr/sbin/cron[47064]: (root) CMD (newsyslog)
Comment 1 Andrey A. Chernov freebsd_committer freebsd_triage 2014-10-08 08:54:38 UTC
I can't reproduce this problem on i386 -stable (10.1-RC1)
My /var/cron/log show exact times.
Looks like cron is not updated, first check cron.c have svn version 261231.
Then try to run cron with -x for debugging and search for suspicious results, see cron(8)
Comment 2 Uffe Jakobsen 2014-10-09 01:50:39 UTC
It took some time as I had to perform an upgrade on a similar i386 appliance not running production.
I can verify that the problem seems to be fixed on 10.1-RC1 i386 - here cron again runs as it should.

A pity that the fix wasn't back-ported to one of the 10.0-RELEASE-px patch-releases - the effect of the problem seems serious enough for that.

Anyway this case can be closed.
Comment 3 Andrey A. Chernov freebsd_committer freebsd_triage 2014-10-09 03:45:49 UTC
Close per submitter request.