gemoroy has asked for the wisdom of the Perl Monks concerning the following question:

Hi wise monks!
I encountered a strange problem with writing bucket bridge oriented filters

Stream oriented filters working perfectly, but bucket oriented filters cause waiting for response till apache forked child crashes with segfault.
Even mod_perl2 documentation example failed
package MyApache2::InputRequestFilterLC; use strict; use warnings; use base qw(Apache2::Filter); use Apache2::Connection (); use APR::Brigade (); use APR::Bucket (); use Apache2::Const -compile => 'OK'; use APR::Const -compile => ':common'; sub handler : FilterRequestHandler { my ($f, $bb, $mode, $block, $readbytes) = @_; my $c = $f->c; my $bb_ctx = APR::Brigade->new($c->pool, $c->bucket_alloc); my $rv = $f->next->get_brigade($bb_ctx, $mode, $block, $readbyte +s); return $rv unless $rv == APR::Const::SUCCESS; while (!$bb_ctx->is_empty) { my $b = $bb_ctx->first; if ($b->is_eos) { $bb->insert_tail($b); last; } my $len = $b->read(my $data); $b = APR::Bucket->new($bb->bucket_alloc, lc $data) if $len; $b->remove; $bb->insert_tail($b); } return Apache2::Const::OK; } 1;
I'd like to ask if someone else encountered such issue before starting to debug apache code.
PS my best guess is smth with dataready filter
I am using perl 5.8.9, apache 2.2.3 mod_ssl 2.2.3 on a current freebsd 9 cvs snapshot.

Replies are listed 'Best First'.
Re: Apache 2.2 mod_ssl and bucket's
by trwww (Priest) on Feb 10, 2010 at 07:14 UTC

    I dont have an answer, and someone here probably will have something for you, but probably the best place to ask this question is on the mod_perl mailing list.