please fix heap_init

2011-07-17 Thread jojelino

this is following of 'infinite recursion in git-svn'
#to reproduce this problem,
#1. please use latest cvs trunk
#2. set HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\heap_chunk_in_mb=0x400
Starting program: /usr/bin/perl.exe /usr/lib/git-core/git-svn clone 
-rHEAD http://google-perftools.googlecode.com/svn/trunk/

[New Thread 5352.0x9c4]
warning: section .gnu_debuglink not found in 
/cygdrive/d/cygwin/bin/cygwin1.dbg


Breakpoint 1, heap_init () at /tmp/winsup/winsup/cygwin/heap.cc:81
81start_address = roundup2 (start_address + 
mbi.RegionSize,

2: largest_found_size = 0x3568
1: start_address = 0x5569
(gdb) i b
Num Type   Disp Enb AddressWhat
1   breakpoint keep y   0x61078875 in heap_init()
   at 
/tmp/winsup/winsup/cygwin/heap.cc:81

breakpoint already hit 1 time
(gdb)

start_address continues to grow, and in heap.cc:94 it is used as base 
address.

which is not we wanted. and sbrk could fail if it used up MINHEAP_SIZE.

please fix this problem
Regards



--
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



Re: [bash or DLL] Memory leak in childs

2011-07-17 Thread Mark Geisert
AZ 9901 writes:
> I think I have found a memory leak in bash (or perhaps in DLL fork
> implementation, I don't know).
> 
> Just launch the following test loop having a look at Windows Task
> Manager, Page File Usage tab :
> 
> while [ 1 ]
> do
> test=$(echo test)
> done
> 
> Memory usage is constantly growing.
> Once Cygwin closed, memory is still used, not released.

Something so fundamental would have been corrected long ago if folks were seeing
it in general.  I don't see it on my system, for instance.  It is far more
likely you've got BLODA.  See
 for details.

Note that you might have BLODA that's not on that list yet because nobody's
reported it as BLODA.  Also note that disabling the BLODA might not make any
difference; you have to remove it from your system to know for sure whether it
was the problem.  The above Web page gives the gory details why this is so.
HTH,

..mark





--
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



Re: [bash or DLL] Memory leak in childs

2011-07-17 Thread Heiko Elger
Hello,

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.

*** snip snip snip **
#!/bin/sh
set -e
while true; do
   ./exiter.exe
echo -n $?
done
*** snip snip snip **

Please regard: exiter is a native WIN32 executable.

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.

I did another native cygwin test using true.exe:

*** snip snip snip **
#!/bin/sh
echo "starting $0"
while /usr/bin/true
do
:
done
echo "exiting $0"
*** snip snip snip **

Using this script the used virtual memory (windows task manager) grows too, but
even more slowly - so you have to run this script a long time.

Best regards

Heiko Elger



--
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



Re: [bash or DLL] Memory leak in childs

2011-07-17 Thread Mark Geisert
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,

..mark


--
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