2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 <2020> 2021 2022 2023 2024 | Index | 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 <2020> 2021 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: Error message binding socket 5076 on vxWorks |
From: | "Heinz P. Junkes via Core-talk" <[email protected]> |
To: | Michael Davidsaver <[email protected]>, Mark Rivers <[email protected]> |
Cc: | "[email protected]" <[email protected]> |
Date: | Mon, 13 Jan 2020 17:28:22 +0100 |
libComTestHarness with rtems-5.0.0-m1912 and rtems-libbsd-5.0.0-m1912 ... 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 ok 14 - getsockopt IP_MULTICAST_TTL => 0 # First test if epicsSocketEnableAddressUseForDatagramFanout() is necessary ok 15 - bind() to port 50287 ok 16 - bind() to 50287 error -1, 112 # Now the real test ok 17 - bind() to port 50287 ok 18 - bind() to port 50287 Results ======= Tests: 18 Passed: 18 = 100.00% Heinz On 1/12/20 9:10 PM, Michael Davidsaver wrote:
On 1/12/20 9:50 AM, Michael Davidsaver wrote:While I would expect this would have been noticed before now, one possibility is that SO_REUSEADDR doesn't have the desired effect on vxWorks. At least not for UDP sockets.Maybe not as far fetched as I had thought. It seems that this has been the case for RTEMS 4.9/4.10. I found an old email from Heinz reporting what seems like a similar issue in 2016 (sorry Heinz, I guess this was dropped).There is no test coverage, and CA has never needed it to work on this OS.A test case seems like the right place to start. If you update to the 7.0 branch from my github repo https://github.com/mdavidsaver/epics-base/tree/7.0 I've extended osiSockTest:# First test if epicsSocketEnableAddressUseForDatagramFanout() is necessary ok 15 - bind() to port 47435 ok 16 - bind() to 47435 error -1, 98 # Now the real test ok 17 - bind() to port 47435 ok 18 - bind() to port 47435I'd be interested to know if this passes for you (or Andrew when he reads this) on vxWorks. osiSockTest is part of the libCom test harness if that's easier for you to run. The change I've made is to prefer SO_REUSEPORT on those targets, excepting windows/cygwin, which define it. Google gives some hints that this includes vxWorks.