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: Andrew Johnson via Core-talk <core-talk at aps.anl.gov>
To: <core-talk at aps.anl.gov>
Date: Thu, 6 Feb 2020 17:10:53 -0600
On 2/6/20 12:28 PM, Michael Davidsaver via Core-talk wrote:
My attempt to fix epicsSocketEnableAddressUseForDatagramFanout() on vxWorks (which still needs confirmation)
and RTEMS had a side-effect on Linux where it seems that SO_REUSEADDR
and SO_REUSEPORT have the same effect, but are not interchangeable.
Sorry.

I cherry-picked 8dc131dc4cc04eef3df513a978576442af9405b1 from your branch:
iocanj> osiSockTest
1..18
ok  1 - osiSockAttach
ok  2 - epicsSocketCreate INET, DGRAM, 0
ok  3 - setsockopt BROADCAST := 1
ok  4 - getsockopt BROADCAST => 1
ok  5 - setsockopt BROADCAST := 0
ok  6 - getsockopt BROADCAST => 0
ok  7 - setsockopt MULTICAST_LOOP := 1
ok  8 - getsockopt MULTICAST_LOOP => 1
ok  9 - setsockopt MULTICAST_LOOP := 0
ok 10 - getsockopt MULTICAST_LOOP => 0
ok 11 - setsockopt IP_MULTICAST_TTL := 1
ok 12 - getsockopt IP_MULTICAST_TTL => 1
ok 13 - setsockopt IP_MULTICAST_TTL := 0
not ok 14 - getsockopt IP_MULTICAST_TTL => 1
# First test if epicsSocketEnableAddressUseForDatagramFanout() is necessary
ok 15 - bind() to port 50463
ok 16 - bind() to 50463 error -1, 48
# Now the real test
ok 17 - bind() to port 50463
not ok 18 - bind() to 50463 error -1, 48

    Results
    =======
       Tests: 18
      Passed:  16 = 88.89%
      Failed:   2 = 11.11%
iocanj> puts strerror(48)
S_errno_EADDRINUSE
value = 10 = 0xa

Test 14 always fails on VxWorks, I just haven't had time to chase the reason.

- Andrew

-- 
Complexity comes for free, Simplicity you have to work for.

Replies:
Re: Weird CAS hangup on IOC Michael Davidsaver 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

Navigate by Date:
Prev: Re: Weird CAS hangup on IOC Michael Davidsaver via Core-talk
Next: [Bug 1829770] Re: event record device support broken with constant INP Gabriel Fedel 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 Ralph Lange via Core-talk
Next: Re: Weird CAS hangup on IOC Michael Davidsaver 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, 12 Feb 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·