This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [bash or DLL] Memory leak in childs


On Jul 18 06:52, Mark Geisert wrote:
> Heiko Elger writes:
> > I just can confirm the same problem with latest cygwin1.dll
> > (cygwin1-20110713.dll.bz2) on Windows 7/64 (fast XEON CPU).
> > I've seen this problem while testing other "exiter" - problem
> > with the following script.
> [...]
> > #!/bin/sh
> > set -e
> > while true; do
> >    ./exiter.exe
> > echo -n $?
> > done
> [...]
> > The virtual memory (windows task manager) grows and grows over the time.
> > 
> > The cygwin eats all memory til no more available.
> > But after alle cygwin processes are closed the memory is freed.
> 
> With respect, what you and the OP are seeing happens to be one of the primary
> manifestations of BLODA.  Please show that you have ruled that out as a
> possible cause; after that we can consider other explanations.
> 
> For example, run 'cygcheck -svr' and post its output, *as an attachment*, in
> a followup post.  cygcheck checks for evidence of BLODA installations and is
> the first step towards ruling out this possibility.  You could also visually
> scan the list of apps in the link I posted earlier in this thread, just to
> make sure you don't have one of these dodgy apps installed.
> 
> I believe my first problem report to this list several years ago was this
> very observation about increasing virtual memory consumption for no good reason.
>  In my case it was BLODA, an anti-virus program that I was luckily
> able to configure to not scan the Cygwin installation tree.
> HTH,

For completeness, I tested both testcases, the one from the OP and the
one from Heiko (albeit the one using only Cygwin executables) with the
latest Cygwin from CVS.  I couldn't observer any raise in memory
consumption over 15 minutes of runtime of both scripts.

The OP also wrote:
> Once Cygwin closed, memory is still used, not released.

This is definitely not a feat of Cygwin.  Cygwin is just a user-space
DLL.  It's not a standalone application nor is it a part of the system.
All memory reserved by the application is free'd as soon as the 
application exits.  All (shared) memory reserved by the Cygwin DLL is
free'd as soon as the last process using it exits.  If all Cygwin 
processes exited, it must be a non-Cygwin process holding on to the
memory.  


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]