First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 45155
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Aron Griffis (RETIRED) <agriffis@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Mathias Gumz <akira@fluxbox.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
run-crons new run-crons version text/plain Mathias Gumz 2004-03-19 12:34 0000 1.91 KB Details
run-crons new run-crons version text/plain Mathias Gumz 2004-03-19 12:36 0000 1.98 KB Details
run-crons better version with non-racy locking text/plain Aron Griffis (RETIRED) 2004-05-06 15:25 0000 2.51 KB Details
run-crons added credit text/plain Aron Griffis (RETIRED) 2004-05-06 15:27 0000 2.57 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 45155 depends on: Show dependency tree
Bug 45155 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: 2004-03-19 12:33 0000
with the default cronbase i get a lot of mail when running vixie-cron, created
by the /usr/sbin/run-crons program/script. basicly it comes from the
lock-mechanism. i did some minor changes to the script and now it runs smoothly
and without any probs as far as i can see.

mail output from unfixed cron-messages:

+----------------------------------------------------------
X-Original-To: root                                                             
Delivered-To: root@localhost
From: Cron Daemon <root@localhost>
To: root@localhost
Subject: Cron <root@localhost> test -x /usr/sbin/run-crons &&
/usr/sbin/run-crons
X-Cron-Env: <SHELL=/bin/bash>
X-Cron-Env: <PATH=/sbin:/bin:/usr/sbin:/usr/bin>
X-Cron-Env: <MAILTO=root>
X-Cron-Env: <HOME=/>
X-Cron-Env: <LOGNAME=root>
Date: Fri, 19 Mar 2004 21:04:00 +0100 (CET)

cat: /var/spool/cron/lastrun/lock: No such file or directory
+----------------------------------------------------------

i ll attach my version. basic problem is imho that another cron-process comes
between the 

[ -f lockfile ]

and the grabbing for the pid out of the lockfile.

regards,
mathias

Reproducible: Always
Steps to Reproduce:
1.
2.
3.

------- Comment #1 From Mathias Gumz 2004-03-19 12:34:05 0000 -------
Created an attachment (id=27641) [edit]
new run-crons version

------- Comment #2 From Mathias Gumz 2004-03-19 12:35:31 0000 -------
(From update of attachment 27641 [edit])
damn, this is the original :) 

------- Comment #3 From Mathias Gumz 2004-03-19 12:36:38 0000 -------
Created an attachment (id=27642) [edit]
new run-crons version

------- Comment #4 From Aron Griffis (RETIRED) 2004-05-06 15:25:31 0000 -------
Created an attachment (id=30876) [edit]
better version with non-racy locking

I'll get this in once I actually test it

------- Comment #5 From Aron Griffis (RETIRED) 2004-05-06 15:26:29 0000 -------
Sorry, I'll make sure to add you to the credits too... My code includes some of
your changes.

------- Comment #6 From Aron Griffis (RETIRED) 2004-05-06 15:27:53 0000 -------
Created an attachment (id=30877) [edit]
added credit

------- Comment #7 From Mathias Gumz 2004-05-06 20:19:09 0000 -------
works ok so far except for the warning that in line 32 the -lt is syntactilly
wrong ... 

((i=0; i < 2; i=i+1))

should do the trick,

regards,
mathias

------- Comment #8 From Duke 2004-05-16 20:18:46 0000 -------
I'm getting mail with the "kill" usage output:

Usage:                                                                          
  kill pid ...              Send SIGTERM to every process listed.               
  kill signal pid ...       Send a signal to every process listed.              
  kill -s signal pid ...    Send a signal to every process listed.              
  kill -l                   List all signal names.                              
  kill -L                   List all signal names in a nice table.              
  kill -l signal            Convert between signal numbers and names.           

I'm assuming it's because the lockfile doesn't exist, so in run-crons when it gets to the line

if `kill -0 $cronpid >/dev/null 2>&1`

$cronpid is empty, so kill outputs the usage info.  But, shouldn't the line

if test -f /var/spool/cron/lastrun/lock

keep it from getting to that point without a pid?

Is the problem I'm experiencing related to this bug?

------- Comment #9 From Aron Griffis (RETIRED) 2004-05-24 20:55:37 0000 -------
Ok, it's in portage as cronbase-0.3.  And yes Duke, this should solve the
problem you described.

------- Comment #10 From Duke 2004-05-24 20:58:46 0000 -------
Thank you!

First Last Prev Next    No search results available      Search page      Enter new bug