EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Re: caget delays
From: Michael Davidsaver <[email protected]>
To: Benjamin Franksen <[email protected]>, EPICS Core-Talk <[email protected]>
Date: Fri, 18 Dec 2015 10:21:00 -0500
FYI Ralph has created a bug report for this https://bugs.launchpad.net/epics-base/+bug/1527636

Can we move the conversation there?


On 12/18/2015 06:44 AM, Benjamin Franksen wrote:
> I can see three ways to move forward from here:
> 
> (1) Remove the call to ca_context_destroy from the CA utilities. I don't
> like this very much: their source code should serve as demonstration of
> good practice when programming a CA client and thus should include
> proper cleanup of the client context.

Agreed, this is the least attractive.

> (2) Apply more forceful OS-specific ways of getting rid of the name
> resolution thread (even when it is blocked on a call to gethostbyaddr).
> Doing this properly would mean to adding some sort of "thread killing"
> method to the epicsThread class, something which has been proposed
> before and rejected for various good reasons.

I see this as the most appropriate solution.  IMO the root problem is the lack of a portable API for async. name lookups.  In the case of Linux/posix this should be fixable by sending SIGINT to the resolver thread.

I'll do a little test to see if this works.

> (3) Let the user choose whether they want to have the extra features
> enabled by the host name lookup, or whether they rather want to ensure
> quick termination of their programs or threads. This could be made
> configurable by an environment variable, for instance.

This feels like a workaround that could also be achieved through /etc/hosts.

> I think the third solution is preferable since it is backward compatible
> (no API or ABI change) and can be applied without changing the source
> code or even re-compiling (if dynamically linked) of the client
> applications.

I think that #2 can also be done in a compatible and safe way, and without adding yet another configuration option.

Attachment: signature.asc
Description: OpenPGP digital signature


References:
caget delays Benjamin Franksen

Navigate by Date:
Prev: Re: caget delays Hartman, Steven M.
Next: Re: Fwd: Wrong beacon source IP address Andrew Johnson
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: caget delays Hartman, Steven M.
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·