pcp
[Top] [All Lists]

RE: [pcp] pmcd restart race condition

To: "'Frank Ch. Eigler'" <fche@xxxxxxxxxx>
Subject: RE: [pcp] pmcd restart race condition
From: "Ken McDonell" <kenj@xxxxxxxxxxxxxxxx>
Date: Sat, 3 Oct 2015 07:52:41 +1000
Cc: "'Martins Innus'" <minnus@xxxxxxxxxxx>, "'pcp developers'" <pcp@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <20151002212025.GC7968@xxxxxxxxxx>
References: <560EB93A.6020606@xxxxxxxxxxx> <y0my4flump3.fsf@xxxxxxxx> <00bd01d0fd56$189950a0$49cbf1e0$@internode.on.net> <20151002212025.GC7968@xxxxxxxxxx>
Thread-index: AQDa6HMPGg5ajBkvr3p5+HMH2wbsCQILWs5zAoLNobsCIa01ZqAPZyKQ
G'day Frank.

> -----Original Message-----
> From: Frank Ch. Eigler [mailto:fche@xxxxxxxxxx]
> Sent: Saturday, 3 October 2015 7:20 AM
> To: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
> Cc: 'Martins Innus' <minnus@xxxxxxxxxxx>; 'pcp developers'
> <pcp@xxxxxxxxxxx>
> Subject: Re: [pcp] pmcd restart race condition
> 
> ... 
> That backgrounding was probably done to hide the latency of first-time
> pmcd startup doing all the pmda Installs.

But if we need PMDAs X, Y and Z auto installed, is there really any point in
getting pmcd started before X, Y and Z are actually installed?  I can't
think of any bad side-effect of pmcd taking longer to start first-time.

> ...
> Yes, as long as that is preserved throughout the process, sounds good.
> ... and then actually:
> 
> -           _pmda_setup &
> +           PMDA_SETUP_RUNNING=yes _pmda_setup
> 
> might not even need to take away the "&", as the environment variable
> should preclude reentrancy to this part.

Fair point, but I am a little concerned that there may be some other race
condition in the rc script _after_ the pmda_setup call and not running in
the background means we won't expose this risk more than we need to.

Probably needs a review of this to see if there is more than a nested
pmda_setup that needs to be guarded by $PMDA_SETUP_RUNNING ... I'll wait for
Martins feedback and until I can discuss with Nathan before committing
anything.

<Prev in Thread] Current Thread [Next in Thread>