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  2020  <20212022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: osiSockTest fail on WIN32
From: Michael Davidsaver via Core-talk <core-talk at aps.anl.gov>
To: Freddie Akeroyd - STFC UKRI <freddie.akeroyd at stfc.ac.uk>
Cc: "EPICS core-talk \(core-talk at aps.anl.gov\)" <core-talk at aps.anl.gov>
Date: Mon, 28 Jun 2021 22:20:54 -0700
On 6/27/21 2:38 PM, Freddie Akeroyd - STFC UKRI via Core-talk wrote:
> Hi,
> 
>  
> 
> I’m getting osiSockTest failures with epics 7 when I run it locally on my windows desktop. The issue seems to be that in udpSockFanoutTestRx() a UDP packet is picked up from the main network (looks to be from our gateway on the same subnet) and this packet is too big for the buffer passed to recvfrom()  resulting in recvfrom() returning WSAEMSGSIZE and the test terminating early.  This can be fixed by either changing the error check to be:

Interesting, I was under the impression that recvfrom() would silently truncate.
The Linux manpage doesn't mention EMSGSIZE.  I guess this is either Linux specific,
or an omission.

https://linux.die.net/man/2/recvfrom

Anyway, thank you for running the tests and reporting!

>     if(n<0 && SOCKERRNO != SOCK_EMSGSIZE) {
> 
>  
> 
> (with SOCK_EMSGSIZE= WSAEMSGSIZE on WIN32, EMSGSIZE elsewhere) or by increasing the size of the body part of the CASearch  structure – it looks like the entire structure would currently need to be at least 1024 bytes for packets on our network.

I'm testing a change to ignore large messages and retry.


> --- a/modules/libcom/test/osiSockTest.c
> +++ b/modules/libcom/test/osiSockTest.c
> @@ -243,6 +243,10 @@ void udpSockFanoutTestRx(void* raw)
>          buf.bytes[sizeof(buf.bytes)-1] = '\0';
>  
>          if(n<0) {
> +#ifdef _WIN32
> +            if(errno==WSAEMSGSIZE)
> +                continue;
> +#endif
>              testDiag("recvfrom error (%d)", (int)SOCKERRNO);
>              break;
>          } else if((n==sizeof(buf.bytes)) && buf.msg.cmd==htons(6) && buf.msg.size==htons(16)

References:
osiSockTest fail on WIN32 Freddie Akeroyd - STFC UKRI via Core-talk

Navigate by Date:
Prev: Jenkins build is back to normal : epics-base-7.0-win64 #255 APS Jenkins via Core-talk
Next: epics-7.0 » mac - Build # 346 - Fixed! APS Jenkins via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
Navigate by Thread:
Prev: osiSockTest fail on WIN32 Freddie Akeroyd - STFC UKRI via Core-talk
Next: Re: osiSockTest fail on WIN32 Michael Davidsaver via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
ANJ, 01 Jul 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·