segfault with perl 5.10 + MasonX::Request::WithApacheSession

segfault with perl 5.10 + MasonX::Request::WithApacheSession

am 19.05.2008 11:12:08 von Louis-David Mitterrand

[this message elicited no answers so far from mason-users, so maybe the
modperl community might be of help, thanks]

Hi,

Since I've upgraded to perl 5.10 on my debian unstable/sid box I get a
segfault when using MasonX::Request::WithApacheSession:

[Sat May 17 16:14:55 2008] [notice] Apache/2.2.8 (Debian) mod_apreq2-20051231/2.6.0 mod_perl/2.0.4 Perl/v5.10.0 configured -- resuming normal operations
[Sat May 17 16:15:03 2008] [notice] child pid 25786 exit signal Segmentation fault (11)
[Sat May 17 16:15:11 2008] [notice] child pid 25788 exit signal Segmentation fault (11)
[Sat May 17 16:15:12 2008] [notice] child pid 25789 exit signal Segmentation fault (11)

etc...

I marked the problematic handler.pl block with comments:

my $ah = new HTML::Mason::ApacheHandler(
autohandler_name=>'ah.mc',
dhandler_name=>'dh.mc',
comp_root=>'/var/www',
data_dir=>'/tmp/mason',
error_mode=>'output',
args_method=>'mod_perl',

## When commented out perl 5.10 works fine
request_class => 'MasonX::Request::WithApacheSession',
session_class => 'Apache::Session::Postgres',
session_data_source => 'dbi:Pg:dbname=sessions',
session_user_name => '',
session_password => '',
session_use_cookie => 1,
session_cookie_expires => undef,
## When commented out perl 5.10 works fine

);

When using a vanilla request_class all is well, but then I have to roll
my own %session object (which is not a huge problem).

I upgraded to libmasonx-request-withapachesession-perl_0.31-1_all.deb
with no difference.

Does someone have an idea about that segfault?

Thanks,

Re: segfault with perl 5.10 + MasonX::Request::WithApacheSession

am 19.05.2008 16:31:06 von Perrin Harkins

On Mon, May 19, 2008 at 5:12 AM, Louis-David Mitterrand
> ## When commented out perl 5.10 works fine
> request_class => 'MasonX::Request::WithApacheSession',
> session_class => 'Apache::Session::Postgres',
> session_data_source => 'dbi:Pg:dbname=sessions',
> session_user_name => '',
> session_password => '',
> session_use_cookie => 1,
> session_cookie_expires => undef,
> ## When commented out perl 5.10 works fine

My guess would be that your Postgres driver has a problem. Try
running some Pg queries from Mason.

- Perrin

Re: segfault with perl 5.10 + MasonX::Request::WithApacheSession

am 19.05.2008 16:32:18 von Fred Moyer

Louis-David Mitterrand wrote:
> [this message elicited no answers so far from mason-users, so maybe the
> modperl community might be of help, thanks]
>
> Hi,
>
> Since I've upgraded to perl 5.10 on my debian unstable/sid box I get a
> segfault when using MasonX::Request::WithApacheSession:
>
> [Sat May 17 16:14:55 2008] [notice] Apache/2.2.8 (Debian) mod_apreq2-20051231/2.6.0 mod_perl/2.0.4 Perl/v5.10.0 configured -- resuming normal operations
> [Sat May 17 16:15:03 2008] [notice] child pid 25786 exit signal Segmentation fault (11)
> [Sat May 17 16:15:11 2008] [notice] child pid 25788 exit signal Segmentation fault (11)
> [Sat May 17 16:15:12 2008] [notice] child pid 25789 exit signal Segmentation fault (11)

Did you rebuild mod_perl and libapreq with perl 5.10?


>
> etc...
>
> I marked the problematic handler.pl block with comments:
>
> my $ah = new HTML::Mason::ApacheHandler(
> autohandler_name=>'ah.mc',
> dhandler_name=>'dh.mc',
> comp_root=>'/var/www',
> data_dir=>'/tmp/mason',
> error_mode=>'output',
> args_method=>'mod_perl',
>
> ## When commented out perl 5.10 works fine
> request_class => 'MasonX::Request::WithApacheSession',
> session_class => 'Apache::Session::Postgres',
> session_data_source => 'dbi:Pg:dbname=sessions',
> session_user_name => '',
> session_password => '',
> session_use_cookie => 1,
> session_cookie_expires => undef,
> ## When commented out perl 5.10 works fine
>
> );
>
> When using a vanilla request_class all is well, but then I have to roll
> my own %session object (which is not a huge problem).
>
> I upgraded to libmasonx-request-withapachesession-perl_0.31-1_all.deb
> with no difference.
>
> Does someone have an idea about that segfault?
>
> Thanks,


--
Red Hot Penguin Consulting LLC
mod_perl/PostgreSQL consulting and implementation
http://www.redhotpenguin.com/

Re: segfault with perl 5.10 + MasonX::Request::WithApacheSession

am 19.05.2008 16:34:24 von Louis-David Mitterrand

