Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 51603 invoked from network); 24 Aug 2010 14:51:10 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 24 Aug 2010 14:51:10 -0000 Received: (qmail 33925 invoked by uid 500); 24 Aug 2010 14:51:10 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 33638 invoked by uid 500); 24 Aug 2010 14:51:07 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 33622 invoked by uid 99); 24 Aug 2010 14:51:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Aug 2010 14:51:07 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [72.167.82.89] (HELO p3plsmtpa01-09.prod.phx3.secureserver.net) (72.167.82.89) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 24 Aug 2010 14:51:00 +0000 Received: (qmail 12766 invoked from network); 24 Aug 2010 14:50:40 -0000 Received: from unknown (76.252.112.72) by p3plsmtpa01-09.prod.phx3.secureserver.net (72.167.82.89) with ESMTP; 24 Aug 2010 14:50:39 -0000 Message-ID: <4C73DC3B.6040500@rowe-clan.net> Date: Tue, 24 Aug 2010 09:50:35 -0500 From: "William A. Rowe Jr." User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.11) Gecko/20100711 Lightning/1.0b1 Thunderbird/3.0.6 MIME-Version: 1.0 To: dev@apr.apache.org Subject: Re: Thread handle leak in APR References: <065a01cb3dfc$ead7df60$b4cb4d0a@cisco.com> <019a01cb4035$e1609a40$b4cb4d0a@cisco.com> <4C6EC48F.2040400@apache.org> <4C6EC9AA.5050506@rowe-clan.net> <01b701cb40dd$27006b00$75014100$@vmoo.com> In-Reply-To: <01b701cb40dd$27006b00$75014100$@vmoo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 8/20/2010 10:01 PM, Bert Huijben wrote: >> -----Original Message----- >> From: Erik Huelsmann [mailto:ehuels@gmail.com] >> Sent: vrijdag 20 augustus 2010 13:20 >> To: William A. Rowe Jr. >> Cc: dev@apr.apache.org >> Subject: Re: Thread handle leak in APR >> >> On Fri, Aug 20, 2010 at 8:30 PM, William A. Rowe Jr. >> wrote: >>> On 8/20/2010 1:08 PM, Guenter Knauf wrote: >>>> Hi Prathima, >>>> Am 20.08.2010 09:04, schrieb Prathima Dandapani -X (pdandapa - HCL at >>>> Cisco): >>>>> Steps used to compile Apache is as follows. >>>>> Run Setenv.cmd from the Windows-Server-2003-R2-Platform-SDK >> installed >>>>> directory >>>>> Run vcvars32.bat from VC++ installed directory. >>>> AFAICT this is the wrong order; first you need to call vcvars32.bat, >>>> then Setenv.cmd so that the PSDK paths are prepended. >>> >>> Precisely :) >> >> Will reversing the order make his leak disappear? > > Changing the order might give you older or newer .lib and .h files depending on the exact VS and SDK versions, so it might add or hide some functions that are otherwise unavailable. But it should never change the behavior. Thread handles are reaped when apr_thread_join() is called, which is how you 'harvest' now-dead (or soon-to-be-dead) threads. It looks like you have a non-ASF module creating threads frequently, from the users@ list post; I didn't see a ton of dups in that list. Don't forget you have to free them, if you are the author of the module. If you are using third party modules, you keep forgetting to mention which one(s).