Return-Path: Delivered-To: apmail-perl-dev-archive@www.apache.org Received: (qmail 12437 invoked from network); 18 Mar 2006 00:39:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Mar 2006 00:39:38 -0000 Received: (qmail 64866 invoked by uid 500); 18 Mar 2006 00:39:37 -0000 Delivered-To: apmail-perl-dev-archive@perl.apache.org Received: (qmail 64847 invoked by uid 500); 18 Mar 2006 00:39:37 -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 64836 invoked by uid 99); 18 Mar 2006 00:39:36 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Mar 2006 16:39:36 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of gozer@ectoplasm.org designates 66.34.202.202 as permitted sender) Received: from [66.34.202.202] (HELO minerva.ectoplasm.org) (66.34.202.202) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Mar 2006 16:39:34 -0800 Received: from minerva.ectoplasm.org (localhost.localdomain [127.0.0.1]) by pmx.secure.ectoplasm.org (Postfix) with SMTP id 853E45F54E; Fri, 17 Mar 2006 16:39:13 -0800 (PST) Received: from [192.168.10.200] (unknown [192.168.10.200]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by minerva.ectoplasm.org (Postfix) with ESMTP id 56DDF5F54D; Fri, 17 Mar 2006 16:39:13 -0800 (PST) Message-ID: <441B56A6.80309@ectoplasm.org> Date: Fri, 17 Mar 2006 16:39:02 -0800 From: "Philippe M. Chiasson" User-Agent: Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929) X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@perl.apache.org CC: Randy Kobes Subject: add_config() and thread-safety X-Enigmail-Version: 0.91.0.0 Content-Type: multipart/signed; micalg=pgp-ripemd160; protocol="application/pgp-signature"; boundary="------------enig87B510239B5F35773EAF5BEA" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --------------enig87B510239B5F35773EAF5BEA Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I've been looking at the failure Randy reported with t/api/add_config failing when run multiple times. Took a while, but I finally got my eyes open today. It's an issue of thread-safety that was completely overlooked. Trying to do something like: $r->add_config(['',[...],'']); Is not, and cannot be thread-safe, as it needs to access the server's core config at one point, leading to all sort of nastyness. Another way to achieve the same thing is with: $r->server->add_config() At request-time. With preform, this will work, but obviously, only affect the current child process. In my opinion, this is way *wrong* and needs to be fixed. Similarly to how .htaccess files work, you should only be able to affect configuration of the current request when using add_config() at request time. It's been fixed/implemented in r386774. (It's not documented yet, patches welcome) Randy, I'd like to know if your test failure dissapears with this change. -------------------------------------------------------------------------------- Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5 http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5 --------------enig87B510239B5F35773EAF5BEA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFEG1auyzKhB4jDpaURA6scAJ4/+9IZRsPybZAtpUHuI6ODL/my3QCgiDg9 YbfCQw130BiQaQrSgyzM6Po= =Dwhn -----END PGP SIGNATURE----- --------------enig87B510239B5F35773EAF5BEA--