On Mon, May 19, 2008 at 10:31:06AM -0400, Perrin Harkins wrote:
> On Mon, May 19, 2008 at 5:12 AM, Louis-David Mitterrand
> > ## When commented out perl 5.10 works fine
> > request_class => 'MasonX::Request::WithApacheSession',
> > session_class => 'Apache::Session::Postgres',
> > session_data_source => 'dbi:Pg:dbname=sessions',
> > session_user_name => '',
> > session_password => '',
> > session_use_cookie => 1,
> > session_cookie_expires => undef,
> > ## When commented out perl 5.10 works fine
>
> My guess would be that your Postgres driver has a problem. Try
> running some Pg queries from Mason.

I thought about that too, but declaring in my handler.pl:

sub handler {
....

$HTML::Mason::Commands::dbc = DBI->connect("dbi:Pg:dbname=critik", "",
"", {RaiseError=>1, PrintError=>1, AutoCommit=>1});
....
}

and using $dbc in my mason code works fine.

Re: segfault with perl 5.10 + MasonX::Request::WithApacheSession

am 19.05.2008 16:38:05 von Louis-David Mitterrand

On Mon, May 19, 2008 at 07:32:18AM -0700, Fred Moyer wrote:
> Louis-David Mitterrand wrote:
>> [this message elicited no answers so far from mason-users, so maybe the
>> modperl community might be of help, thanks]
>>
>> Hi,
>>
>> Since I've upgraded to perl 5.10 on my debian unstable/sid box I get a
>> segfault when using MasonX::Request::WithApacheSession:
>>
>> [Sat May 17 16:14:55 2008] [notice] Apache/2.2.8 (Debian) mod_apreq2-20051231/2.6.0 mod_perl/2.0.4 Perl/v5.10.0 configured -- resuming normal operations
>> [Sat May 17 16:15:03 2008] [notice] child pid 25786 exit signal Segmentation fault (11)
>> [Sat May 17 16:15:11 2008] [notice] child pid 25788 exit signal Segmentation fault (11)
>> [Sat May 17 16:15:12 2008] [notice] child pid 25789 exit signal Segmentation fault (11)
>
> Did you rebuild mod_perl and libapreq with perl 5.10?

I'm using debian packages which are rebuilt with perl 5.10:

libapache2-request-perl 2.08-5+b1
Depends: perl (>= 5.10.0-9)

libapache2-mod-perl2 2.0.4-1
Depends: perl (>= 5.10.0-9)

and anyway mod_perl seems to work fine except when using

request_class => 'MasonX::Request::WithApacheSession'

Re: segfault with perl 5.10 + MasonX::Request::WithApacheSession

am 19.05.2008 20:33:49 von Niko Tyni

On Mon, May 19, 2008 at 11:12:08AM +0200, Louis-David Mitterrand wrote:

> Since I've upgraded to perl 5.10 on my debian unstable/sid box I get a
> segfault when using MasonX::Request::WithApacheSession:
>
> [Sat May 17 16:14:55 2008] [notice] Apache/2.2.8 (Debian) mod_apreq2-20051231/2.6.0 mod_perl/2.0.4 Perl/v5.10.0 configured -- resuming normal operations
> [Sat May 17 16:15:03 2008] [notice] child pid 25786 exit signal Segmentation fault (11)
> [Sat May 17 16:15:11 2008] [notice] child pid 25788 exit signal Segmentation fault (11)
> [Sat May 17 16:15:12 2008] [notice] child pid 25789 exit signal Segmentation fault (11)

> ## When commented out perl 5.10 works fine
> request_class => 'MasonX::Request::WithApacheSession',

This looks very similar to , Cc'd as
480480@bugs.debian.org . I just sent a stack backtrace there, no idea
yet if the fault is with perl or mod_perl2.

Cheers,
--
Niko Tyni ntyni@debian.org

Re: segfault with perl 5.10 + MasonX::Request::WithApacheSession

am 20.05.2008 16:55:46 von Louis-David Mitterrand

On Mon, May 19, 2008 at 09:33:49PM +0300, Niko Tyni wrote:
> On Mon, May 19, 2008 at 11:12:08AM +0200, Louis-David Mitterrand wrote:
>
> > Since I've upgraded to perl 5.10 on my debian unstable/sid box I get a
> > segfault when using MasonX::Request::WithApacheSession:
> >
> > [Sat May 17 16:14:55 2008] [notice] Apache/2.2.8 (Debian) mod_apreq2-20051231/2.6.0 mod_perl/2.0.4 Perl/v5.10.0 configured -- resuming normal operations
> > [Sat May 17 16:15:03 2008] [notice] child pid 25786 exit signal Segmentation fault (11)
> > [Sat May 17 16:15:11 2008] [notice] child pid 25788 exit signal Segmentation fault (11)
> > [Sat May 17 16:15:12 2008] [notice] child pid 25789 exit signal Segmentation fault (11)
>
> > ## When commented out perl 5.10 works fine
> > request_class => 'MasonX::Request::WithApacheSession',
>
> This looks very similar to , Cc'd as
> 480480@bugs.debian.org . I just sent a stack backtrace there, no idea
> yet if the fault is with perl or mod_perl2.

Thanks for the pointer and fine investigative work on reducing the
problem to a perl one-liner!

Awaiting upstream now...

Cheers,