Return-Path: X-Original-To: apmail-perl-dev-archive@www.apache.org Delivered-To: apmail-perl-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 38A891062F for ; Wed, 6 Nov 2013 13:50:36 +0000 (UTC) Received: (qmail 74702 invoked by uid 500); 6 Nov 2013 13:50:35 -0000 Delivered-To: apmail-perl-dev-archive@perl.apache.org Received: (qmail 74664 invoked by uid 500); 6 Nov 2013 13:50:33 -0000 Mailing-List: contact dev-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@perl.apache.org Received: (qmail 74657 invoked by uid 99); 6 Nov 2013 13:50:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Nov 2013 13:50:32 +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 (nike.apache.org: domain of steve.m.hay@googlemail.com designates 209.85.214.182 as permitted sender) Received: from [209.85.214.182] (HELO mail-ob0-f182.google.com) (209.85.214.182) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Nov 2013 13:50:26 +0000 Received: by mail-ob0-f182.google.com with SMTP id wn1so10040918obc.41 for ; Wed, 06 Nov 2013 05:50:05 -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; bh=JPq/CwRfFIcoXkMCiUjN2E9THl23o2DgHhCZucF2dMM=; b=nkdkk3eXamUNd9v+35jAe0J6bi23Xz2iboYRjXwvdAeaMBVaWBuosqIrJx4B2soTs1 mEfVAGwNIDbBIAzddE6qa6NgTgqKb7Udm4U6Z2euyqZaGe4pxBmowOBxoSJwjhh6inkK rGIKVjUxKq04EyVRhNk2CGUqapcD0FXB9kOi4s4x5lIXL490GyOQ2xopV4PrNEe5hlqK HPdmG/adRVhuTR6mMVuBV8EBvoom0HbG9JZ2h9JOjbcUB9/6rgbTInKHuO/LV47eLa6Q oWmpteO39IHfe0CuP4X19nPqLyYRtxK+5zliJ4XEv+Hic9lhe1AnGiyc3xgymeaf3O99 tXGQ== MIME-Version: 1.0 X-Received: by 10.182.101.134 with SMTP id fg6mr2758600obb.30.1383745805060; Wed, 06 Nov 2013 05:50:05 -0800 (PST) Received: by 10.60.43.131 with HTTP; Wed, 6 Nov 2013 05:50:04 -0800 (PST) In-Reply-To: References: Date: Wed, 6 Nov 2013 13:50:04 +0000 Message-ID: Subject: Re: need sanity check on my mod_perl + 2.4.6 on Windows attempt From: Steve Hay To: Jeff Trawick Cc: dev@perl.apache.org Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org On 6 November 2013 12:27, Jeff Trawick wrote: > On Wed, Nov 6, 2013 at 4:02 AM, Steve Hay > wrote: >> >> On 6 November 2013 00:48, Jeff Trawick wrote: >> > Back to the httpd24threading branch: >> > >> > * modperl_interp_pool_select() has this notion of phase, which must >> > either >> > be startup or request context. >> > * It thinks it is startup only if the pool passed in is >> > s->process->pconf. >> > * Sometimes it is passed s->process->pool (parent of pconf), such as >> > from >> > perl_parse_require_line(). >> > * perl_parse_require_line() can sometimes be called from request >> > context. >> > * When perl_parse_require_line() calls modperl_interp_pool_select(), >> > request >> > context can never be identified because perl_parse_require_line() never >> > passes in r->pool (which I guess would be cmd->pool). >> > * etc. >> > >> > This would seem to be the way to get the right pool to >> > modperl_interp_pool_select(). >> > >> > Index: src/modules/perl/modperl_util.c >> > =================================================================== >> > --- src/modules/perl/modperl_util.c (revision 1539040) >> > +++ src/modules/perl/modperl_util.c (working copy) >> > @@ -989,7 +989,7 @@ >> > int count; >> > void *key; >> > auth_callback *ab; >> > - MP_dINTERP_POOLa(cmd->server->process->pool, cmd->server); >> > + MP_dINTERP_POOLa(cmd->pool, cmd->server); >> > >> > if (global_authz_providers == NULL) { >> > MP_INTERP_PUTBACK(interp, aTHX); >> > >> > That still doesn't bring happiness (no interpreter returned, resulting >> > in a >> > crash trying to dereference interp). >> > >> >> I'm getting the same crash-on-startup behaviour now myself after a >> fresh rebuild of everything (now using httpd-2.4.6 and perl-5.19.5). I >> will look back over the changes made on the threading branch and/or my >> merges of them into the httpd24 branch. Hopefully the answer lies >> there somewhere. I'll be very grateful for any help I can get with >> this though -- I didn't do the original work on either of those >> branches... > > > With the "fix" above in place, modperl_init_vhost() seems to be the next > crucial code. We go down this path: > > if (base_server == s) { > MP_TRACE_i(MP_FUNC, "base server is not vhost, skipping %s", > vhost); > return OK; > } > > and fall through this FIXME in modperl_interp_pool_select(): > > if (!scfg->mip) { > /* FIXME: We get here if global "server_rec" == s, > scfg->mip > * is not created then. I'm not sure if that's bug or > * bad/good design decicision. For now just return NULL. > */ > return NULL; > } > > (Note: disabling the base_server == s check in modperl_init_vhost() brings > no happiness either, though perhaps it is a step in the right direction.) > > This path is new with httpd 2.4; 2.2 didn't have authz_providers. > > This seems to be a whack-a-mole issue. I'd expect that there is some easy > way to grab the interpreter for any arbitrary startup path, but I don't see > it. Maybe it is worthwhile seeing if we already went through some paths > where we were able to grab an interpreter. > The last change on the httpd24 branch (r1503193) is what added the FIXME above, but it also made a change in perl_parse_require_line() which I've lost in the course of merging the threading branch in: it made that function tolerant of modperl_interp_pool_select() returning NULL (which is exactly what happens in the FIXME case). If modperl_interp_pool_select() returns NULL then perl_parse_require_line() just returns NULL itself in r1503193, but in httpd24threading I've hidden the use of modperl_interp_pool_select() within the MP_dINTERP_POOLa() macro (as per the general style of changes in the threading branch), but that macro crashes if modperl_interp_pool_select() has returned NULL. The diff below makes that macro tolerant of modperl_interp_pool_select() returning NULL, and makes perl_parse_require_line() tolerant of interp ending up NULL, like it used to be in r1503193. With this diff in place (which includes your earlier change), the server now starts up for me and tests appear to be running as normal. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org For additional commands, e-mail: dev-help@perl.apache.org