Return-Path: Delivered-To: apmail-perl-dev-archive@www.apache.org Received: (qmail 69023 invoked from network); 5 Dec 2004 16:20:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 5 Dec 2004 16:20:06 -0000 Received: (qmail 65464 invoked by uid 500); 5 Dec 2004 16:20:05 -0000 Delivered-To: apmail-perl-dev-archive@perl.apache.org Received: (qmail 65263 invoked by uid 500); 5 Dec 2004 16:20:05 -0000 Mailing-List: contact dev-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@perl.apache.org Received: (qmail 65248 invoked by uid 99); 5 Dec 2004 16:20:05 -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) Received: from mail.logilune.com (HELO mail.logilune.com) (195.80.154.36) by apache.org (qpsmtpd/0.28) with ESMTP; Sun, 05 Dec 2004 08:20:03 -0800 Received: from [127.0.0.1] (localhost.logilune.com [127.0.0.1]) by mail.logilune.com (Postfix) with ESMTP id 9C4821E1DA1; Sun, 5 Dec 2004 17:20:00 +0100 (CET) Message-ID: <41B3352F.8010805@stason.org> Date: Sun, 05 Dec 2004 11:19:59 -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: Joe Schaefer Cc: dev@perl.apache.org Subject: Re: win32 bb->cleanup crashes are still there? References: <41B0FDDD.8050308@stason.org> <87mzwsn60p.fsf@gemini.sunstarsys.com> <87is7gn572.fsf@gemini.sunstarsys.com> In-Reply-To: <87is7gn572.fsf@gemini.sunstarsys.com> 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 Joe Schaefer wrote: Sorry, I've pasted the old examples without updating them. Here is a diff against the current test (just one for now): Index: t/protocol/TestProtocol/echo_bbs2.pm =================================================================== --- t/protocol/TestProtocol/echo_bbs2.pm (revision 109678) +++ t/protocol/TestProtocol/echo_bbs2.pm (working copy) @@ -1,3 +1,4 @@ + package TestProtocol::echo_bbs2; # similar to TestProtocol::echo_bbs but here re-using one bucket @@ -4,11 +5,6 @@ # brigade for input and output, using flatten to slurp all the data in # the bucket brigade, and cleanup to get rid of the old buckets -# XXX: ideally $bb->cleanup should be used here and no create/destroy -# bb every time the loop is entered should be done. But it segfaults -# on certain setups: -# http://marc.theaimsgroup.com/?l=apache-modperl-dev&m=108967266419527&w=2 - use strict; use warnings FATAL => 'all'; @@ -28,11 +24,11 @@ # the socket to a blocking IO mode $c->client_socket->opt_set(APR::SO_NONBLOCK, 0); + my $bb_in = APR::Brigade->new($c->pool, $c->bucket_alloc); + my $bb_out = APR::Brigade->new($c->pool, $c->bucket_alloc); + my $last = 0; while (1) { - my $bb_in = APR::Brigade->new($c->pool, $c->bucket_alloc); - my $bb_out = APR::Brigade->new($c->pool, $c->bucket_alloc); - my $rc = $c->input_filters->get_brigade($bb_in, Apache::MODE_GETLINE); last if $rc == APR::EOF; @@ -48,11 +44,14 @@ $c->output_filters->fflush($bb_out); - # XXX: add DESTROY and remove explicit calls - $bb_in->destroy; - $bb_out->destroy; + $bb_in->cleanup; + $bb_out->cleanup; } + # XXX: add DESTROY and remove explicit calls + $bb_in->destroy; + $bb_out->destroy; + Apache::OK; } -- __________________________________________________________________ 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 --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org For additional commands, e-mail: dev-help@perl.apache.org