delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=0.0 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_45,SARE_MSGID_LONG40,SPF_PASS |
X-Spam-Check-By: | sourceware.org |
MIME-Version: | 1.0 |
Date: | Wed, 19 Aug 2009 19:47:37 +0800 |
Message-ID: | <c8a3efee0908190447l11062bf1waba8ca9df5581468@mail.gmail.com> |
Subject: | find(1) memory leak in cygheap |
From: | Haojun Bao <baohaojun AT gmail DOT com> |
To: | cygwin AT cygwin DOT com |
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 |
Note-from-DJ: | This may be spam |
I found this problem when running updatedb, the find will print 2 [main] find 2592 C:\cygwin\bin\find.exe: *** fatal error - cmalloc would have returned NULL I have dumped the cygheap using gdb to see what's in it, the size is about 25M, and I use strings.exe to examine the strings in it, all the folder names that find has looked into is in it, both native format and cygwin format of the folders names. And there are lot's of folders in my android source folder, so the cygheap is filled up. I think maybe this is a memory leak? Please use the following script to test: #!/bin/bash set -e set -o pipefail mkdir /xxx -p cd /xxx #make sure the folder is long enough so that the memory fill easily. LONG_FOLDER=`/bin/python -c 'print ("./" + "x"*200)*35'` mkdir -p ${LONG_FOLDER} cd ${LONG_FOLDER} for ((x=0; x<1000; x++)); do echo $x; done|xargs mkdir -p cd /xxx find .|wc -l echo OK cd / rm xxx -rf -- 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 |