Subject: bin/10775: cron exits on stat failure
To: None <gnats-bugs@gnats.netbsd.org>
From: Kimmo Suominen <kim@tac.nyc.ny.us>
List: netbsd-bugs
Date: 08/07/2000 08:18:14
>Number: 10775
>Category: bin
>Synopsis: cron exits on stat failure
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Aug 07 08:19:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: Kimmo Suominen
>Release: 1.4.2A (2000-05-30)
>Organization:
Kimmo Suominen
>Environment:
System: NetBSD pyry.gw.com 1.4.2A NetBSD 1.4.2A (GW-GENERIC) #6: Wed May 31 06:12:46 EEST 2000 kim@pyry.gw.com:/net/pyry/src-2/NetBSD/cvsroot/src/sys/arch/i386/compile/GW-GENERIC i386
>Description:
In src/usr.sbin/cron/database.c you'll find that cron will exit if
it fails to stat the spool directory (/var/cron/tabs). I think it
should sleep and try again, and also keep processing the system
crontab file (/etc/crontab).
>How-To-Repeat:
I guess you could remove /var/cron/tabs to repeat this. On one of
my systems the stat fails occasionally (I don't know why -- resource
starvation maybe?), and cron dies. This can go unnoticed for a few
days, easily.
>Fix:
Instead of exiting, just don't try to read the indicidual crontab
files, and retry later (e.g. one minute later?).
>Release-Note:
>Audit-Trail:
>Unformatted: