Return-Path: Delivered-To: apmail-perl-dev-archive@www.apache.org Received: (qmail 10387 invoked from network); 11 Jan 2005 20:22:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 11 Jan 2005 20:22:41 -0000 Received: (qmail 6805 invoked by uid 500); 11 Jan 2005 20:22:40 -0000 Delivered-To: apmail-perl-dev-archive@perl.apache.org Received: (qmail 6793 invoked by uid 500); 11 Jan 2005 20:22:40 -0000 Mailing-List: contact dev-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@perl.apache.org Received: (qmail 6775 invoked by uid 99); 11 Jan 2005 20:22:40 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from gw.activestate.com (HELO smtp1.ActiveState.com) (209.17.183.249) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 11 Jan 2005 12:22:39 -0800 Received: from smtp3.ActiveState.com (smtp3.ActiveState.com [192.168.3.19]) by smtp1.ActiveState.com (8.12.10/8.12.10) with ESMTP id j0BKMZNh003848; Tue, 11 Jan 2005 12:22:35 -0800 (envelope-from gisle@ActiveState.com) Received: from caliper.activestate.com (caliper.ActiveState.com [192.168.3.82]) by smtp3.ActiveState.com (8.12.11/8.12.11) with ESMTP id j0BKMFOK005869; Tue, 11 Jan 2005 12:22:15 -0800 (envelope-from gisle@ActiveState.com) Received: from caliper.activestate.com (localhost.localdomain [127.0.0.1]) by caliper.activestate.com (8.12.8/8.12.8) with ESMTP id j0BKMYoD017983; Tue, 11 Jan 2005 12:22:34 -0800 Received: (from gisle@localhost) by caliper.activestate.com (8.12.8/8.12.8/Submit) id j0BKMU99017979; Tue, 11 Jan 2005 12:22:30 -0800 To: Stas Bekman Cc: perl5-porters@perl.org, mod_perl Dev Subject: Re: [PATCH] libperl leaks a THREAD_KEY each time it is reloaded References: <41DDA584.1060109@stason.org> <41E2C05F.40002@stason.org> <41E2E222.4070202@stason.org> <41E2FE94.70908@stason.org> <41E3EA79.1050308@stason.org> <41E3FE5C.50304@stason.org> <41E42F20.2020102@stason.org> From: Gisle Aas Date: 11 Jan 2005 12:22:30 -0800 In-Reply-To: <41E42F20.2020102@stason.org> Message-ID: Lines: 34 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Stas Bekman writes: > The latest version is: > > Index: src/modules/perl/mod_perl.c > =================================================================== > --- src/modules/perl/mod_perl.c (revision 124805) > +++ src/modules/perl/mod_perl.c (working copy) > @@ -573,6 +573,17 @@ > MP_threads_started = 0; > MP_post_post_config_phase = 0; > > + /* with USE_ITHREADS perl leaks pthread_key_t on every > + * perl_destruct, which becomes a problem restarts: if the OS I would fix this comment a bit. There isn't a pthread_key_t leaked on every perl_destruct. There is a pthread_key_t leaked on every reload of libperl.{a,so}. > + * limit is 1024, 1024 restarts later things will start > + * crashing */ > + /* XXX: this is a workaround for the bug in perl, once and if it's > + * fixed we need to disable it for the versions that have it > + * fixed */ > + if (PL_curinterp) { > + FREE_THREAD_KEY; > + } Still seems like a good idea to protect this section in a #ifdef USE_ITHREADS block to match when PL_curinterp follow the invariant you are testing for here. > + > MP_TRACE_i(MP_FUNC, "mod_perl sys term\n"); --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org For additional commands, e-mail: dev-help@perl.apache.org