You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Ryan Veety <ry...@ryanspc.com> on 2002/03/01 20:38:26 UTC
Segfault when using LWP
I just upgraded to Apache 1.3.23, mod_perl 1.26, openssl 0.9.6c, modssl 2.8.7.
Since then, httpd segfaults every time I use LWP::UserAgent to grab from a ssl
server. The following mod_perl script is an example:
#!/usr/bin/perl
use strict;
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
my $request = HTTP::Request->new(GET => 'https://www.modssl.org/');
my $response = $ua->request($request);
my $text = $response->content;
print "Content-type: text/html\n\n";
print "It worked<BR>\n";
print $text;
This works perfectly from the command line, but segfaults when run within
mod_perl. It also works fine when run in /cgi-bin, and it will work fine when
run in mod_perl if I change the request from https to http. My first thought
was that the perl modules were linked to an older version of openssl, this is
not the case, I reinstalled all the perl modules and then even deleted perl
completely, recompiled it, reinstalled all the necessary perl modules, rebuilt
apache/mod_perl with the rebuilt perl, and the same thing still happens. Once
httpd segfaults once, each apache process seems to crash/restart once per
second until I apachectl restart :(. This all worked fine under mod_perl
1.25.
Any ideas??
Ryan
__________________________________________________________
.' Ryan Veety <ry...@ryanspc.com> - http://www.ryanspc.com `.
| PGP Key: http://www.ryanspc.com/pgp.txt |
`----------------------------------------------------------'
Re: Segfault when using LWP
Posted by Ryan Veety <ry...@ryanspc.com>.
DOH! Nevermind, I figured it out. I didn't run ldconfig after upgrading
openssl, so httpd was linked to a different version than the ssl perl modules,
which aparently caused the segfaults... Like I said earlier I thought it was
a library version mismatch so I recompiled *everything*, but for some reason
the perl modules seemed to pick up the new libcrypto without me running
ldconfig??. Oh well, thanks anyway.
Ryan
__________________________________________________________
.' Ryan Veety <ry...@ryanspc.com> - http://www.ryanspc.com `.
| PGP Key: http://www.ryanspc.com/pgp.txt |
`----------------------------------------------------------'
Re: Segfault when using LWP
Posted by darren chamberlain <dl...@users.sourceforge.net>.
Quoting Ryan Veety <ry...@ryanspc.com> [Mar 01, 2002 14:38]:
> I just upgraded to Apache 1.3.23, mod_perl 1.26, openssl
> 0.9.6c, modssl 2.8.7. Since then, httpd segfaults every time I
> use LWP::UserAgent to grab from a ssl server.
Did you upgrade Perl? Perl 5.6.0 has a DynaLoader bug that
causes things to segfault quite often (it's fixed in 5.6.1). We
noticed it initially with LWP; I think it was actually happening
in one of the HTML:: modules that had XS componenants in it.
(darren)
--
Think like a man of action, act like a man of thought.