Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 10409
Alias:
Product:
Component:
Status: RESOLVED
Resolution: DUPLICATE of bug 8506
Assigned To: Gentoo Linux bug wranglers <bug-wranglers@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: José Fonseca <j_r_fonseca@yahoo.co.uk>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
run-crons.diff run-crons.diff patch José Fonseca 2002-11-07 18:43 0000 399 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 10409 depends on: Show dependency tree
Bug 10409 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2002-11-07 18:42 0000
There seems to be some kind of race-condition in /usr/bin/run-crons which
causes
the script to miss /var/spool/cron/lastrun/cron.hourly right under its nose,
and
root receives frequently emails all like:

------------------------------------------------------------------------
From root@localhost.localdomain  Thu Nov  7 19:00:01 2002                      

Return-Path: <root@localhost.localdomain>                                      

Delivered-To: root@localhost.localdomain                                       

Received: by localhost.localdomain (Postfix, from userid 0)                    

        id 6301227FA1; Thu,  7 Nov 2002 19:00:01 +0000 (WET)                   

From: root@localhost.localdomain (Cron Daemon)                                 

To: root@localhost.localdomain                                                 

Subject: Cron <root@localhost> test -x /usr/sbin/run-crons &&
/usr/sbin/run-crons           
X-Cron-Env: <SHELL=/bin/sh>                                                    

X-Cron-Env: <HOME=/root>                                                       

X-Cron-Env: <PATH=/usr/bin:/bin>                                               

X-Cron-Env: <LOGNAME=root>                                                     

Message-Id: <20021107190001.6301227FA1@localhost.localdomain>                  

Date: Thu,  7 Nov 2002 19:00:01 +0000 (WET)                                    

Status: RO                                                                     

Content-Length: 69                                                             

Lines: 1                                                                       



find: /var/spool/cron/lastrun/cron.hourly: No such file or directory           

------------------------------------------------------------------------

The race condition is not really a big deal. The constant mails are.

A easy solution is to replace

    find /var/spool/cron/lastrun/cron.$BASE $TIME -exec rm {} \;

by

    find /var/spool/cron/lastrun/ -name cron.$BASE $TIME -exec rm {} \;

and find will no longer complaint if it can't find the cron.hourly file and
everything will proceed as normal.

------- Comment #1 From José Fonseca 2002-11-07 18:43:54 0000 -------
Created an attachment (id=5464) [details]
run-crons.diff

------- Comment #2 From SpanKY 2002-11-07 20:11:45 0000 -------

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

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug