Bug 36104

Summary: Version 3.0.1-61: Duplicated jobs running within one second of each other.
Product: [Retired] Red Hat Linux Reporter: Richard Smith <rhbugs>
Component: vixie-cronAssignee: Crutcher Dunnavant <crutcher>
Status: CLOSED DUPLICATE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-04-16 23:03:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Richard Smith 2001-04-16 23:03:04 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.2.17-14smp i686)


After upgrading to version 3.0.1-61, I noticed that when a job runs just
before 00 seconds, it will be run again at 00 seconds.  A typical
/var/log/messages entry is:

Apr 16 19:00:59 holly CROND[3243]: (root) CMD (run-parts /etc/cron.hourly) 
Apr 16 19:01:00 holly CROND[3245]: (root) CMD (run-parts /etc/cron.hourly) 


Reproducible: Always
Steps to Reproduce:
1. Search /var/log/messages for cron entries running on 59 seconds, using a
search string of ':59 '.


First observed in bug number 29160 (Package does not automatically restart
crond after upgrade).  Posting as a new bug.

The problem seems to me to have been introduced by patch 15
(vixie-cron-3.0.1-time.patch).  I think the problem is caused by moving the
call to 'cron_sync()' into the main loop of the program and relying on
'cron_sync()' to provide the 60 second increment to 'TargetTime'.  The
problem is that if 'cron_sync()' is called early (i.e., at 59 seconds), it
adds 1 second instead of 60.

A quick fix would seem to be rebuilding vixie-cron-3.0.1-61 with Patch 15
commented out.

Comment 1 Bill Nottingham 2001-04-17 15:45:27 UTC

*** This bug has been marked as a duplicate of 29868 ***