Need help understanding this message



The help I need is what I might call 'deep' help. I know 'who'
is sending the message, and why, but how do I fix the problem?

Included is an email that I get from the daily cron job on a
host that I have named 'gq'. I have two other machines that never send
this message. All are similarly configured Lenny installations.
This is the text of the email, including a few headers:
############################## start
From: Cron Daemon <root@xxxxxxxxxx>
Date: Mon, 02 Mar 2009 04:41:00 -0700
To: root@xxxxxxxxxx
Subject: Cron <root@gq> test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.daily )

/etc/cron.daily/mlocate:
/usr/bin/updatedb.mlocate: `/var/lib/mlocate/mlocate.db' is locked (probably by
+an earlier updatedb)
run-parts: /etc/cron.daily/mlocate exited with return code 1
#####################################################(END)

I include here, for reference a copy of cron.daily/mlocate:
############################## start
#! /bin/bash

set -e

[ -x /usr/bin/updatedb.mlocate ] || exit 0

##

LOCKFILE="/var/lib/mlocate/daily.lock"

trap "rm -f $LOCKFILE" EXIT

if [ -e "$LOCKFILE" ]; then
echo >&2 "Warning: $LOCKFILE present, not running today."
exit 1
else
touch "$LOCKFILE"
fi

##

# See ionice(1)
if [ -x /usr/bin/ionice ] &&
/usr/bin/ionice -c3 true 2>/dev/null; then
IONICE="/usr/bin/ionice -c3"
fi

$IONICE /usr/bin/updatedb.mlocate
#####################################################(END)

The reported event happens early in the morning. When I first check my
email, I immediately check for a lock file where this little script is
programmed to place it. It does not exist. I also note that the error
message that this script is programmed to issue, is not the error
message that I actually recieve in the email. mlocate.db has an mtime
stamp from Feb 25, so clearly I need to fix something, but what? The
code of the script /etc/cron.daily/mlocate is exactly the same on all
three machines. Could a bad execution of 'trap' somehow corrupted an
OS internal table? How can I check what traps are set? Where is the
message, that I get, actually being generated? Etc.? I suppose I could
just reboot the machine, but I'd like to understand.

TIA
--
Paul E Condon
pecondon@xxxxxxxxxxxxxxxx


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: Python doesnt understand %userprofile%
    ... bites back with "cannot find the path specified" Since my script has ... to run on machines where the username is unspecified I need a fix. ...
    (comp.lang.python)
  • RE: Word
    ... So far so good, the regedit does fix the problem, I was able o fix greater ... than 10 machines by running a script to remove the Data entry. ...
    (microsoft.public.word.application.errors)
  • RE: Constant APP Crash
    ... So far so good, the regedit does fix the problem, I was able o fix greater ... than 10 machines by running a script to remove the Data entry. ...
    (microsoft.public.office.misc)
  • Re: cscript runs too slow
    ... Running McAfee 8.0i caused cscript to pause at the end of the script on ... my machines. ... Download WSH 5.6.0.8825 to fix the problem... ...
    (microsoft.public.scripting.wsh)
  • lk-changelog.pl 0.167
    ... This script is used by Linus and Marcelo to rearrange and reformat BK ... fix obfuscation of unknown addresses in terse/oneline modes ... Bryan O'Sullivan's address got hosed. ... $indent is auto-generated from $indent1. ...
    (Linux-Kernel)