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: Thu, 28 Apr 2011 10:46:23 -0600
Hi Carsten,

I created a launchpad bug entry to track the issue (see url below). 

I am starting to suspect that this has something to do with, not sockets,
but instead with the win32 thread handle not being closed, because there are
two of them (two threads) for each client. As I recall, with the win32
thread creation API EPICS is using, _beginthreadex, the handle is implicitly
closed when the thread function returns, but I will need to investigate in
the debugger.

https://bugs.launchpad.net/epics-base/+bug/772471

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: Thursday, April 28, 2011 12:36 AM
> To: [email protected]
> Subject: Re: Handle leak in Channel Access Server V4.13 (current EPICS
> base) - WinXP
> 
> Hi Jeff,
> 
> I use the native win32-x86 EPICS base port to windows. My caget doesn't
> run at a high repetition
> rate. The problem also occurs when I use camonitor.
> 
> I used camonitor and netstat to check how many tcp circuits are active and
> in what state they are
> in. I called camonitor from a different machine as softIoc.
> At the beginning of my test softIoc had 1282 used handles (constant). When
> I called camonitor I saw
> a new TCP connection to port 5064 (via netstat) and an increase of softIoc
> handles to 1294. Both
> values were constant while running camonitor. After stopping camonitor the
> handle count of softIoc
> decreased to 1284 and the TCP connection to port 5064 was still open.
> After some seconds the TCP
> connection to port 5064 has been closed but the handle count still stands
> by 1284. This two
> additional handles will no more be removed and every new camonitor or
> caget request will add two
> more handles until softIoc crashes.
> 
> To diagnostic the handle count I use the "Performancemonitor"
> (perfmon.exe) from MS Windows and the
> "Processexplorer" (procexp.exe) from Systeminternals.
> 
> I think caget terminates regularly and calls ca_context_destroy to clean
> up all used channel access
> resources.
> 
> I looks to me that Channel Access Server has a serious resource problem!
> 
> 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



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

Navigate by Date:
Prev: Re: Handling of a character waveform of 64k elements Andrew Johnson
Next: RE: Does EPICS Base support multi-thread on vxWorks 6.3? lorna . zhang
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: Re: Handle leak in Channel Access Server V4.13 (current EPICS base) - WinXP Carsten Winkler
Next: Large number of sequencers running per soft IOC under Linux: Kernel becomes unresponsive Ernest L. Williams Jr.
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 ·