EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Handle leak in Channel Access Server V4.13 (current EPICS base) - WinXP
From: "Jeff Hill" <[email protected]>
To: "'Carsten Winkler'" <[email protected]>, <[email protected]>
Date: Wed, 27 Apr 2011 10:18:59 -0600
Hi Carston,

> Create any PVs at softIoc, request it via caget and you see the handle
> count at softIoc will be increased by two 

Are you using the native win32-x86 EPICS base port to windows, or the
cygwin-x86 (utilizing the cygwin Posix emulating layer) EPICS base port to
windows?

Does your caget run at a high repetition rate? If so, what might be
happening is that, despite being properly cleaned up by the ca library, the
tcp circuits are lingering, and continuing to consume resources for a finite
time period, in the TIME_WAIT state. The netstat program, invoked from the
DOS command line, on windows shows how many tcp circuits are active, and in
what state they are in.

What diagnostic are you using at your site to reveal the incrementing handle
count?

By the way, there are typically one tcp socket and one UDP socket created by
each invocation of caget. If the client side application program calls
ca_context_destroy then these sockets are explicitly closed by the ca client
library, but if the process exits before the application explicitly calls
ca_context_destroy then the OS typically will implicitly close the sockets
during orderly process rundown procedures. A quick search in the source
reveals that caget, at least in some scenarios, explicitly calls
ca_context_destroy.

> If you frequently repeat this procedure you will end up to in a "WINSOCK
> Error 10055".

On Winsock error code 10055 is WSAENOBUFS which is the Winsock rough
equivalent of ENOBUFS on UNIX. I don't recall encountering WSAENOBUFS with
Winsock. Perhaps it results from network kernel buffer starvation as is the
case with BSD network kernels, from which the Microsoft network kernel is
rumored to be derived. However, after reading the description below it
appears that the WINSOCK interface is quite vague about what resource might
be in short supply.

http://support.ipswitch.com/kb/WSK-19980714-EM18.htm

Jeff
______________________________________________________
Jeffrey O. Hill           Email        [email protected]
LANL MS H820              Voice        505 665 1831
Los Alamos NM 87545 USA   FAX          505 665 5107

Message content: TSPA

With sufficient thrust, pigs fly just fine. However, this is
not necessarily a good idea. It is hard to be sure where they
are going to land, and it could be dangerous sitting under them
as they fly overhead. -- RFC 1925


> -----Original Message-----
> From: [email protected] [mailto:[email protected]]
> On Behalf Of Carsten Winkler
> Sent: Wednesday, April 27, 2011 5:29 AM
> To: [email protected]
> Subject: Handle leak in Channel Access Server V4.13 (current EPICS base) -
> WinXP
> 
> It seems to be a handle leak in Channel Access Server V4.13 (current EPICS
> base)
> 
> Create any PVs at softIoc, request it via caget and you see the handle
> count at softIoc will be
> increased by two and won't be freed anymore (without using any EPICS
> gateway).
> If you frequently repeat this procedure you will end up to in a "WINSOCK
> Error 10055".
> 
> This problem occurs at Windows XP with patched EPICS bas 3.14.12.
> 
> How can I fix this bug without using EPICS gateways?
> 
> Best Regards,
> Carsten Winkler
> 
> ________________________________
> 
> Helmholtz-Zentrum Berlin für Materialien und Energie GmbH
> 
> Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher
> Forschungszentren e.V.
> 
> Aufsichtsrat: Vorsitzender Prof. Dr. Dr. h.c. mult. Joachim Treusch, stv.
> Vorsitzende Dr. Beatrix Vierkorn-Rudolph
> Geschäftsführer: Prof. Dr. Anke Rita Kaysser-Pyzalla, Prof. Dr. Dr. h.c.
> Wolfgang Eberhardt, Dr. Ulrich Breuer
> 
> Sitz Berlin, AG Charlottenburg, 89 HRB 5583
> 
> Postadresse:
> Hahn-Meitner-Platz 1
> D-14109 Berlin
> 
> http://www.helmholtz-berlin.de



Replies:
Re: Handle leak in Channel Access Server V4.13 (current EPICS base) - WinXP Carsten Winkler
References:
Handle leak in Channel Access Server V4.13 (current EPICS base) - WinXP Carsten Winkler

Navigate by Date:
Prev: RE: areaDetector Prosilica IOCs on Windows 7? Mark Rivers
Next: RE: devIocStats Displays Robert Henning
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Handle leak in Channel Access Server V4.13 (current EPICS base) - WinXP Carsten Winkler
Next: Re: Handle leak in Channel Access Server V4.13 (current EPICS base) - WinXP Carsten Winkler
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·