From dev-return-14405-archive-asf-public=cust-asf.ponee.io@perl.apache.org Wed Oct 2 17:14:39 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 13BF818064F for ; Wed, 2 Oct 2019 19:14:38 +0200 (CEST) Received: (qmail 56674 invoked by uid 500); 2 Oct 2019 17:14:38 -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 56663 invoked by uid 99); 2 Oct 2019 17:14:38 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Oct 2019 17:14:38 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 75232C2433 for ; Wed, 2 Oct 2019 17:14:37 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.3 X-Spam-Level: X-Spam-Status: No, score=0.3 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, KAM_NUMSUBJECT=0.5, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=googlemail.com Received: from mx1-he-de.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 5n7Kf2LgNF94 for ; Wed, 2 Oct 2019 17:14:35 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2607:f8b0:4864:20::d41; helo=mail-io1-xd41.google.com; envelope-from=steve.m.hay@googlemail.com; receiver= Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) by mx1-he-de.apache.org (ASF Mail Server at mx1-he-de.apache.org) with ESMTPS id 28C527DE0E for ; Wed, 2 Oct 2019 17:07:52 +0000 (UTC) Received: by mail-io1-xd41.google.com with SMTP id b136so58627161iof.3 for ; Wed, 02 Oct 2019 10:07:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/HX05IoTy401jKUNUZnaUCHKXM2tjafdc/fptyjjb74=; b=nDhjobn/SdH+rNrp+D9FpRLdbqg1+pfrNNeW6SdA4jHLrjQXXrvjogMSx/vULee12f 5lr8DRTqGMNt5e97KqdFSsoGO/yEHey6TaShgiO3FSPbuEWi57Mp5sCyuWmv1gKQdBrz Jlhn+SF0jDqQbBZA+aZi+iDYsSvxW62tr1p/kDdDEgOfyAlk7uRY5dmUhtcP3WE3bEYm QZHAQq1pgMnqIbTUOMY4COCS8J25QWuAr1a4pGSdRggOqSZnA6mRovkxTldlfiYFNtFc oS2h3C0N3hll1LYKcJyIZNedxc95KRUUZlm4+1LrQaAJRuIRFmuoCxKtVgEOXKBhqBZc W87g== X-Gm-Message-State: APjAAAUCLTdmMBuGG/gBZ0PiXMFLVrzoG9zZLWDgcfSVIMp1yELxn0e+ gKsoupycygfzTYX3YeX9MFfVbi1dVE3yBGUmTmIq2jNr X-Google-Smtp-Source: APXvYqxJ11LJiZJ7T73Vs1n4o9b8PXZBXs63c3CIuTYa6obWxcVZdaDC8bpT1O8y9BXN5+0msVzWYLp+y58N2284Hu0= X-Received: by 2002:a92:145:: with SMTP id 66mr4942038ilb.14.1570036070656; Wed, 02 Oct 2019 10:07:50 -0700 (PDT) MIME-Version: 1.0 References: <20190926220537.GR2230@palma.openstrike.co.uk> <20190927103150.GD2232@palma.openstrike.co.uk> <20191002100343.GD2230@palma.openstrike.co.uk> In-Reply-To: <20191002100343.GD2230@palma.openstrike.co.uk> From: Steve Hay Date: Wed, 2 Oct 2019 18:07:39 +0100 Message-ID: Subject: Re: [RELEASE CANDIDATE] mod_perl-2.0.11 RC3 To: Pete Houston Cc: dev@perl.apache.org Content-Type: multipart/mixed; boundary="00000000000047d6150593f0828d" --00000000000047d6150593f0828d Content-Type: text/plain; charset="UTF-8" On Wed, 2 Oct 2019 at 11:03, Pete Houston wrote: > > On Wed, Oct 02, 2019 at 08:13:59AM +0100, Steve Hay wrote: > > > > I think the last line of the log extracts above is the clue, but I'm > > not going to be able to fix this myself. Line 119 in > > Apache2/Resource.pm is: > > > > my ($soft, $hard) = getrlimit $val; > > > > So it looks like $val is blank. That comes from line 118: > > > > my $val = eval "&BSD::Resource::${res}()"; > > > > where $res is one of the keys of the $lim hashref, which comes from line 112: > > > > my $lim = get_rlimits(); > > > > Both getrlimit() and get_rlimits() are further BSD::Resource > > functions, which I see the error log also has further references to > > above (several uninitialized value warnings), but is not a thing that > > I have access to on Windows. Unless anyone else can help here then > > we'll have to let this one go for now. Hopefully it's not a > > showstopper. > > Thanks for this diagnosis. Going through the resources here I do see > some which were undef and thus causing getrlimit to complain. Attached > is the trivial patch which now makes the test pass for me. It seemed > reasonable to simply omit undef resources but you might have a contrary > view. > > For the record the undef resources I see are: > > RLIMIT_NICE > RLIMIT_SIGPENDING > RLIMIT_RTTIME > RLIMIT_RTPRIO > RLIMIT_MSGQUEUE > I'm not sure about this area, but if it works for with your patch then it's probably an improvement :-) Just out of interest, does the following alternative patch work? Index: lib/Apache2/Resource.pm =================================================================== --- lib/Apache2/Resource.pm (revision 1866274) +++ lib/Apache2/Resource.pm (working copy) @@ -115,8 +115,7 @@ ""); for my $res (keys %$lim) { - my $val = eval "&BSD::Resource::${res}()"; - my ($soft, $hard) = getrlimit $val; + my ($soft, $hard) = getrlimit($lim->{$res}); (my $limit = $res) =~ s/^RLIMIT_//; ($soft, $hard) = ("$soft " . BM($soft), "$hard ". BM($hard)) if $is_mb{$limit}; This avoids making the &BSD::Resource::${res}() calls, which are what is returning undef for you in some cases. Or does this fail just the same because some of the values of %$lim are also undef anyway? --00000000000047d6150593f0828d Content-Type: application/octet-stream; name="Resource-v2.patch" Content-Disposition: attachment; filename="Resource-v2.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_k19ivj2n0 SW5kZXg6IGxpYi9BcGFjaGUyL1Jlc291cmNlLnBtDQo9PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQotLS0gbGliL0FwYWNo ZTIvUmVzb3VyY2UucG0JKHJldmlzaW9uIDE4NjYyNzQpDQorKysgbGliL0FwYWNoZTIvUmVzb3Vy Y2UucG0JKHdvcmtpbmcgY29weSkNCkBAIC0xMTUsOCArMTE1LDcgQEANCiAgICAgICAgICAgICAg ICAgICAiPC90cj4iKTsKIAogICAgIGZvciBteSAkcmVzIChrZXlzICUkbGltKSB7Ci0gICAgICAg IG15ICR2YWwgPSBldmFsICImQlNEOjpSZXNvdXJjZTo6JHtyZXN9KCkiOwotICAgICAgICBteSAo JHNvZnQsICRoYXJkKSA9IGdldHJsaW1pdCAkdmFsOworICAgICAgICBteSAoJHNvZnQsICRoYXJk KSA9IGdldHJsaW1pdCgkbGltLT57JHJlc30pOwogICAgICAgICAobXkgJGxpbWl0ID0gJHJlcykg PX4gcy9eUkxJTUlUXy8vOwogICAgICAgICAoJHNvZnQsICRoYXJkKSA9ICgiJHNvZnQgIiAuIEJN KCRzb2Z0KSwgIiRoYXJkICIuIEJNKCRoYXJkKSkKICAgICAgICAgICAgIGlmICRpc19tYnskbGlt aXR9Owo= --00000000000047d6150593f0828d Content-Type: text/plain; charset=us-ascii --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org For additional commands, e-mail: dev-help@perl.apache.org --00000000000047d6150593f0828d--