Return-Path: X-Original-To: apmail-perl-modperl-archive@www.apache.org Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 23E8D10FBA for ; Mon, 3 Nov 2014 08:46:05 +0000 (UTC) Received: (qmail 11325 invoked by uid 500); 3 Nov 2014 08:46:04 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 11288 invoked by uid 500); 3 Nov 2014 08:46:04 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 11278 invoked by uid 99); 3 Nov 2014 08:46:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Nov 2014 08:46:03 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of steve.m.hay@googlemail.com designates 209.85.212.169 as permitted sender) Received: from [209.85.212.169] (HELO mail-wi0-f169.google.com) (209.85.212.169) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Nov 2014 08:46:00 +0000 Received: by mail-wi0-f169.google.com with SMTP id n3so5442814wiv.0 for ; Mon, 03 Nov 2014 00:44:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=/bbHtg6XToj0mYo/Xjp0cOwD9MTRAunIkSIhQqsQT78=; b=vzSo4LPJvHGXRJv2xw0c5GR/AGldGP2YJZA3a1xzIYdRZZWj7u+fy7GnT1G8b45cdU lfrv1zVLo9mlJrhbZLnjY0CDX/vuzxU1DJhovQtz6kPfOOC9jrpmrb1rIomoSm1FqEV8 T5hWX6P3MUNmym2aYPtz6iFBUZ14p3PInrYRkrrjGVuXhMbj/pp3bHQF36NWHxdfekE4 0ni3av8WZZqGOoILi2x9TJsbiPbfnxhA0tjfYnwdLo9O/+F8Vcr+5hPWo7gVYik/HV4t uZIIlcvcE+9DxN0iXYmj2m7YTmkD8tFNOwys2g+6+AsvQX52pNFGmr5RIXUGiLW6Svz4 /2Fw== MIME-Version: 1.0 X-Received: by 10.180.211.166 with SMTP id nd6mr14313577wic.81.1415004293666; Mon, 03 Nov 2014 00:44:53 -0800 (PST) Received: by 10.27.54.208 with HTTP; Mon, 3 Nov 2014 00:44:53 -0800 (PST) In-Reply-To: References: <275671956B4337459E14A61834A5C03E3B283835@ECS-EXG-P-MB01.win.lanl.gov> Date: Mon, 3 Nov 2014 08:44:53 +0000 Message-ID: Subject: Re: A patch to fix one sort of mod_perl crash I've been experiencing. From: Steve Hay To: "Kandarian, Richard M" Cc: "modperl@perl.apache.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On 31 October 2014 08:47, Steve Hay wrote: > On 4 June 2014 21:02, Kandarian, Richard M w= rote: >> Reading MP_TRACE messages I noticed that for every modperl_interp_select= () call during a request there were two modperl_interp_unselect() calls, on= e bracketing the _select() call and one from the registered cleanup when th= e pool was destroyed. The attached patch stopped those crashes. I would cal= l my fix VERY tentative for various reasons including my noobiness and I'v= e added comments near the active ingredient in modperl_interp.c. Inactive i= ngredients include diffs in the patch which are my adding trace info. >> > > Apologies for the long delay in following up on this. > [...] > > I will ask Jan Kaluza about the refcnt business since he authored the > change I cited above which dropped the refcnt decrement in the case > where refcnt is 1. After speaking with Jan, I have now committed the second patch above in r1636289. (We think that the refcnt change alone should fix your crash, but it doesn't hurt to have the extra safety net of the early return if the interp is already unselected, although that shouldn't happen now.) Many thanks for your work on this.