[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Multiple processes started when explicit start commands areused on d
From: |
P Holdaway |
Subject: |
RE: Multiple processes started when explicit start commands areused on dependant processes. |
Date: |
Mon, 30 Jan 2006 11:14:15 -0800 |
Hi,
Does this mean that you could indeed reproduce the problem with the
original run.sh script?
The run.sh script is fairly typical of scripts found in /etc/init.d where
the script exits normally and does not exec.
Making the change you suggested I now find that I get two processes on
startup.
Note that I am *not* using "monit start all" to start all the processors
but I am issuing a "monit start" command for each process separately.
The machine I am using for this testing is a SunBlade 150 with an
UltraSparc IIIi processor @ 650MHz. Perhaps the relative poor performance of
this machine makes the problem more reproducible?
Conceptually, does the code make an effort to block other start/stop
process commands while the start/stop of a dependency tree is executing?
Here is the log I see at startup...
[ Jan 30 10:59:24] 'a' start: /tmp/monit/run.sh
[ Jan 30 10:59:24] Monitoring enabled -- service a
[ Jan 30 10:59:24] 'b8' start: /tmp/monit/run.sh
[ Jan 30 10:59:24] Monitoring enabled -- service b8
[ Jan 30 10:59:24] 'b7' start: /tmp/monit/run.sh
[ Jan 30 10:59:24] Monitoring enabled -- service b7
[ Jan 30 10:59:24] 'b6' start: /tmp/monit/run.sh
[ Jan 30 10:59:24] Monitoring enabled -- service b6
[ Jan 30 10:59:24] 'b5' start: /tmp/monit/run.sh
[ Jan 30 10:59:24] Monitoring enabled -- service b5
[ Jan 30 10:59:24] 'b4' start: /tmp/monit/run.sh
[ Jan 30 10:59:24] Monitoring enabled -- service b4
[ Jan 30 10:59:24] 'b3' start: /tmp/monit/run.sh
[ Jan 30 10:59:24] Monitoring enabled -- service b3
[ Jan 30 10:59:24] 'b2' start: /tmp/monit/run.sh
[ Jan 30 10:59:24] Monitoring enabled -- service b2
[ Jan 30 10:59:24] 'b1' start: /tmp/monit/run.sh
[ Jan 30 10:59:24] Monitoring enabled -- service b1
[ Jan 30 10:59:24] 'b1' start: /tmp/monit/run.sh
[ Jan 30 10:59:24] monit: Process already running -- process b2
[ Jan 30 10:59:24] monit: Process already running -- process b3
[ Jan 30 10:59:24] monit: Process already running -- process b4
[ Jan 30 10:59:24] monit: Process already running -- process b5
[ Jan 30 10:59:24] monit: Process already running -- process b6
[ Jan 30 10:59:24] monit: Process already running -- process b7
[ Jan 30 10:59:24] monit: Process already running -- process b8
Regards,
Peter
> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden
> On Behalf Of Jan-Henrik Haukeland
> Sent: Saturday, 28 January 2006 4:48 PM
> To: This is the general mailing list for monit
> Subject: Re: Multiple processes started when explicit start commands
> areused on dependant processes.
>
>
> On 27. jan. 2006, at 20.36, P Holdaway wrote:
>
> > There appears to be a race condition when issuing monit start
> > commands on
> > processes that are dependant on each other.
> >
> > To illustrate...
> >
> > Given processes b1 to b8 are dependant on process a.
> >
> > If I stop all processes and then issue a separate start command
> > for each
> > process, I see in monit.log that the process b1 is being started
> > twice. Once
> > as a result of the dependency on process a, and once because of an
> > explicit
> > start command.
> >
> > I have attached some files to help reproduce this problem.
>
>
> You have a bug in your run.sh script I think. If I use this,
>
> 'start')
> echo "Starting $name"
> echo $$ > "$this_dir/$name.pid"
> exec sleep 123456
> ;;
>
> every process start and stop in order without any race condition...
>
> --
> Jan-Henrik Haukeland
> Mobil +47 97141255
>
>
>
> --
> To unsubscribe:
> http://lists.nongnu.org/mailman/listinfo/monit-general