Re: Apache::DBI 1.07+ causes seg faults

Perrin Harkins <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.