Re: Apache::DBI 1.07+ causes seg faults

Fred Moyer <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
There was this recent thread which may be helpful - I didn't follow it
that closely:

http://www.gossamer-threads.com/lists/modperl/modperl/102636


On Wed, Mar 2, 2011 at 8:10 AM, Richard Chen <[email protected]> wrote:
> Hi,
>
>        In order to make use of the ChildExitHandler introduced
> in Apache::DBI 1.09, we upgraded Apache::DBI from 1.06 to 1.10.
> But we immediately encounter seg faults errors for every request.
> The problem is traced back to the line 160 of Apache::DBI 1.10:
>
>            # We may not actually be in a request, but in <Perl> (or
>            # equivalent such as startup.pl), in which case this would die.
>            eval { $r = Apache2::RequestUtil->request };
>
>        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?
> Why is $r preferable to $s? It seems that $s is much more reliable.
>
>        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. Once I introduce such a test, I see errors like
>
> Global $r object is not available. Set:
>        PerlOptions +GlobalRequest
> in httpd.conf at /u01/perlgem_www/server/site_perl_debug/Apache/DBI.pm
> line 160.
>
> But adding
>
>        PerlOptions +GlobalRequest
>
> in httpd.conf does not stop the seg faults from happening.
>
> Does anyone else counter similar issues and knows a work around?
>
> This is for
>
> Apache/2.2.13 (Unix) mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.8.8
>
> Thanks for any info.
>
> Regards
>
> Richard
>
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.