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: Subject: find(1) memory leak in cygheap From: Haojun Bao To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 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