pcp
[Top] [All Lists]

Re: [pcp] qa/944: Race Condition With Respect to pmcd Startup

To: Dave Brolley <brolley@xxxxxxxxxx>
Subject: Re: [pcp] qa/944: Race Condition With Respect to pmcd Startup
From: Nathan Scott <nathans@xxxxxxxxxx>
Date: Thu, 14 Aug 2014 00:44:28 -0400 (EDT)
Cc: PCP Mailing List <pcp@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <53EBCFC4.9010405@xxxxxxxxxx>
References: <53EBCFC4.9010405@xxxxxxxxxx>
Reply-to: Nathan Scott <nathans@xxxxxxxxxx>
Thread-index: tDGiozkX3cGA41dqlQmbFQInI+Ryaw==
Thread-topic: qa/944: Race Condition With Respect to pmcd Startup
Hi Dave,

----- Original Message -----
> On brolley/dev branch of pcpfans ....
> 
> commit d62b31c5282c6133c87d067db28b3cd440f650f3
> Author: Dave Brolley <brolley@xxxxxxxxxx>
> Date:   Wed Aug 13 16:47:49 2014 -0400
> 
>      qa/944: Mitigate race condition with respect to pmcd start up.
> 

+    # The call pmcd_wait, below, checks for pmcd startup by attempting to
+    # connect to its unix domain socket. However, it takes some time for pmcd
+    # to start and to open the socket. So, wait a few seconds before checking.
+    sleep 3
     pmcd_wait -h unix:$PMCD_SOCKET -v -t 5sec


Hmmm, could this be a bug in pmcd_wait?  It originally only knew about
ports/sockets, which either have-pmcd-actively-listening or they don't
... is it possible that pmcd_wait should gain more knowledge to deal
properly with AF_UNIX sockets?  e.g. does it fail early because a file
doesn't exist yet?  e.g. can we trap -ENOENT and continue trying like
we do for -ECONNREFUSED, or something like that, depending on what the
underlying issue here is?

cheers.

--
Nathan

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