You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Arshavir Grigorian <ag...@m-cam.com> on 2004/09/01 16:22:47 UTC

[mp2] coredump in t/filter/in_error on Solaris 8

-------------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

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.

Thanks in advance for any pointers.

2. Used Components and their Configuration:

*** mod_perl version 1.9916

*** using /usr/local/apache2/build/mod_perl-1.99_16/lib/Apache/BuildConfig.pm

*** Makefile.PL options:
  MP_APR_LIB     => aprext
  MP_APXS        => /usr/local/apache2/bin/apxs
  MP_COMPAT_1X   => 1
  MP_DEBUG       => 1
  MP_GENERATE_XS => 1
  MP_LIBNAME     => mod_perl
  MP_TRACE       => 1
  MP_USE_DSO     => 1
  MP_USE_STATIC  => 1


*** /usr/local/apache2/bin/httpd -V
Server version: Apache/2.0.50
Server built:   Aug 31 2004 15:02:12
Server's Module Magic Number: 20020903:8
Architecture:   32-bit
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_PROC_PTHREAD_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D HTTPD_ROOT="/usr/local/apache2/"
 -D SUEXEC_BIN="/usr/local/apache2//bin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="logs/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"


*** (apr|apu)-config linking info

 -L/usr/local/apache2//lib -lapr-0 -lsendfile -lrt -lm -lsocket -lnsl -lresolv  -lpthread -ldl
 -L/usr/local/apache2//lib -laprutil-0 -lgdbm -lexpat -liconv



*** /usr/local/bin/perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 3) configuration:
  Platform:
    osname=solaris, osvers=2.8, archname=sun4-solaris
    uname='sunos 5.8 generic_108528-11 sun4u sparc sunw,ultra-5_10 solaris '
    config_args='-Dcc=gcc -B/usr/ccs/bin/'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc -B/usr/ccs/bin/', ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O',
    cppflags='-fno-strict-aliasing -I/usr/local/include'
    ccversion='', gccversion='3.3.2', gccosandvers='solaris2.8'
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='gcc -B/usr/ccs/bin/', ldflags =' -L/usr/local/lib '
    libpth=/usr/local/lib /usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -lgdbm -ldb -ldl -lm -lc
    perllibs=-lsocket -lnsl -ldl -lm -lc
    libc=/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='  -R /usr/local/lib/perl5/5.8.3/sun4-solaris/CORE'
    cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib'


Characteristics of this binary (from libperl): 
  Compile-time options: USE_LARGE_FILES
  Built under solaris
  Compiled at Feb 10 2004 05:55:05
  %ENV:
    PERL_LWP_USE_HTTP_10="1"
  @INC:
    /usr/local/lib/perl5/5.8.3/sun4-solaris
    /usr/local/lib/perl5/5.8.3
    /usr/local/lib/perl5/site_perl/5.8.3/sun4-solaris
    /usr/local/lib/perl5/site_perl/5.8.3
    /usr/local/lib/perl5/site_perl
    .

*** Packages of interest status:

Apache::Request: -
CGI            : 3.01
LWP            : -
mod_perl       : -


3. This is the core dump trace: (if you get a core dump):

(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

bash-2.03# t/TEST -verbose t/filter/in_error.t   
[   info] consider removing an old /usr/local/apache2/build/mod_perl-1.99_16/t/c
ore file before running tests
[warning] root mode: changing the files ownership to 'nobody' (60001:60001)
[warning] testing whether 'nobody' is able to -rwx /usr/local/apache2/build/mod_
perl-1.99_16/t
"/usr/local/bin/perl" -Mlib=/usr/local/apache2/build/mod_perl-1.99_16/Apache-Tes
t/lib -MApache::TestRun -e 'eval { Apache::TestRun::run_root_fs_test(60001, 6000
1, q[/usr/local/apache2/build/mod_perl-1.99_16/t]) }';


[warning] result: OK
[warning] the client side drops 'root' permissions and becomes 'nobody'
/usr/local/apache2/bin/httpd -d /usr/local/apache2/build/mod_perl-1.99_16/t -f /
usr/local/apache2/build/mod_perl-1.99_16/t/conf/httpd.conf -D APACHE2 
using Apache/2.0.50 (prefork MPM)

