| www.delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| X-SWARE-Spam-Status: | No, hits=3.0 required=5.0 tests=AWL,BAYES_00,RCVD_NUMERIC_HELO,RP_MATCHES_RCVD,SARE_PROLOSTOCK_SYM1,SPF_HELO_PASS |
| X-Spam-Check-By: | sourceware.org |
| To: | cygwin AT cygwin DOT com |
| From: | Heiko Elger <heiko_elger AT arburg DOT com> |
| Subject: | Re: [bash or DLL] Memory leak in childs |
| Date: | Tue, 19 Jul 2011 09:23:12 +0000 (UTC) |
| Lines: | 111 |
| Message-ID: | <loom.20110719T101702-272@post.gmane.org> |
| References: | <loom DOT 20110718T073757-2 AT post DOT gmane DOT org> <loom DOT 20110718T083650-815 AT post DOT gmane DOT org> <loom DOT 20110719T064243-907 AT post DOT gmane DOT org> <loom DOT 20110719T092021-102 AT post DOT gmane DOT org> |
| Mime-Version: | 1.0 |
| User-Agent: | Loom/3.14 (http://gmane.org/) |
| X-IsSubscribed: | yes |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
Mark Geisert writes:
> Please don't quote raw email addresses; not quoting these is a list convention.
I'm sorry ...
> > shell script:
> > ******* snip snip snip ****
> > 1 [main] bash 4800 fork: child -1 - CreateProcessW failed for
> > 'c:\programme\cygwin\bin\bash.exe', errno 12
> > ./test2.sh: fork: Cannot allocate memory
> > ******* snip snip snip ****
>
> Are you saying you continue to see virtual memory use increasing over time and
> eventually the above output is seen? It's hard to tell because what's quoted
> above doesn't match your earlier report. Is test2.sh the script you used for
> the second example in your first post on this subject?
Again I'm sorry - I just used another small testcase doing the same.
See start/test description at the end of the message.
****** snip snip snip ******
$ cat test2.sh
#!/bin/sh
trap "echo TRAP; exit -1" SIGHUP SIGINT SIGQUIT SIGILL SIGTRAP SIGABRT SIGEMT SI
GFPE SIGKILL SIGBUS SIGSEGV SIGSYS SIGPIPE SIGALRM SIGTERM SIGURG SIGSTOP SIGTST
P SIGCONT SIGCHLD SIGTTIN SIGTTOU SIGIO SIGXCPU SIGXFSZ SIGVTALRM SIGPROF SIGWIN
CH SIGPWR SIGUSR1 SIGUSR2 SIGRTMAX
while ./exiter-vs2003.exe ; do
echo -n $?
done
echo RC=$?
****** snip snip snip ******
exiter-vs2003.c.c ist compiled with MS Visual Studio 2003
****** snip snip snip ******
$ cat exiter-vs2003.c
#include <stdio.h>
int main(int argc, char** argv[])
{
printf(".");
return 0;
}
****** snip snip snip ******
> However, I understand that Windows 7 has an anti-spyware service named Windows
> Defender included and enabled by default. Is it enabled on your system? If it
Thanks a lot - indeed MS defender was active - I deactivate it!
Here is my description of the testcase.
Step 1) Open one bash console for calling "/usr/bin/free" from time to time
to see the "lost memory" while running step 2.
$ free
total used free shared buffers cached
Mem: 12540232 1862512 10677720 0 0 0
-/+ buffers/cache: 1862512 10677720
Swap: 12540232 0 12540232
Wait 10 seconds ...
total used free shared buffers cached
Mem: 12540232 1862512 10677720 0 0 0
-/+ buffers/cache: 1862512 10677720
Swap: 12540232 0 12540232
Again wait 10 seconds ...
$ free
total used free shared buffers cached
Mem: 12540232 1863620 10676612 0 0 0
-/+ buffers/cache: 1863620 10676612
Swap: 12540232 0 12540232
Again wait 10 seconds ...
$ free
total used free shared buffers cached
Mem: 12540232 1873316 10666916 0 0 0
-/+ buffers/cache: 1873316 10666916
Swap: 12540232 0 12540232
Again wait 10 seconds ...
$ free
total used free shared buffers cached
Mem: 12540232 1875340 10664892 0 0 0
-/+ buffers/cache: 1875340 10664892
Swap: 12540232 0 12540232
Step 2) Open another or more bash console for calling "test2.sh"
$ ./test2.sh
you will see lots of lines like this
******** snip snip snip ***********
.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0
.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0
.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0
******** snip snip snip ***********
If running more "test2.sh" in parallel (I use up to 10) the memory consumption
is even more.
As you see - on my system memory is lost ...
I just see that between two free calls or in Windows Task Manager - of course
other programm need memory too - but the memory always shrinks.
best regards
Heiko
--
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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |