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  2017  2018  2019  2020  2021  <20222023  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  2017  2018  2019  2020  2021  <20222023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Strange memory leak with ADAravis
From: Mark Rivers via Tech-talk <tech-talk at aps.anl.gov>
To: Abdalla Ahmad <Abdalla.Ahmad at sesame.org.jo>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Mon, 19 Sep 2022 15:41:08 +0000
After this happens please send the screen shots for ADAravis and commonPlugins. 

If it will take a long time to fail then just send the screen shots when it is working normally at the frame rate you use when it fails.

Mark

Sent from my iPhone

On Sep 19, 2022, at 6:08 AM, Abdalla Ahmad <Abdalla.Ahmad at sesame.org.jo> wrote:



Hello Mark

 

This memory leak issue just happened again with similar numbers for pool statistics PVs on the same setup, I will be testing the same setup on a rocky Linux machine and tell you the results. Note that it happens after 15-20 minutes from running the IOC, also the empty free list command did not free the queues. Do you have some pointers on where to start debugging in the drivers’ stack? (AD core, aravis, etc.)

 

Thanks!

Abdalla.

 

From: Mark Rivers <rivers at cars.uchicago.edu>
Sent: Thursday, June 2, 2022 1:46 PM
To: tech-talk at aps.anl.gov; Abdalla Ahmad <Abdalla.Ahmad at sesame.org.jo>
Subject: Re: Strange memory leak with ADAravis

 

Hi Abdalla,

 

What areaDetectors plugins do you have running and what is the value of QueueSize for each of them?  The Buffers information you sent is very useful.  It says that the current number of buffers (NDArrays) in use is only 22.  But it has allocated 24664 of them, and they are in the pool, using 28904 MB of memory.  Can you send a screen shot of the commonPlugins.adl screen?

 

I can think of two possibilities for this:

  • The system got very busy for a while, and plugins were not able to keep up with the camera.  That will cause each active plugin to fill its queue.  If there were 12 plugins and each had QueueSize of 2000 that would explain it.
  • There is a leak in the driver or some plugin which is causing the pool to grow.  But then I would expect PoolUsedBuffers to be large.  I would also expect someone else to have reported that problem by now.

Note that in the Buffers section of the detector screen there is button to Empty Free List.  That processes the  EmptyFreeList record, which will free all of the unused buffers and reduce the memory without restarting the IOC.

 

Mark

 

 


From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Abdalla Ahmad via Tech-talk <tech-talk at aps.anl.gov>
Sent: Thursday, June 2, 2022 4:57 AM
To: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: Strange memory leak with ADAravis

 

Hi

 

I have setup area detector to control the Basler gigE cameras we have, I pulled the latest tag for all the necessary modules (asyn, ADCore, ADAravis, etc). The setup works fine, I can control the camera and acquire images even at the maximum FPS which is 32. Now I configured the IOC to control 2 cameras, one with exposure time 10 s and one with 32 FPS and left it overnight few days ago. I got to the PC the day after and the RAM and swap were full but the IOC was working, I managed to login to the PC later and launched the GUI and I found strange values in the Buffers section of ADAravis.adl:

 

PoolUsedBuffers: 22

PoolAllocBuffers: 24664

PoolFreeBuffers: 24642

PoolMaxMem: 0 MB

PoolUsedMem: 28904.3

 

The PC has is running CentOS 7 and has 8GB RAM. I re-ran the IOC yesterday and for now it is working fine. What could be wrong with my setup? The network is all gigabit Ethernet and jumbo frames are enabled.

 

Thanks

Abdalla.

 


Replies:
RE: Strange memory leak with ADAravis Abdalla Ahmad via Tech-talk
References:
Strange memory leak with ADAravis Abdalla Ahmad via Tech-talk
Re: Strange memory leak with ADAravis Mark Rivers via Tech-talk
RE: Strange memory leak with ADAravis Abdalla Ahmad via Tech-talk

Navigate by Date:
Prev: RE: warnings.warn from raspberry pyepics LE-DANIEL Erwann via Tech-talk
Next: Re: warnings.warn from raspberry pyepics Mark Rivers via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  <20222023  2024 
Navigate by Thread:
Prev: RE: Strange memory leak with ADAravis Abdalla Ahmad via Tech-talk
Next: RE: Strange memory leak with ADAravis Abdalla Ahmad via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  <20222023  2024 
ANJ, 21 Sep 2022 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·