waiting 120 seconds for server to start: .[Wed Sep 01 10:14:17 2004] [info] 27 A
pache:: modules loaded
[Wed Sep 01 10:14:17 2004] [info] 7 APR:: modules loaded
[Wed Sep 01 10:14:17 2004] [info] base server + 20 vhosts ready to run tests
...
waiting 120 seconds for server to start: ok (waited 3 secs)
server localhost:8529 started
server localhost:8530 listening (TestModperl::setupenv)
server localhost:8531 listening (TestModperl::merge)
server localhost:8532 listening (TestModperl::perl_options)
server localhost:8533 listening (TestVhost::config)
server localhost:8534 listening (TestProtocol::pseudo_http)
server localhost:8535 listening (TestProtocol::echo_filter)
server localhost:8536 listening (TestProtocol::echo_bbs2)
server localhost:8537 listening (TestProtocol::echo_bbs)
server localhost:8538 listening (TestProtocol::echo_timeout)
server localhost:8539 listening (TestProtocol::echo_block)
server localhost:8540 listening (TestPreConnection::note)
server localhost:8541 listening (TestHooks::startup)
server localhost:8542 listening (TestHooks::stacked_handlers2)
server localhost:8543 listening (TestHooks::hookrun)
server localhost:8544 listening (TestFilter::in_bbs_msg)
server localhost:8545 listening (TestFilter::both_str_con_add)
server localhost:8546 listening (TestFilter::in_bbs_inject_header)
server localhost:8547 listening (TestFilter::in_str_msg)
server localhost:8548 listening (TestDirective::perlrequire)
server localhost:8549 listening (TestDirective::perlmodule)
server localhost:8550 listening (TestDirective::perlloadmodule4)
server localhost:8551 listening (TestDirective::perlloadmodule5)
server localhost:8552 listening (TestDirective::perlloadmodule3)
server localhost:8553 listening (TestDirective::perlloadmodule6)
t/filter/in_error....1..1
# Running under perl version 5.008003 for solaris
# Current time local: Wed Sep  1 10:14:21 2004
# Current time GMT:   Wed Sep  1 14:14:21 2004
# Using Test.pm version 1.24
# Using Apache/Test.pm version 1.14
malformed response at /usr/local/apache2/build/mod_perl-1.99_16/blib/lib/Apache/
TestClient.pm line 102.
# testing : an error in a filter should cause 500
# expected: 500
# received: undef
not ok 1
# Failed test 1 in t/filter/in_error.t at line 13
FAILED test 1
        Failed 1/1 tests, 0.00% okay
Failed Test         Stat Wstat Total Fail  Failed  List of Failed
-------------------------------------------------------------------------------
t/filter/in_error.t                1    1 100.00%  1
Failed 1/1 test scripts, 0.00% okay. 1/1 subtests failed, 0.00% okay.
[warning] server localhost:8529 shutdown
[  error] error running tests (please examine t/logs/error_log)
[  error] oh darn, server dumped core 
[  error] for stacktrace, run: gdb /usr/local/apache2/bin/httpd -core /usr/local
/apache2/build/mod_perl-1.99_16/t/core



This report was generated by t/REPORT on Tue Aug 31 19:13:57 2004 GMT.

-------------8<---------- End Bug Report --------------8<----------

Note: Complete the rest of the details and post this bug report to
modperl <at> perl.apache.org. To subscribe to the list send an empty
email to modperl-subscribe@perl.apache.org


-- 
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


Re: [mp2] coredump in t/filter/in_error on Solaris 8

Posted by Stas Bekman <st...@stason.org>.
Arshavir Grigorian wrote:

>> 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.

Well, this seems to be a totally different trace. What I was asking is to 
work interactively with the gdb debugger and see where it goes wrong. I've 
submitted your traces to the apr-dev list. Hopefully someone will know 
what's going on.


-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
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


Re: [mp2] coredump in t/filter/in_error on Solaris 8

Posted by Arshavir Grigorian <ag...@m-cam.com>.
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


Re: [mp2] coredump in t/filter/in_error on Solaris 8

Posted by Stas Bekman <st...@stason.org>.
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.



-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
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


Re: [mp2] coredump in t/filter/in_error on Solaris 8

Posted by Arshavir Grigorian <ag...@m-cam.com>.
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.

*** 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.



-- 
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


Re: [mp2] coredump in t/filter/in_error on Solaris 8

Posted by Stas Bekman <st...@stason.org>.
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


-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
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