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 60E2A184AF for ; Wed, 16 Sep 2015 13:34:00 +0000 (UTC) Received: (qmail 19374 invoked by uid 500); 16 Sep 2015 13:33:54 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 19334 invoked by uid 500); 16 Sep 2015 13:33:54 -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 19322 invoked by uid 99); 16 Sep 2015 13:33:54 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Sep 2015 13:33:54 +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 CB214C084E for ; Wed, 16 Sep 2015 13:33:53 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.006 X-Spam-Level: X-Spam-Status: No, score=-0.006 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.006, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id oq1_5vBDgn9i for ; Wed, 16 Sep 2015 13:33:43 +0000 (UTC) Received: from smtp-a.gkg.net (smtp-a.gkg.net [208.180.25.111]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTP id CE16343DCA for ; Wed, 16 Sep 2015 13:33:42 +0000 (UTC) Received: from amavis.gkg.net (amavisd4.gkg.net [208.180.25.202]) by smtp-a.gkg.net (Postfix) with ESMTP id 359D794ACE; Wed, 16 Sep 2015 08:33:36 -0500 (CDT) X-Virus-Scanned: by amavisd-new at gkg.net Received: from lothlorien.snowcrash.lan (proxy.gkg.net [208.180.24.220]) by smtp-a.gkg.net (Postfix) with ESMTPSA id 0C97394ACC; Wed, 16 Sep 2015 08:33:34 -0500 (CDT) Subject: Re: panic: attempt to copy freed scalar caused by calling cgi->param with TryCatch since perl 5.19.7 To: Vincent Veyron , mod_perl list References: <55F89898.3000700@gkg.net> <20150916140842.ad2d0566c2b74f2d536170fb@wanadoo.fr> From: Michael Schout X-Enigmail-Draft-Status: N1110 Message-ID: <55F96FAD.7060206@gkg.net> Date: Wed, 16 Sep 2015 08:33:33 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20150916140842.ad2d0566c2b74f2d536170fb@wanadoo.fr> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit On 9/16/15 7:08 AM, Vincent Veyron wrote: > I put your test handler on a machine running Debian 8 (jessie), it works just fine. Fails for me on both CentOS 7 and Darwin (OS X 10.10.5). I see you are using Apache 2.4 (I was using 2.2). I tested with Apache 2.4.16 and it also fails for me on that as well Server version: Apache/2.4.16 (Unix) Server built: Sep 16 2015 09:21:11 I built perl myself to rule out vendor applied patches to the perl dist. I wonder if one of the many patches debian applies to perl works around this issue somehow. Debian also applies a bunch of patches (18 as of current dpkg src) to the mod_perl package. Maybe one of those works around the issue. I'll sift through those patches and see if any of those help. Are you using debian packages for the CPAN modules at all? Or did you install all CPAN packages using a CPAN client? Because I also wonder if they patched TryCatch, Devel::Declare, or one of its dependencies to work around this issue. Here is the failure on CentOS 7, apache 2.4, perl 5.20.3, mod_perl 2.0.9, all built from scratch, no vendor packages used: [mschout@centos7 modperl-trycatch-bug]$ make test /home/mschout/perlbug/bin/perl -Iblib/arch -Iblib/lib \ t/TEST -clean [warning] setting ulimit to allow core files ulimit -c unlimited; /home/mschout/perlbug/bin/perl /home/mschout/modperl-trycatch-bug/t/TEST -clean APACHE_TEST_APXS= APACHE_TEST_GROUP= APACHE_TEST_HTTPD= APACHE_TEST_PORT= APACHE_TEST_USER= \ /home/mschout/perlbug/bin/perl -Iblib/arch -Iblib/lib \ t/TEST -bugreport -verbose=0 [warning] setting ulimit to allow core files ulimit -c unlimited; /home/mschout/perlbug/bin/perl /home/mschout/modperl-trycatch-bug/t/TEST -bugreport -verbose=0 /home/mschout/perlbug/bin/httpd -d /home/mschout/modperl-trycatch-bug/t -f /home/mschout/modperl-trycatch-bug/t/conf/httpd.conf -D APACHE2 -D APACHE2_4 -D PERL_USEITHREADS using Apache/2.4.16 (prefork MPM) waiting 60 seconds for server to start: .. waiting 60 seconds for server to start: ok (waited 1 secs) server localhost:8529 started t/crash.t .. Dubious, test returned 2 (wstat 512, 0x200) Failed 2/2 subtests t/logs/error_log [Wed Sep 16 09:27:19.394249 2015] [mpm_prefork:notice] [pid 4129] AH00163: Apache/2.4.16 (Unix) mod_perl/2.0.9 Perl/v5.20.3 configured -- resuming normal operations [Wed Sep 16 09:27:19.394372 2015] [mpm_prefork:info] [pid 4129] AH00164: Server built: Sep 16 2015 09:21:11 [Wed Sep 16 09:27:19.394381 2015] [core:notice] [pid 4129] AH00094: Command line: '/home/mschout/perlbug/bin/httpd -d /home/mschout/modperl-trycatch-bug/t -f /home/mschout/modperl-trycatch-bug/t/conf/httpd.conf -D APACHE2 -D APACHE2_4 -D PERL_USEITHREADS' [Wed Sep 16 09:27:19.394386 2015] [mpm_prefork:debug] [pid 4129] prefork.c(995): AH00165: Accept mutex: sysvsem (default: sysvsem) [Wed Sep 16 09:27:20.246297 2015] [authz_core:debug] [pid 4130] mod_authz_core.c(835): [client 127.0.0.1:46738] AH01628: authorization result: granted (no directives) [Wed Sep 16 09:27:20.498088 2015] [authz_core:debug] [pid 4130] mod_authz_core.c(835): [client 127.0.0.1:46739] AH01628: authorization result: granted (no directives) [Wed Sep 16 09:27:20.500796 2015] [perl:error] [pid 4130] [client 127.0.0.1:46739] panic: attempt to copy freed scalar 34259c0 to 3425870 at /home/mschout/modperl-trycatch-bug/blib/lib/Apache/TryCatch.pm line 20.\n [Wed Sep 16 09:27:20.526382 2015] [core:info] [pid 4129] AH00096: removed PID file /home/mschout/modperl-trycatch-bug/t/logs/httpd.pid (pid=4129) [Wed Sep 16 09:27:20.526398 2015] [mpm_prefork:notice] [pid 4129] AH00169: caught SIGTERM, shutting down But you are likely not seeing it because one of: - vendor patches applied by debian packaging team - you are using Apache 2.4. I tested with Apache 2.2. Regards, Michael Schout