This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: [bash or DLL] Memory leak in childs
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