Stas Bekman wrote:
Arshavir Grigorian wrote:
Stas Bekman wrote:
Arshavir Grigorian wrote:
-------------8<---------- Start Bug Report ------------8<----------
1. Problem Description:
make test fails on one of the tests -
t/filter/in_error.......................malformed response at
/usr/local/apache2/build/mod_perl-1.99_16/blib/lib/Apache/TestClient.pm
line 102.
t/filter/in_error.......................NOK 1# Failed test 1 in
t/filter/in_error.t at line 13
t/filter/in_error.......................FAILED test 1 Failed 1/1
tests, 0.00% okay
Arshavir, your report lacks the error_log part, please check again:
http://perl.apache.org/docs/2.0/user/help/help.html#_C_make_test___Failures
> (gdb) bt
> #0 apr_cpystrn (dst=0xffbef010 "", src=0x0, dst_size=4290703375)
> at apr_cpystrn.c:57
> #1 0xff1d4c4c in stuffbuffer (buf=0xffbeef10 "", bufsize=256, s=0x0)
> at errorcodes.c:34
> #2 0xfee074f0 in modperl_error_strerror (rc=500) at
modperl_error.c:37
> #3 0xfe990c90 in XS_APR__Error_strerror (cv=0x1f4) at Error.xs:36
It looks like a bug in apr, and not modperl. But for some reason the
backtrace missing frame (may be they were optimized away). could you
possibly break at apr_strerror and see which of the following
branches it took before reaching apr_cpystrn()?
errorcodes.c:
APR_DECLARE(char *) apr_strerror(apr_status_t statcode, char *buf,
apr_size_t bufsize)
{
if (statcode < APR_OS_START_ERROR) {
return native_strerror(statcode, buf, bufsize);
}
else if (statcode < APR_OS_START_USERERR) {
return stuffbuffer(buf, bufsize, apr_error_string(statcode));
}
else if (statcode < APR_OS_START_EAIERR) {
return stuffbuffer(buf, bufsize, "APR does not understand this error
code");
}
else if (statcode < APR_OS_START_SYSERR) {
#if defined(HAVE_GAI_STRERROR)
statcode -= APR_OS_START_EAIERR;
#if defined(NEGATIVE_EAI)
statcode = -statcode;
#endif
return stuffbuffer(buf, bufsize, gai_strerror(statcode));
#else
return stuffbuffer(buf, bufsize, "APR does not understand this error
code");
#endif
}
else {
return apr_os_strerror(buf, bufsize, statcode - APR_OS_START_SYSERR);
}
}
On a different note, for some very odd reason, sometimes the httpd
process does not start for testing and other times it does.
I have tried the compilation several times with exact same
parameters, and I still cannot pinpoint a reason why that happens.
Could this be the reason?
http://perl.apache.org/docs/2.0/user/troubleshooting/troubleshooting.html#Server_Hanging_at_the_Startup
Thanks for the reply.
I looked at the error_log and there is a comment that the errors
causing the core dump are harmless.
Yes, the error is harmless, since that test is testing exactly that:
how modperl handles errors. It must not dump a core of course.
*** The following 2 error entries are expected and harmless ***
[Tue Sep 07 15:23:39 2004] [error] [client 127.0.0.1] This filter
must die at /u
sr/local/apache2/build/mod_perl-1.99_16/t/filter/TestFilter/in_error.pm
line 26.
\n
This filter must die at
/usr/local/apache2/build/mod_perl-1.99_16/t/filter/TestF
ilter/in_error.pm line 26.
So I am wondering why the test is failing even though it's expecting
an HTTP 500 response. I am also wondering whether the warn call at
/usr/local/apache2/build/mod_perl-1.99_16/blib/lib/Apache/TestClient.pm
line 102 has anything to do with it since all the warnings are
configured to be fatal.
No, it fails because of the coredump. Apache didn't send any response
when it segfaulted, not even 500 response.
I'd appreciate if you could work with the debugger and figure out the
real trace it has taken to help us debug it, as suggested in the
previous reply.
It looks like the control is going into the first branch of the if
statement calling native_strerror (statcode=500, buf=0xffbeef10 "",
bufsize=256).
Here is a new backtrace:
#0 0xff2a7fec in apr_cpystrn (dst=0xffbeee90 "ï\001", src=0x0, dst_size=256)
at apr_cpystrn.c:57
57 if (!(*d = *src)) {
(gdb) where
#0 0xff2a7fec in apr_cpystrn (dst=0xffbeee90 "ï\001", src=0x0, dst_size=256)
at apr_cpystrn.c:57
#1 0xff2c0f18 in stuffbuffer (buf=0xffbeee90 "ï\001", bufsize=256, s=0x0)
at errorcodes.c:34
#2 0xff2c18e8 in native_strerror (statcode=-4264304,
buf=0x100 <Address 0x100 out of bounds>, bufsize=0) at errorcodes.c:375
(gdb)
Hope that's useful.
Arshavir
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html