On Sat, 2003-03-22 at 23:14, Stas Bekman wrote:
> Nathan Byrd wrote:
> > Hi all,
> > 
> > I have been getting a segfault when starting mod_perl 2.x under rather
> > unusual circumstances.  Hopefully the below bug report will be useful,
> > although I'm not sure whether the problem lies in mod_perl 2.x or PAR.pm
> > (a CPAN module), but since the entire trace from debugging was in
> > mod_perl 2.x code, I thought I'd start here.  Please let me know if
> > there is any other information I can provide that would be helpful.
> 
> It's a mod_perl problem.
> 

Thanks for looking at this so quickly.

>  > Program received signal SIGSEGV, Segmentation fault.
>  > 0x4032dcf7 in modperl_cmd_modules (parms=0xbfffeae0, mconfig=0x80c6fc0,
>  >     arg=0x83dc268 "TestMod") at modperl_cmd.c:95
>  > 95              dTHXa(scfg->mip->parent->perl);
> 
> most likely it dereferences a NULL pointer.
> 
> > -------------8<---------- Start Bug Report ------------8<----------
> > 1. Problem Description:
> > 
> > Currently I'm getting a segmentation fault when starting mod_perl 2.x
> > (CVS)  This happens when doing the following steps:
> > 
> > Module is loaded via PerlModule (Apache::PAR).  That module then adds
> > configuration via Apache->httpd_conf($conf). 
> 
> Unrelated to the reported problem, but please don't use Apache::compat in CPAN 
> modules. Apache->httpd_conf is in compat.pm
> 

I'm sorry, I was looking at the wrong line. I'm not using Apache::compat
for Apache::PAR (figured it would be bad form.)  The line it's using
(for mod_perl 2.x) is:

$err = Apache->server->add_config([split /\n/, $conf]);

> > If the configuration being
> > added contains a PerlModule line for a module which is loaded via the
> > PAR CPAN module, I get the below trace.
> > 
> > The configuration which is sent to Apache->httpd_conf is:
> > 
> > Alias /test/module/ /home/techy/cvs/apache-par/t/par/module.par/
> > PerlModule TestMod
> > <Location /test/module>
> > SetHandler perl-script
> > PerlHandler TestMod
> > </Location>
> > 
> > I can't seem to duplicate this with other PerlModule lines included via
> > httpd_conf() other than ones for modules which are loaded via the PAR
> > module.  Further, if I leave out the PerlModule line, the rest of the
> > configuration works ok (and the module runs correctly)  It does not
> > appear to matter what the contents of TestMod.pm are.
> 
> That's becase scfg->mip->parent->perl is set later on.
> 
> Are you using a vhost for this section?
> 

No.

> Any chance you can come up with a stripped version of Apache::PAR that still 
> reproduces the problem? So we can have a good test?
> 
> If not, where do I get the version of Apache::PAR that you are having the 
> problem with?
> 

I'll definitely try to come up with a simplified version that duplicates
this.  If you feel like playing with it in the mean time, this does
happen with the latest CPAN version of Apache::PAR (0.11), but you may
have some trouble testing it with the included test scripts, as I
haven't had time yet to convert to Apache::Test, so make test fails "out
of the box" still on mod_perl 2.x (currently to test I'm modifying the
httpd.conf by hand that is generated from Apache::test, as otherwise
Apache::test works with 2.x)

-- 
Nathan Byrd <[EMAIL PROTECTED]>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to