Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 31147 invoked from network); 8 Dec 2004 15:31:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 8 Dec 2004 15:31:26 -0000 Received: (qmail 43741 invoked by uid 500); 8 Dec 2004 15:31:08 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 43724 invoked by uid 500); 8 Dec 2004 15:31:08 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 43707 invoked by uid 99); 8 Dec 2004 15:31:08 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Message-ID: <41B71E35.3050804@stason.org> Date: Wed, 08 Dec 2004 10:31:01 -0500 From: Stas Bekman Organization: Hope, Humanized User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 X-Accept-Language: en-us, en, he, ru MIME-Version: 1.0 To: Gisle Aas Cc: modperl@perl.apache.org Subject: Re: Fix perl/ithreads random failures References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Gisle Aas wrote: > I had to do tests with an older version of mod_perl_1.99 that still > had the perl/ithreads* tests. I see that these tests was removed from > the distribution in [1], but I think that if you apply the attached > patch you can start distribution these tests again. > > [1] http://cvs.apache.org/viewcvs.cgi/modperl-2.0/lib/ModPerl/Manifest.pm?r1=1.9&r2=1.10 > > Regards, > Gisle > > > Index: t/response/TestPerl/ithreads.pm > --- t/response/TestPerl/ithreads.pm.~1~ Wed Dec 8 03:43:55 2004 > +++ t/response/TestPerl/ithreads.pm Wed Dec 8 03:43:55 2004 > @@ -57,7 +57,10 @@ > $counter_shar += $counter_shar for 1..10; > }); > $counter_priv += $counter_priv for 1..10; > - $counter_shar += $counter_shar for 1..10; > + { > + lock $counter_shar; > + $counter_shar += $counter_shar for 1..10; > + } > $thr->join; > ok t_cmp(2**20, $counter_shar, "shared counter"); > ok t_cmp(2**10, $counter_priv, "private counter"); > End of Patch. Right on, Gisle. I was locking it inside the child-threads, but forgot about the parent. Thanks. -- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:stas@stason.org http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html