You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Cory Omand <co...@blastwave.org> on 2006/03/30 02:06:46 UTC
Re: Apache 2.2 and libapreq2 2.0.7 segfault
Hi,
I am having issues with Apache 2.2 and libapreq2 2.07. Even very
simple tests which construct new Apache2::Request objects are
resulting in segfaults. I have the following server setup:
Apache/2.2.0 (Unix) DAV/2 mod_apreq2-20051231/2.5.7 mod_perl/2.0.2 Perl/v5.8.8
This server uses the Apache prefork mpm, under Solaris 10. I set up
the following simple PerlResponseHandler as an initial test:
-- snip --
package SimpleHandler;
use Apache2::Request;
sub handler {
my $r = shift;
my $apr = new Apache2::Request($r);
print "Hello APR\n";
return Apache2::Const::OK;
}
1;
-- snip --
When I browse to the location served by this handler, I get a
segmentation fault in mod_apreq2:
-bash# mdb /opt/csw/apache2/sbin/httpd
> ::run -f etc/httpd-rms.conf -X
mdb: stop on SIGSEGV
mdb: target stopped at:
mod_apreq2.so`apreq_handle_apache2+0x10:ld [%i0 + 0x18c], %l3
mdb: You've got symbols!
Loading modules: [ ld.so.1 libc.so.1 libuutil.so.1 ]
> ::stack
mod_apreq2.so`apreq_handle_apache2+0x10(0, 0, 11400, 26f840, 0, 0)
Apache2.so`XS_APR__Request__Apache2_handle+0x11c(1bfe28, 26f840,
195c10, 136638, 4, fdf93778)
libperl.so.5.8.8`Perl_pp_entersub+0x6d0(1bfe28, b33e0, 20, 26f840,
239e10, 26eb18)
libperl.so.5.8.8`Perl_runops_standard+0xc(1bfe28, fe315da0, 0,
fe30d440, fef82000, 239e10)
libperl.so.5.8.8`Perl_call_sv+0x6f8(155f18, 0, 195c10, fe3ad954, 268efc, 0)
mod_perl.so`modperl_callback+0x2c0(1bfe28, 1c7060, 275600, 275638,
82d10, 13d220)
mod_perl.so`modperl_callback_run_handlers+0x548(fe504e5c, 0, 1,
1014f8, fe51fcf0, 0)
mod_perl.so`modperl_callback_per_dir+0x24(6, 275638, 1, 279cc0, 2010, 200c)
mod_perl.so`modperl_response_handler_run+0x18(275638, 0, 153e20,
26961c, 600d, 275638)
mod_perl.so`modperl_response_handler_cgi+0x170(275638, 2, 68, 1a,
fe51f44c, 1ae4)
ap_run_handler+0x40(275638, 101840, 101840, 753d8, 10186c, 1)
ap_invoke_handler+0xd8(275638, 82d10, 275638, 0, 0, 0)
ap_process_request+0x54(275638, 72c00, 4, 275638, 0, 0)
0x4470c(13e2e0, 275638, fffffffe, 1, 1000, 72f30)
ap_run_process_connection+0x40(13e2e0, 101bd8, 101bd8, 75bf4, 101c04, 1)
0x4b7e4(76000, ffbffbb8, 7f3f8, 7310c, 2, 2735f8)
0x4b8cc(82d10, 0, 1, ffffffff, 73000, 1)
ap_mpm_run+0x1c0(81030, 73000, 82d10, 100, 730f4, 75c54)
main+0x990(27558, 72c00, 71ef8, 0, 57800, 71ee8)
_start+0x108(0, 0, 0, 0, 0, 0)
>
I have also tried similar tests with Apache2::Cookie, and see
identical segfaults (and stack traces) to the above. Any assistance
appreciated.
Regards,
Cory.
Re: Fwd: Apache 2.2 and libapreq2 2.0.7 segfault
Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
I'm not exactly sure whats going on here (as I've been gone a while), but we
should consider this in the new branch addressing build changes and code splits.
http://svn.apache.org/viewcvs.cgi/httpd/apreq/branches/apr-build-system/
Cory Omand wrote:
> Copying the list
>
> ---------- Forwarded message ----------
> From: Cory Omand <co...@blastwave.org>
> Date: Mar 30, 2006 11:57 AM
> Subject: Re: Apache 2.2 and libapreq2 2.0.7 segfault
> To: "Philip M. Gollucci" <pg...@p6m7g8.com>
>
>
> On 3/29/06, Philip M. Gollucci <pg...@p6m7g8.com> wrote:
>>> Can't load '/export/medusa/comand/csw/cpan/libapreq2/work/comand-ra.d/libapreq2-2.07/glue/perl/t/cgi-bin/../../blib/arch/auto/APR/Request/Request.so'
>>> for module APR::Request: ld.so.1: test_cgi.pl: fatal: libapreq2.so.3:
>> set the LD_LIBRARY_PATH in your shell to the appropriate paths. Thats
>> strange. This isn't your problem, but I'm hoping the test out will give me
>> something to go on. I'm having some "issues" looking at ndm instead of gdb.
>
> It turned out that thanks to libtool, the module and library tests
> were pointing to the uninstalled version of libapreq, allowing the
> tests to run normally. However, the uninstalled glue Request.so
> module was *not* pointing anywhere useful, and could not find either
> libapreq2 or libapr/aprutil. No matter what I did, I could not make
> the glue test suite utilize my LD_LIBRARY_PATH. Not sure why.
> Copying the libs from library/.libs to the destination path before
> running the tests finally allowed the tests to load the library.
>
> Fixing the library loading issues unmasked a different set of test
> failures. It appears that the test suite relies on 'perltoc.pod' and
> 'perlport.pod' being installed. My perl installation splits the pod
> docs out from the core perl, and other distributions may do the same.
> Perhaps relying on a pod that is required in the perl core (like
> perldiag.pod, or Config.pm) might be a better idea?
>
> After I installed the pod docs, all tests pass, but usage from within
> Apache still yields a segfault when creating new Request objects. Now
> I am extremely confused. I verified that the identical library
> versions are present on the target system, and that all shared objects
> are able to locate libapr/aprutil/apreq2. Any ideas?
>
> - C.
--
------------------------------------------------------------------------
Philip M. Gollucci (pgollucci@p6m7g8.com) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F 6A47 D55A 7172 A799 97F
"It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone..."
Fwd: Apache 2.2 and libapreq2 2.0.7 segfault
Posted by Cory Omand <co...@gmail.com>.
Copying the list
---------- Forwarded message ----------
From: Cory Omand <co...@blastwave.org>
Date: Mar 30, 2006 11:57 AM
Subject: Re: Apache 2.2 and libapreq2 2.0.7 segfault
To: "Philip M. Gollucci" <pg...@p6m7g8.com>
On 3/29/06, Philip M. Gollucci <pg...@p6m7g8.com> wrote:
> > Can't load '/export/medusa/comand/csw/cpan/libapreq2/work/comand-ra.d/libapreq2-2.07/glue/perl/t/cgi-bin/../../blib/arch/auto/APR/Request/Request.so'
> > for module APR::Request: ld.so.1: test_cgi.pl: fatal: libapreq2.so.3:
> set the LD_LIBRARY_PATH in your shell to the appropriate paths. Thats
> strange. This isn't your problem, but I'm hoping the test out will give me
> something to go on. I'm having some "issues" looking at ndm instead of gdb.
It turned out that thanks to libtool, the module and library tests
were pointing to the uninstalled version of libapreq, allowing the
tests to run normally. However, the uninstalled glue Request.so
module was *not* pointing anywhere useful, and could not find either
libapreq2 or libapr/aprutil. No matter what I did, I could not make
the glue test suite utilize my LD_LIBRARY_PATH. Not sure why.
Copying the libs from library/.libs to the destination path before
running the tests finally allowed the tests to load the library.
Fixing the library loading issues unmasked a different set of test
failures. It appears that the test suite relies on 'perltoc.pod' and
'perlport.pod' being installed. My perl installation splits the pod
docs out from the core perl, and other distributions may do the same.
Perhaps relying on a pod that is required in the perl core (like
perldiag.pod, or Config.pm) might be a better idea?
After I installed the pod docs, all tests pass, but usage from within
Apache still yields a segfault when creating new Request objects. Now
I am extremely confused. I verified that the identical library
versions are present on the target system, and that all shared objects
are able to locate libapr/aprutil/apreq2. Any ideas?
- C.
Fwd: Apache 2.2 and libapreq2 2.0.7 segfault
Posted by Cory Omand <co...@blastwave.org>.
Copying the list
---------- Forwarded message ----------
From: Cory Omand <co...@gmail.com>
Date: Mar 30, 2006 12:51 PM
Subject: Re: Apache 2.2 and libapreq2 2.0.7 segfault
To: "Philip M. Gollucci" <pg...@p6m7g8.com>
On 3/30/06, Cory Omand <co...@blastwave.org> wrote:
> On 3/29/06, Philip M. Gollucci <pg...@p6m7g8.com> wrote:
> > > Can't load '/export/medusa/comand/csw/cpan/libapreq2/work/comand-ra.d/libapreq2-2.07/glue/perl/t/cgi-bin/../../blib/arch/auto/APR/Request/Request.so'
> > > for module APR::Request: ld.so.1: test_cgi.pl: fatal: libapreq2.so.3:
> > set the LD_LIBRARY_PATH in your shell to the appropriate paths. Thats
> > strange. This isn't your problem, but I'm hoping the test out will give me
> > something to go on. I'm having some "issues" looking at ndm instead of gdb.
>
> It turned out that thanks to libtool, the module and library tests
> were pointing to the uninstalled version of libapreq, allowing the
> tests to run normally. However, the uninstalled glue Request.so
> module was *not* pointing anywhere useful, and could not find either
> libapreq2 or libapr/aprutil. No matter what I did, I could not make
> the glue test suite utilize my LD_LIBRARY_PATH. Not sure why.
> Copying the libs from library/.libs to the destination path before
> running the tests finally allowed the tests to load the library.
>
> Fixing the library loading issues unmasked a different set of test
> failures. It appears that the test suite relies on 'perltoc.pod' and
> 'perlport.pod' being installed. My perl installation splits the pod
> docs out from the core perl, and other distributions may do the same.
> Perhaps relying on a pod that is required in the perl core (like
> perldiag.pod, or Config.pm) might be a better idea?
>
> After I installed the pod docs, all tests pass, but usage from within
> Apache still yields a segfault when creating new Request objects. Now
> I am extremely confused. I verified that the identical library
> versions are present on the target system, and that all shared objects
> are able to locate libapr/aprutil/apreq2. Any ideas?
Here is an interesting fact that I did not realize until just a moment
ago. If you declare a mod_perl 2.x handler as:
package Some::Module;
sub handler {
my $r = shift;
}
Your $r will be an instance of Apache2::RequestRec. However, if you
declare your handler as:
package Some::Module;
sub handler :method {
my $r = shift;
}
Your $r will be an instance of Some::Module! This is the way my test
handler was defined, which I gleaned recently from the mod_perl 2.0
docs. I guess I didn't read far enough into the docs to realize what
':method' was doing to my argument list.
Anyway, if you pass an instance of Some::Module to the constructor of
Apache2::Request or Apache2::Cookie, apache will segfault. I would
have expected Apache2::Request to complain to me about the object
class if I passed it an unexpected class, not a segv. I've attached a
patch which would bail if anything but an instance of
Apache2::RequestRec is passed to Apache2::Request or Apache2::Cookie
constructors...
- C.
Re: Apache 2.2 and libapreq2 2.0.7 segfault
Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
Cory Omand wrote:
> On 3/29/06, Philip M. Gollucci <pg...@p6m7g8.com> wrote:
>> Cory Omand wrote:
>>> --with-mm-opts="INSTALLDIRS=vendor"
>> wow, someone is using that other then me... Glad I added it :)
>
> I'm glad you added it too :)
>
>> Can you double check and make sure everything is picking up the same
>> versions of apr and apr-util. (Do you have any other's installed?)
>> (preferably via ldd)
>
> That was one of the first things I checked. I do only have one
> version of libapr/aprutil installed, and both mod_apreq2.so and the
> Perl shared module are both pointing to the correct libs. I also
> recompiled libapreq2 against the exact build of apache2 I'm running,
> and still get a segfault when constructing new Apache2::Request
> objects.
>
>> If you run 'make test' in for httpd-apreq what happens ?
>
> Excellent question :). I disabled test on this module in my build
> system during the dev releases, and never re-enabled it when 2.07 came
> out... [rebuilding with test enabled]...
>
> It looks like all of the Perl module tests pass with no issues. The
> tests then generate a bunch of SSL certificates, and fire up apache.
> Most of the apache based tests pass, up until the api/apreq tests:
>
> server localhost:8529 started
> t/api/cookie.........ok
> t/api/error..........ok
> t/api/module.........ok
> t/api/param..........ok
> t/apreq/big_input....ok
> t/apreq/cgi..........# Failed test 1 in t/apreq/cgi.t at line 62
> t/apreq/cgi..........NOK 1# Failed test 2 in t/apreq/cgi.t at line 62 fail #2
> t/apreq/cgi..........NOK 2# Failed test 3 in t/apreq/cgi.t at line 62 fail #3
> t/apreq/cgi..........NOK 3# Failed test 4 in t/apreq/cgi.t at line 62 fail #4
> t/apreq/cgi..........NOK 4# Failed test 5 in t/apreq/cgi.t at line 62 fail #5
> t/apreq/cgi..........NOK 5# Failed test 6 in t/apreq/cgi.t at line 62 fail #6
> t/apreq/cgi..........NOK 6# Failed test 7 in t/apreq/cgi.t at line 62 fail #7
> t/apreq/cgi..........NOK 7# Failed test 8 in t/apreq/cgi.t at line 62 fail #8
> t/apreq/cgi..........NOK 8# Failed test 9 in t/apreq/cgi.t at line 62 fail #9
> t/apreq/cgi..........NOK 9# Failed test 10 in t/apreq/cgi.t at line 84
> t/apreq/cgi..........NOK 10# Failed test 11 in t/apreq/cgi.t at line 84 fail #2
> t/apreq/cgi..........NOK 11# Failed test 12 in t/apreq/cgi.t at line 84 fail #3
> t/apreq/cgi..........NOK 12# Failed test 13 in t/apreq/cgi.t at line 84 fail #4
> t/apreq/cgi..........NOK 13# Failed test 14 in t/apreq/cgi.t at line 84 fail #5
> t/apreq/cgi..........NOK 14# Failed test 15 in t/apreq/cgi.t at line 84 fail #6
> t/apreq/cgi..........NOK 15# Failed test 16 in t/apreq/cgi.t at line 84 fail #7
> t/apreq/cgi..........NOK 16# Failed test 17 in t/apreq/cgi.t at line 84 fail #8
> t/apreq/cgi..........NOK 17# Failed test 18 in t/apreq/cgi.t at line 84 fail #9
> t/apreq/cgi..........NOK 18# Failed test 19 in t/apreq/cgi.t at line 84 fail #10
> t/apreq/cgi..........NOK 19# Failed test 20 in t/apreq/cgi.t at line 84 fail #11
> t/apreq/cgi..........NOK 20# Failed test 21 in t/apreq/cgi.t at line 84 fail #12
> t/apreq/cgi..........NOK 21# Failed test 22 in t/apreq/cgi.t at line 91
> t/apreq/cgi..........NOK 22# Failed test 23 in t/apreq/cgi.t at line 94
> t/apreq/cgi..........NOK 23# Failed test 24 in t/apreq/cgi.t at line 99
> t/apreq/cgi..........NOK 24# Failed test 25 in t/apreq/cgi.t at line 104
> t/apreq/cgi..........NOK 25# Failed test 26 in t/apreq/cgi.t at line 109
> t/apreq/cgi..........NOK 26# Failed test 27 in t/apreq/cgi.t at line 118
> t/apreq/cgi..........NOK 27# Failed test 28 in t/apreq/cgi.t at line 127
> t/apreq/cgi..........NOK 28# Failed test 29 in t/apreq/cgi.t at line 137
> t/apreq/cgi..........NOK 29# Failed test 30 in t/apreq/cgi.t at line 148
> t/apreq/cgi..........NOK 30# Failed test 31 in t/apreq/cgi.t at line 157
> t/apreq/cgi..........NOK 31request has failed (the response code was: 404)
> see t/logs/error_log for more details
> t/apreq/cgi..........dubious
> Test returned status 29 (wstat 7424, 0x1d00)
> DIED. FAILED tests 1-41
> Failed 41/41 tests, 0.00% okay
> t/apreq/cookie.......ok
> t/apreq/inherit......ok
> t/apreq/request......ok
> t/apreq/upload.......request has failed (the response code was: 404)
> see t/logs/error_log for more details
> t/apreq/upload.......dubious
> Test returned status 29 (wstat 7424, 0x1d00)
> DIED. FAILED tests 1-20
> Failed 20/20 tests, 0.00% okay
> Failed Test Stat Wstat Total Fail Failed List of Failed
> -------------------------------------------------------------------------------
> t/apreq/cgi.t 29 7424 41 51 124.39% 1-41
> t/apreq/upload.t 29 7424 20 40 200.00% 1-20
> Failed 2/10 test scripts, 80.00% okay. 61/191 subtests failed, 68.06% okay.
> [warning] server localhost:8529 shutdown
>
> The error log contains many errors like the following:
>
> [Wed Mar 29 20:54:48 2006] [error] [client 127.0.0.1] Premature end of
> script headers: test_cgi.pl
> Can't load '/export/medusa/comand/csw/cpan/libapreq2/work/comand-ra.d/libapreq2-2.07/glue/perl/t/cgi-bin/../../blib/arch/auto/APR/Request/Request.so'
> for module APR::Request: ld.so.1: test_cgi.pl: fatal: libapreq2.so.3:
set the LD_LIBRARY_PATH in your shell to the appropriate paths. Thats
strange. This isn't your problem, but I'm hoping the test out will give me
something to go on. I'm having some "issues" looking at ndm instead of gdb.
But it looks like the mod_apreq_handle_apache2 is getting null for the first
few arguments.
--
------------------------------------------------------------------------
Philip M. Gollucci (pgollucci@p6m7g8.com) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F 6A47 D55A 7172 A799 97F
"It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone..."
Re: Apache 2.2 and libapreq2 2.0.7 segfault
Posted by Cory Omand <co...@blastwave.org>.
On 3/29/06, Philip M. Gollucci <pg...@p6m7g8.com> wrote:
> Cory Omand wrote:
> > --with-mm-opts="INSTALLDIRS=vendor"
> wow, someone is using that other then me... Glad I added it :)
I'm glad you added it too :)
> Can you double check and make sure everything is picking up the same
> versions of apr and apr-util. (Do you have any other's installed?)
> (preferably via ldd)
That was one of the first things I checked. I do only have one
version of libapr/aprutil installed, and both mod_apreq2.so and the
Perl shared module are both pointing to the correct libs. I also
recompiled libapreq2 against the exact build of apache2 I'm running,
and still get a segfault when constructing new Apache2::Request
objects.
> If you run 'make test' in for httpd-apreq what happens ?
Excellent question :). I disabled test on this module in my build
system during the dev releases, and never re-enabled it when 2.07 came
out... [rebuilding with test enabled]...
It looks like all of the Perl module tests pass with no issues. The
tests then generate a bunch of SSL certificates, and fire up apache.
Most of the apache based tests pass, up until the api/apreq tests:
server localhost:8529 started
t/api/cookie.........ok
t/api/error..........ok
t/api/module.........ok
t/api/param..........ok
t/apreq/big_input....ok
t/apreq/cgi..........# Failed test 1 in t/apreq/cgi.t at line 62
t/apreq/cgi..........NOK 1# Failed test 2 in t/apreq/cgi.t at line 62 fail #2
t/apreq/cgi..........NOK 2# Failed test 3 in t/apreq/cgi.t at line 62 fail #3
t/apreq/cgi..........NOK 3# Failed test 4 in t/apreq/cgi.t at line 62 fail #4
t/apreq/cgi..........NOK 4# Failed test 5 in t/apreq/cgi.t at line 62 fail #5
t/apreq/cgi..........NOK 5# Failed test 6 in t/apreq/cgi.t at line 62 fail #6
t/apreq/cgi..........NOK 6# Failed test 7 in t/apreq/cgi.t at line 62 fail #7
t/apreq/cgi..........NOK 7# Failed test 8 in t/apreq/cgi.t at line 62 fail #8
t/apreq/cgi..........NOK 8# Failed test 9 in t/apreq/cgi.t at line 62 fail #9
t/apreq/cgi..........NOK 9# Failed test 10 in t/apreq/cgi.t at line 84
t/apreq/cgi..........NOK 10# Failed test 11 in t/apreq/cgi.t at line 84 fail #2
t/apreq/cgi..........NOK 11# Failed test 12 in t/apreq/cgi.t at line 84 fail #3
t/apreq/cgi..........NOK 12# Failed test 13 in t/apreq/cgi.t at line 84 fail #4
t/apreq/cgi..........NOK 13# Failed test 14 in t/apreq/cgi.t at line 84 fail #5
t/apreq/cgi..........NOK 14# Failed test 15 in t/apreq/cgi.t at line 84 fail #6
t/apreq/cgi..........NOK 15# Failed test 16 in t/apreq/cgi.t at line 84 fail #7
t/apreq/cgi..........NOK 16# Failed test 17 in t/apreq/cgi.t at line 84 fail #8
t/apreq/cgi..........NOK 17# Failed test 18 in t/apreq/cgi.t at line 84 fail #9
t/apreq/cgi..........NOK 18# Failed test 19 in t/apreq/cgi.t at line 84 fail #10
t/apreq/cgi..........NOK 19# Failed test 20 in t/apreq/cgi.t at line 84 fail #11
t/apreq/cgi..........NOK 20# Failed test 21 in t/apreq/cgi.t at line 84 fail #12
t/apreq/cgi..........NOK 21# Failed test 22 in t/apreq/cgi.t at line 91
t/apreq/cgi..........NOK 22# Failed test 23 in t/apreq/cgi.t at line 94
t/apreq/cgi..........NOK 23# Failed test 24 in t/apreq/cgi.t at line 99
t/apreq/cgi..........NOK 24# Failed test 25 in t/apreq/cgi.t at line 104
t/apreq/cgi..........NOK 25# Failed test 26 in t/apreq/cgi.t at line 109
t/apreq/cgi..........NOK 26# Failed test 27 in t/apreq/cgi.t at line 118
t/apreq/cgi..........NOK 27# Failed test 28 in t/apreq/cgi.t at line 127
t/apreq/cgi..........NOK 28# Failed test 29 in t/apreq/cgi.t at line 137
t/apreq/cgi..........NOK 29# Failed test 30 in t/apreq/cgi.t at line 148
t/apreq/cgi..........NOK 30# Failed test 31 in t/apreq/cgi.t at line 157
t/apreq/cgi..........NOK 31request has failed (the response code was: 404)
see t/logs/error_log for more details
t/apreq/cgi..........dubious
Test returned status 29 (wstat 7424, 0x1d00)
DIED. FAILED tests 1-41
Failed 41/41 tests, 0.00% okay
t/apreq/cookie.......ok
t/apreq/inherit......ok
t/apreq/request......ok
t/apreq/upload.......request has failed (the response code was: 404)
see t/logs/error_log for more details
t/apreq/upload.......dubious
Test returned status 29 (wstat 7424, 0x1d00)
DIED. FAILED tests 1-20
Failed 20/20 tests, 0.00% okay
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/apreq/cgi.t 29 7424 41 51 124.39% 1-41
t/apreq/upload.t 29 7424 20 40 200.00% 1-20
Failed 2/10 test scripts, 80.00% okay. 61/191 subtests failed, 68.06% okay.
[warning] server localhost:8529 shutdown
The error log contains many errors like the following:
[Wed Mar 29 20:54:48 2006] [error] [client 127.0.0.1] Premature end of
script headers: test_cgi.pl
Can't load '/export/medusa/comand/csw/cpan/libapreq2/work/comand-ra.d/libapreq2-2.07/glue/perl/t/cgi-bin/../../blib/arch/auto/APR/Request/Request.so'
for module APR::Request: ld.so.1: test_cgi.pl: fatal: libapreq2.so.3:
open failed: No such file or directory at
/opt/csw/lib/perl/5.8.8/DynaLoader.pm line 230.
at /export/medusa/comand/csw/cpan/libapreq2/work/comand-ra.d/libapreq2-2.07/glue/perl/t/cgi-bin/../../blib/lib/APR/Request/Param.pm
line 27
Compilation failed in require at
/export/medusa/comand/csw/cpan/libapreq2/work/comand-ra.d/libapreq2-2.07/glue/perl/t/cgi-bin/../../blib/lib/APR/Request/Param.pm
line 27.
BEGIN failed--compilation aborted at
/export/medusa/comand/csw/cpan/libapreq2/work/comand-ra.d/libapreq2-2.07/glue/perl/t/cgi-bin/../../blib/lib/APR/Request/Param.pm
line 27.
Compilation failed in require at
/export/medusa/comand/csw/cpan/libapreq2/work/comand-ra.d/libapreq2-2.07/glue/perl/t/cgi-bin/test_cgi.pl
line 11.
BEGIN failed--compilation aborted at
/export/medusa/comand/csw/cpan/libapreq2/work/comand-ra.d/libapreq2-2.07/glue/perl/t/cgi-bin/test_cgi.pl
line 11.
This appears to be a test issue, as nothing is yet installed. The
first half of the tests find libapreq properly, so why would this
section not find it? Oh, and no segfaults during the test either...
strange.
- C.
Re: Apache 2.2 and libapreq2 2.0.7 segfault
Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
Cory Omand wrote:
> --with-mm-opts="INSTALLDIRS=vendor"
wow, someone is using that other then me... Glad I added it :)
Can you double check and make sure everything is picking up the same
versions of apr and apr-util. (Do you have any other's installed?)
(preferably via ldd)
If you run 'make test' in for httpd-apreq what happens ?
--
------------------------------------------------------------------------
Philip M. Gollucci (pgollucci@p6m7g8.com) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F 6A47 D55A 7172 A799 97F
"It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone..."
Re: Apache 2.2 and libapreq2 2.0.7 segfault
Posted by Cory Omand <co...@blastwave.org>.
On 3/29/06, Philip M. Gollucci <pg...@p6m7g8.com> wrote:
> I hope this isn't whats causing it, but you're missing
>
> use Apache2::Const -compile qw(OK);
>
> I know we prefer the other way of new() so try doing this
> my $apr = Apache2::Request->new($r)
>
> I don't recall if we support both (as you can tell I've been out of it for a
> while).
The new Obj vs. Obj->new doesn't require any support from the module
itself, but I tried it just to be sure, and still get the same
segfault. Also, I do compile constants in the startup.pl script, and
when I remove the call to Apache2::Request in my sample handler, the
segfault goes away.
> If that doesn't work,
> perl -V
Attached: perl.V.txt
> ./configure for PERL, httpd,
For perl, the non-path/compiler flag defines passed to Configure are:
-Duselargefiles
-Duseshrplib
-Dusesitecustomize
-Dusethreads
(Note: when I comment out the call to Apache2::Request in my example,
mod_perl happilly handles the request, so I think the perl/mod_perl
path is working fine. The stack trace shows the segfault in
mod_apreq2.so)
Attached: httpd-2.2-config.nice
> Makefile.PL line for mod_perl and httpd-apreq
mod_perl:
perl Makefile.PL \
MP_APXS=/path/to/apache2/sbin/apxs \
MP_PROMPT_DEFAULT=1 \
MP_DEBUG=1
httpd-apreq2:
perl Makefile.PL \
--enable-perl-glue
--with-perl=/opt/csw/bin/perl
--with-apache2-apxs=/opt/csw/apache2/sbin/apxs
--with-apr-config=/opt/csw/apache2/bin/apr-config
--with-apu-config=/opt/csw/apache2/bin/apu-config
--with-expat=/opt/csw
--with-mm-opts="INSTALLDIRS=vendor"
Thanks,
Cory.
Re: Apache 2.2 and libapreq2 2.0.7 segfault
Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
I hope this isn't whats causing it, but you're missing
use Apache2::Const -compile qw(OK);
I know we prefer the other way of new() so try doing this
my $apr = Apache2::Request->new($r)
I don't recall if we support both (as you can tell I've been out of it for a
while).
> package SimpleHandler;
>
> use Apache2::Request;
>
> sub handler {
> my $r = shift;
> my $apr = new Apache2::Request($r);
>
> print "Hello APR\n";
> return Apache2::Const::OK;
> }
>
> 1;
If that doesn't work,
perl -V
./configure for PERL, httpd,
Makefile.PL line for mod_perl and httpd-apreq
http://libapreq2.p6m7g8.net/group__apreq__xs__request.html
Seems like the doc build on http://httpd.apache.org/apreq is busted --
missing perl glue docs. (I'll look into this soonish)
--
------------------------------------------------------------------------
Philip M. Gollucci (pgollucci@p6m7g8.com) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F 6A47 D55A 7172 A799 97F
"It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone..."
Re: Apache 2.2 and libapreq2 2.0.7 segfault
Posted by Cory Omand <co...@blastwave.org>.
On 3/29/06, Jonathan Vanasco <jo...@2xlp.com> wrote:
>
> On Mar 29, 2006, at 7:06 PM, Cory Omand wrote:
>
> > Hi,
> >
> > I am having issues with Apache 2.2 and libapreq2 2.07. Even very
> > simple tests which construct new Apache2::Request objects are
> > resulting in segfaults. I have the following server setup:
>
> check to see if you're sending a bad cookie
>
> are you using wordpress on safari? a few versions will set a bad
> cookie ( improperly escaped & encoded ), and if you hit your dev box
> with it - bang.
I'm using Firefox (latest) -- I cleared out any cookies which were
cached in my browser for the target server (that box also runs a test
instance of trac on a different port, but the cookies for trac should
not be sent to other apps). I still get the segfault right after
constructing a new Apache2::Request object.
Thanks,
Cory.
Re: Apache 2.2 and libapreq2 2.0.7 segfault
Posted by Jonathan Vanasco <jo...@2xlp.com>.
On Mar 29, 2006, at 7:06 PM, Cory Omand wrote:
> Hi,
>
> I am having issues with Apache 2.2 and libapreq2 2.07. Even very
> simple tests which construct new Apache2::Request objects are
> resulting in segfaults. I have the following server setup:
check to see if you're sending a bad cookie
are you using wordpress on safari? a few versions will set a bad
cookie ( improperly escaped & encoded ), and if you hit your dev box
with it - bang.
libapreq is specced to die when it tries to parse a bad cookie. but
i've found that this die often causes a segfault ( maybe 30-50% of
the time ) when its a corrupt wordpress cookie.