X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Mon, 18 Jul 2011 09:05:47 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: [bash or DLL] Memory leak in childs Message-ID: <20110718070547.GA1488@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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