EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Weird CAS hangup on IOC
From: Ralph Lange via Core-talk <core-talk at aps.anl.gov>
To: EPICS Core Talk <core-talk at aps.anl.gov>
Date: Fri, 7 Feb 2020 09:35:03 +0100
I can confirm it is a race: Using a script that is starting two IOCs in parallel, we can see the effect happening about 1 out of 50 times.

When rsrv starts, there is a window between checking and getting exclusive access so that further checks fail.
As Torsten pointed out, only active listening sockets prevent another bind() with SO_REUSEADDR set on the sockets. From the socket(7) manpage:
SO_REUSEADDR
Indicates that the rules used in validating addresses supplied in a bind(2) call should allow reuse of local addresses. For AF_INET sockets this means that a socket may bind, except when there is an active listening socket bound to the address. 

If the second IOC calls bind() before the first IOC called listen(), the second bind() will succeed and the second IOC will fail later when it calls listen(). Currently it decides to go deaf (suspend the receiving thread) at that point, but it really should go back to the phase of testing bind() instead.

I'll create a LP bug for this.

Cheers,
~Ralph


Replies:
Re: Weird CAS hangup on IOC Torsten Bögershausen via Core-talk
References:
Weird CAS hangup on IOC Ralph Lange via Core-talk
Re: Weird CAS hangup on IOC Michael Davidsaver via Core-talk
Re: Weird CAS hangup on IOC Ralph Lange via Core-talk
Re: Weird CAS hangup on IOC Michael Davidsaver via Core-talk

Navigate by Date:
Prev: Re: My Jenkins builds fail checking out. Why? Zimoch Dirk (PSI) via Core-talk
Next: [Bug 1829770] Re: event record device support broken with constant INP Dirk Zimoch via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Weird CAS hangup on IOC Michael Davidsaver via Core-talk
Next: Re: Weird CAS hangup on IOC Torsten Bögershausen via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
ANJ, 07 Feb 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·