perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Perrin Harkins <per...@elem.com>
Subject Re: Apache::DBI 1.07+ causes seg faults
Date Thu, 03 Mar 2011 12:53:13 GMT
Hi Richard,

>        In Apache::DBI 1.06 $r is not used but $s is used. And no such
> seg faults occur. Any one know what is the rational for this change?

Yes.  It didn't work in Apache::DBI 1.06.  Attaching a cleanup handler
to $s does not run that handler at the end of the current request,
which is what needs to happen here.

> Why is $r preferable to $s? It seems that $s is much more reliable.

They are totally different things.  $s is the server, so the cleanup
would not get run until server shutdown.

>        Also, there is no testing on eval status by checking $@ right
> after eval. As a module used by many, Apache::DBI should have checked
> such status.

I agree.  The eval is intended to suppress the error you're seeing
though, since it happens when this code is called during startup but
isn't important.

So, the problem here is that your mod_perl is segfaulting when this is
called.  That should not happen, and doesn't seem to be happening for
others.  Can you try a simple test where you just try to grab a $r
inside an eval in your startup.pl and see if it segfaults?

- Perrin

Mime
View raw message