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  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: memory leak after unloading of ca.lib
From: "Hill, Jeff" <[email protected]>
To: Ben Franksen <[email protected]>, "[email protected]" <[email protected]>
Date: Thu, 23 Feb 2017 20:50:05 +0000
> > There are also a number of one-time allocations which aren't cleaned up.
> 
> More CA fixes needed?

The CA client library _is_ cleaning up all of its allocations if ca_context_destroy is explicitly called, but this is of course not universal for components in libCom and or EPICS base.

Jeff

> -----Original Message-----
> From: [email protected] [mailto:tech-talk-
> [email protected]] On Behalf Of Ben Franksen
> Sent: Thursday, February 23, 2017 1:29 PM
> To: [email protected]
> Subject: Re: memory leak after unloading of ca.lib
> 
> Am 23.02.2017 um 18:26 schrieb Michael Davidsaver:
> > Personally, I'd never consider trying to unload libCom or libca.
> > Neither was designed with this in mind.
> 
> Carsten (and me) wouldn't either, it's just that Labview seems to insist
> on it :-(
> 
> > For example.  With libCom the errlog thread is never stopped.  And libca
> > registers a function pointer using epicsAtExit().  So if libca is
> > unloaded, then running epicsExit() will fail.
> 
> Perhaps there should be a way to unregister the epicsAtExit callback.
> 
> > There are also a number of one-time allocations which aren't cleaned up.
> 
> More CA fixes needed?
> 
> Cheers
> Ben
> 
> > On 02/23/2017 03:50 AM, Carsten Winkler wrote:
> >> Hi there,
> >>
> >> when your project (e.g. LabVIEW) uses dynamic loading and unloading of
> >> channel access classes your main class will sometimes (at 64 bit nearly
> >> always) crush with a segmentation fault. The reason seems to be missing
> >> free() and delete functions in EPICS Base 3.14.12.6 (I'm sure this
> >> applies also to other EPICS Base versions).
> >>
> >> I wrote a tiny test case to check it and it would be great to get any
> >> advise to solve the issue.
> >>
> >> Best regards
> >> Carsten
> >>
> >>
> >> ________________________________
> >>
> >> Helmholtz-Zentrum Berlin für Materialien und Energie GmbH
> >>
> >> Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher
> Forschungszentren e.V.
> >>
> >> Aufsichtsrat: Vorsitzender Dr. Karl Eugen Huthmacher, stv. Vorsitzende Dr.
> Jutta Koch-Unterseher
> >> Geschäftsführung: Prof. Dr. Anke Rita Kaysser-Pyzalla, Thomas Frederking
> >>
> >> Sitz Berlin, AG Charlottenburg, 89 HRB 5583
> >>
> >> Postadresse:
> >> Hahn-Meitner-Platz 1
> >> D-14109 Berlin
> >>
> >> http://www.helmholtz-berlin.de
> >>
> >
> 
> ________________________________
> 
> Helmholtz-Zentrum Berlin für Materialien und Energie GmbH
> 
> Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher
> Forschungszentren e.V.
> 
> Aufsichtsrat: Vorsitzender Dr. Karl Eugen Huthmacher, stv. Vorsitzende Dr.
> Jutta Koch-Unterseher
> Geschäftsführung: Prof. Dr. Anke Rita Kaysser-Pyzalla, Thomas Frederking
> 
> Sitz Berlin, AG Charlottenburg, 89 HRB 5583
> 
> Postadresse:
> Hahn-Meitner-Platz 1
> D-14109 Berlin
> 
> http://www.helmholtz-berlin.de



Replies:
Re: memory leak after unloading of ca.lib Ben Franksen
Re: memory leak after unloading of ca.lib Michael Davidsaver
References:
memory leak after unloading of ca.lib Carsten Winkler
Re: memory leak after unloading of ca.lib Michael Davidsaver
Re: memory leak after unloading of ca.lib Ben Franksen

Navigate by Date:
Prev: Re: memory leak after unloading of ca.lib Ben Franksen
Next: Re: memory leak after unloading of ca.lib Michael Davidsaver
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: memory leak after unloading of ca.lib Ben Franksen
Next: Re: memory leak after unloading of ca.lib Ben Franksen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
ANJ, 21 Dec 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·