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: EPICS Base 3.15.8: Name resolution requests directed to non-existing hosts block CA Server
From: Goetz Pfeiffer via Core-talk <core-talk at aps.anl.gov>
To: Freddie Akeroyd - STFC UKRI <freddie.akeroyd at stfc.ac.uk>, "EPICS core-talk (core-talk at aps.anl.gov)" <core-talk at aps.anl.gov>
Date: Mon, 7 Jun 2021 11:08:57 +0200
On 6/6/21 2:05 AM, Freddie Akeroyd - STFC UKRI via Core-talk wrote:

The currently observed behaviour may be caused by an ARP lookup https://stackoverflow.com/questions/4165174/when-does-a-udp-sendto-block

Yes, this may be the problem. The blocking does not occur, when the non existent hosts are not in the local network which means that no ARP is involved.

We also have an old debian-6 system, which doesn't have the problem at all, so it may be a feature of newer linux kernels.

By the way, my test consists of a bunch of bash scripts, so it should be possible to test this on MacOS/Darwin. I have seen this problem
on Debian-9 and Fedora-33 linux.

 

From: Core-talk <core-talk-bounces at aps.anl.gov> On Behalf Of Freddie Akeroyd - STFC UKRI via Core-talk
Sent: 05 June 2021 13:40
To: EPICS core-talk (core-talk at aps.anl.gov) <core-talk at aps.anl.gov>
Subject: RE: EPICS Base 3.15.8: Name resolution requests directed to non-existing hosts block CA Server

 

Windows doesn’t look to provide MSG_DONTWAIT, you would probably need to set the socket into non-blocking mode with ioctlsocket() to get the equivalent behaviour, but that may cause undesirable consequences elsewhere (not looked);  however temporarily disabling/enabling blocking mode just around the call may be possible.

 

Freddie

 

From: Core-talk <core-talk-bounces at aps.anl.gov> On Behalf Of Johnson, Andrew N. via Core-talk
Sent: 04 June 2021 16:32
To: Michael Davidsaver <mdavidsaver at gmail.com>
Cc: EPICS core-talk <core-talk at aps.anl.gov>
Subject: Re: EPICS Base 3.15.8: Name resolution requests directed to non-existing hosts block CA Server

 

On Jun 4, 2021, at 8:24 AM, Michael Davidsaver via Core-talk <core-talk at aps.anl.gov> wrote:

 

On 6/4/21 1:50 AM, Goetz Pfeiffer via Core-talk wrote:

We provide the "MSG_DONTWAIT" flag to the "sendto" call. By this, sendto never blocks even if internal

UDP buffers are full.

I have added a patch file for this to this e-mail.


I don't see any issue with this change, though I would format it as:

#ifndef MSG_DONTWAIT
#  define MSG_DONTWAIT (0)
#endif

This seems more portable than my solution and should be compatible with all platforms.

 

Both VxWorks 5.5 and MacOS define MSG_DONTWAIT in sys/socket.h but in the MacOSX SDK it's inside this conditional:

 

#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)

#define MSG_DONTWAIT    0x80            /* this message should be nonblocking */

 

I doubt that _POSIX_C_SOURCE is defined so I think the flag should be available there, but Michael’s conditional is a good idea anyway.

 

- Andrew

 

-- 

Complexity comes for free, simplicity you have to work for.

 

This email and any attachments are intended solely for the use of the named recipients. If you are not the intended recipient you must not use, disclose, copy or distribute this email or any of its attachments and should notify the sender immediately and delete this email from your system. UK Research and Innovation (UKRI) has taken every reasonable precaution to minimise risk of this email or any attachments containing viruses or malware but the recipient should carry out its own virus and malware checks before opening the attachments. UKRI does not accept any liability for any losses or damages which the recipient may sustain due to presence of any viruses. Opinions, conclusions or other information in this message and attachments that are not related directly to UKRI business are solely those of the author and do not represent the views of UKRI.

Greetings,

  Goetz




Helmholtz-Zentrum Berlin für Materialien und Energie GmbH

Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher Forschungszentren e.V.

Aufsichtsrat: Vorsitzender Dr. Volkmar Dietz, stv. Vorsitzende Dr. Jutta Koch-Unterseher
Geschäftsführung: Prof. Dr. Bernd Rech (Sprecher), Prof. Dr. Jan Lüning, Thomas Frederking

Sitz Berlin, AG Charlottenburg, 89 HRB 5583

Postadresse:
Hahn-Meitner-Platz 1
14109 Berlin
Deutschland

References:
EPICS Base 3.15.8: Name resolution requests directed to non-existing hosts block CA Server Goetz Pfeiffer via Core-talk
Re: EPICS Base 3.15.8: Name resolution requests directed to non-existing hosts block CA Server Michael Davidsaver via Core-talk
Re: EPICS Base 3.15.8: Name resolution requests directed to non-existing hosts block CA Server Johnson, Andrew N. via Core-talk
RE: EPICS Base 3.15.8: Name resolution requests directed to non-existing hosts block CA Server Freddie Akeroyd - STFC UKRI via Core-talk
RE: EPICS Base 3.15.8: Name resolution requests directed to non-existing hosts block CA Server Freddie Akeroyd - STFC UKRI via Core-talk

Navigate by Date:
Prev: Re: Tests on RTEMS-pc686-qemu Heinz Junkes via Core-talk
Next: AW: Deadlock on VxWorks 6.7 Zimoch Dirk (PSI) 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: RE: EPICS Base 3.15.8: Name resolution requests directed to non-existing hosts block CA Server Freddie Akeroyd - STFC UKRI via Core-talk
Next: Build failed: EPICS Base 7 base-7.0-334 AppVeyor 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, 07 Jun 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·