You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by "Philippe M. Chiasson" <go...@ectoplasm.org> on 2004/10/07 07:12:31 UTC

t/apr/bucket is dumping core on me

-------------8<---------- Start Bug Report ------------8<----------
1. Problem Description:

  ./t/TEST -v apr/bucket is dumping core on me

2. Used Components and their Configuration:

*** mod_perl version 1.9917

*** using [modperl-cvs]/lib/Apache/BuildConfig.pm

*** Makefile.PL options:
  MP_APR_LIB     => aprext
  MP_APXS        => [httpd]/i386-linux/2.0.51-dev/worker/bin/apxs
  MP_CCOPTS      => -Wall -Werror
  MP_COMPAT_1X   => 1
  MP_DEBUG       => 1
  MP_GENERATE_XS => 1
  MP_LIBNAME     => mod_perl
  MP_MAINTAINER  => 1
  MP_TRACE       => 1
  MP_USE_DSO     => 1
  MP_USE_GTOP    => 1


*** [httpd]/i386-linux/2.0.51-dev/worker/bin/httpd -V
Server version: Apache/2.0.51-dev
Server built:   Aug  6 2004 10:51:53
Server's Module Magic Number: 20020903:9
Architecture:   32-bit
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/worker"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_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="[httpd]/i386-linux/2.0.51-dev/worker"
 -D SUEXEC_BIN="[httpd]/i386-linux/2.0.51-dev/worker/bin/suexec"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -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[httpd]/i386-linux/2.0.51-dev/worker/lib -lapr-0 -lrt -lm -lcrypt 
-lnsl  -lpthread -ldl
 -L[httpd]/i386-linux/2.0.51-dev/worker/lib -laprutil-0 -lgdbm -ldb-4.2 
-lexpat



*** [perl]/i386-linux/5.8.5/devel-shrplib-threads/bin/perl5.8.5 -V
Summary of my perl5 (revision 5 version 8 subversion 5) configuration:
  Platform:
    osname=linux, osvers=2.6.7-1.499smp, archname=i686-linux-thread-multi
    uname='linux shou.la.ectoplasm.org 2.6.7-1.499smp #1 smp wed jul 28 
12:18:00 edt 2004 i686 athlon i386 gnulinux '
    config_args='-des 
-Dprefix=[perl]/i386-linux/5.8.5/devel-shrplib-threads -Doptimize=-g 
-Dusedevel -Duseshrplib -Dusethreads'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define 
usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS 
-DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
    optimize='-g',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING 
-fno-strict-aliasing -pipe -I/usr/local/include -I/usr/include/gdbm'
    ccversion='', gccversion='3.4.1 20040714 (Red Hat 3.4.1-7)', 
gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', 
lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    libc=/lib/libc-2.3.3.so, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version='2.3.3'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E 
-Wl,-rpath,[perl]/i386-linux/5.8.5/devel-shrplib-threads/lib/5.8.5/i686-linux-thread-multi/CORE'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl):
  Compile-time options: DEBUGGING MULTIPLICITY USE_ITHREADS 
USE_LARGE_FILES PERL_IMPLICIT_CONTEXT
  Built under linux
  Compiled at Sep 10 2004 18:36:47
  %ENV:
    
PERL5LIB="/home/gozer/opt/lib:/home/gozer/opt/lib/perl5:/home/gozer/opt/lib/perl5/site_perl:/home/gozer/opt/lib/site_perl"
    PERL_LWP_USE_HTTP_10="1"
  @INC:
    /home/gozer/opt/lib/5.8.5/i686-linux-thread-multi
    /home/gozer/opt/lib/5.8.5
    /home/gozer/opt/lib
    /home/gozer/opt/lib/perl5/5.8.5
    /home/gozer/opt/lib/perl5
    /home/gozer/opt/lib/perl5/site_perl/5.8.5
    /home/gozer/opt/lib/perl5/site_perl
    /home/gozer/opt/lib/site_perl/5.8.5/i686-linux-thread-multi
    /home/gozer/opt/lib/site_perl/5.8.5
    /home/gozer/opt/lib/site_perl
    
[perl]/i386-linux/5.8.5/devel-shrplib-threads/lib/5.8.5/i686-linux-thread-multi
    [perl]/i386-linux/5.8.5/devel-shrplib-threads/lib/5.8.5
    
[perl]/i386-linux/5.8.5/devel-shrplib-threads/lib/site_perl/5.8.5/i686-linux-thread-multi
    [perl]/i386-linux/5.8.5/devel-shrplib-threads/lib/site_perl/5.8.5
    [perl]/i386-linux/5.8.5/devel-shrplib-threads/lib/site_perl
    .

*** Packages of interest status:

Apache::Request: -
CGI            : 3.05
LWP            : 5.800
mod_perl       : -


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

#0  0x0053065c in allocator_alloc (allocator=0x0, size=8192) at 
apr_pools.c:188
#1  0x00530617 in apr_allocator_alloc (allocator=0x0, size=8168) at 
apr_pools.c:370
#2  0x0021b45c in apr_bucket_alloc_create_ex (allocator=0x0) at 
apr_buckets_alloc.c:67
#3  0x0021b405 in apr_bucket_alloc_create (p=0x9353f70) at 
apr_buckets_alloc.c:52
#4  0x004ac6fd in XS_APR__Bucket_alloc_create (my_perl=0x9d606e8, 
cv=0x97f6d80) at Bucket.c:66
#5  0x00373709 in Perl_pp_entersub (my_perl=0x9d606e8) at pp_hot.c:2857
#6  0x0034f24f in Perl_runops_debug (my_perl=0x9d606e8) at dump.c:1442
#7  0x002f59b4 in S_call_body (my_perl=0x9d606e8, myop=0xf598e720, 
is_eval=0) at perl.c:2288
#8  0x002f54e8 in Perl_call_sv (my_perl=0x9d606e8, sv=0x9f2e4d4, 
flags=4) at perl.c:2206
#9  0x00149852 in modperl_callback (my_perl=0x9d606e8, 
handler=0x9dab770, p=0x9622970, r=0x9dca020,
    s=0xa729d88, args=0x9d70434) at modperl_callback.c:115
#10 0x0014a11f in modperl_callback_run_handlers (idx=6, type=4, 
r=0x9dca020, c=0x0, s=0xa729d88, pconf=0x0,
    plog=0x0, ptemp=0x0, run_mode=MP_HOOK_RUN_FIRST) at 
modperl_callback.c:276
#11 0x0014a368 in modperl_callback_per_dir (idx=6, r=0x9dca020, 
run_mode=MP_HOOK_RUN_FIRST)
    at modperl_callback.c:364
#12 0x00142fec in modperl_response_handler_run (r=0x9dca020, finish=1) 
at mod_perl.c:909
#13 0x00143102 in modperl_response_handler (r=0x9dca020) at mod_perl.c:949
#14 0x0806c394 in ap_run_handler (r=0x9dca020) at config.c:151
#15 0x0806cab1 in ap_invoke_handler (r=0x9dca020) at config.c:358
#16 0x0806777f in ap_process_request (r=0x9dca020) at http_request.c:246
#17 0x080611fc in ap_process_http_connection (c=0x97e8bf0) at 
http_core.c:250
#18 0x080773f4 in ap_run_process_connection (c=0x97e8bf0) at connection.c:42
#19 0x080778ae in ap_process_connection (c=0x97e8bf0, csd=0x925a948) at 
connection.c:175
#20 0x08068bbf in process_socket (p=0x9e9e988, sock=0x925a948, 
my_child_num=0, my_thread_num=1,
    bucket_alloc=0xa797310) at worker.c:520
#21 0x0806935d in worker_thread (thd=0x9855098, dummy=0x9dc6448) at 
worker.c:834
#22 0x0052acab in dummy_worker (opaque=0x9855098) at thread.c:88
#23 0x00d5e98c in start_thread () from /lib/tls/libpthread.so.0
#24 0x00caa16a in clone () from /lib/tls/libc.so.6

This report was generated by ./t/REPORT on Thu Oct  7 05:10:47 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.



Re: t/apr/bucket is dumping core on me

Posted by Joe Orton <jo...@redhat.com>.
On Thu, Oct 07, 2004 at 09:20:23AM -0400, Joe Schaefer wrote:
> "Philippe M. Chiasson" <go...@ectoplasm.org> writes:
> 
> [...]
> 
> > #2  0x0021b45c in apr_bucket_alloc_create_ex (allocator=0x0) at
> > apr_buckets_alloc.c:67
> > #3  0x0021b405 in apr_bucket_alloc_create (p=0x9353f70) at
> 
> APU_DECLARE_NONSTD(apr_bucket_alloc_t *) apr_bucket_alloc_create(apr_pool_t *p)
> {
>     apr_allocator_t *allocator = apr_pool_allocator_get(p);
>     apr_bucket_alloc_t *list;
> 
> #if APR_POOL_DEBUG
>     /* may be NULL for debug mode. */
>     if (allocator == NULL) {
>         if (apr_allocator_create(&allocator) != APR_SUCCESS) {
>             abort();
>         }
>     }
> #endif

That fix isn't in the apr-util 0.9 branch (my fault): I'll copy it over.

joe

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: t/apr/bucket is dumping core on me

Posted by Joe Schaefer <jo...@sunstarsys.com>.
"Philippe M. Chiasson" <go...@ectoplasm.org> writes:

> Joe Schaefer wrote:
> > "Philippe M. Chiasson" <go...@ectoplasm.org> writes:
> >
> >>Joe Schaefer wrote:
> > [...]
> >
> >>>Is it somehow possible that apr was compiled with APR_POOL_DEBUG
> >>>defined, but apr-util was not?
> >>
> >>I thought it might be something like that, so I rebuilt a clean
> >>httpd-2.0-HEAD worker as of a few minutes ago and rebuilt.
> > With or without --enable-pool-debug? (config.nice will tell you).
> 
> Without as far as I can see, the only debug flag being turned on is
> --enable-debug

I'm not able to reproduce it with the 2.0.52 release.
Here's my config.nice:

! /bin/sh
#
# Created by configure

"../../httpd-2.0.52/configure" \
"--with-mpm=worker" \
"--enable-so" \
"--enable-mods-shared=all" \
"--prefix=/home/smoke/apache/httpd-2.0.52-worker" \
"--enable-debug" \
"$@"

However if I change the last line from --enable-debug to 
--enable-pool-debug, the modperl-2.0 tests cannot seem to 
get past server startup.  But I can get the same backtrace as
you with 

  t/TEST -no-httpd t/apr-ext/bucket.t

so I still suspect --enable-pool-debug is somewherebehind this.
Maybe there's an older installed libapr0 that's sneaking into 
your httpd/modperl build?

-- 
Joe Schaefer


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: t/apr/bucket is dumping core on me

Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.

Joe Schaefer wrote:
> "Philippe M. Chiasson" <go...@ectoplasm.org> writes:
> 
> 
>>Joe Schaefer wrote:
> 
> 
> [...]
> 
> 
>>>Is it somehow possible that apr was compiled with APR_POOL_DEBUG
>>>defined, but apr-util was not?
>>
>>I thought it might be something like that, so I rebuilt a clean
>>httpd-2.0-HEAD worker as of a few minutes ago and rebuilt.
> 
> 
> With or without --enable-pool-debug? (config.nice will tell you).

Without as far as I can see, the only debug flag being turned on is
--enable-debug

> [...]
> 
> 
>>Funny thing is that when I look at apr_buckets_alloc.c:67, seems you
>>are looking at apr-util HEAD, and not at the APU_0_9_BRANCH.
> 
> 
> True, but AFAICT the difference is only the new APR_POOL_DEBUG section.


-- 
--------------------------------------------------------------------------------
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/     F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: t/apr/bucket is dumping core on me

Posted by Joe Schaefer <jo...@sunstarsys.com>.
"Philippe M. Chiasson" <go...@ectoplasm.org> writes:

> Joe Schaefer wrote:

[...]

> > Is it somehow possible that apr was compiled with APR_POOL_DEBUG
> > defined, but apr-util was not?
> 
> I thought it might be something like that, so I rebuilt a clean
> httpd-2.0-HEAD worker as of a few minutes ago and rebuilt.

With or without --enable-pool-debug? (config.nice will tell you).

[...]

> Funny thing is that when I look at apr_buckets_alloc.c:67, seems you
> are looking at apr-util HEAD, and not at the APU_0_9_BRANCH.

True, but AFAICT the difference is only the new APR_POOL_DEBUG section.

-- 
Joe Schaefer

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: t/apr/bucket is dumping core on me

Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.

Joe Schaefer wrote:
> "Philippe M. Chiasson" <go...@ectoplasm.org> writes:
> 
> [...]
> 
> 
>>#2  0x0021b45c in apr_bucket_alloc_create_ex (allocator=0x0) at
>>apr_buckets_alloc.c:67
>>#3  0x0021b405 in apr_bucket_alloc_create (p=0x9353f70) at
> 
> 
> APU_DECLARE_NONSTD(apr_bucket_alloc_t *) apr_bucket_alloc_create(apr_pool_t *p)
> {
>     apr_allocator_t *allocator = apr_pool_allocator_get(p);
>     apr_bucket_alloc_t *list;
> 
> #if APR_POOL_DEBUG
>     /* may be NULL for debug mode. */
>     if (allocator == NULL) {
>         if (apr_allocator_create(&allocator) != APR_SUCCESS) {
>             abort();
>         }
>     }
> #endif
> 
>     list = apr_bucket_alloc_create_ex(allocator);
>     list->pool = p;
>     apr_pool_cleanup_register(list->pool, list, alloc_cleanup,
>                               apr_pool_cleanup_null);
> 
>     return list;
> }
> 
> Is it somehow possible that apr was compiled with 
> APR_POOL_DEBUG defined, but apr-util was not?

I thought it might be something like that, so I rebuilt a clean httpd-2.0-HEAD worker as
of a few minutes ago and rebuilt.

#0  0x008bf65c in allocator_alloc (allocator=0x0, size=8192) at apr_pools.c:188
#1  0x008bf617 in apr_allocator_alloc (allocator=0x0, size=8168) at apr_pools.c:370
#2  0x0053745c in apr_bucket_alloc_create_ex (allocator=0x0) at apr_buckets_alloc.c:67
#3  0x00537405 in apr_bucket_alloc_create (p=0x96d8448) at apr_buckets_alloc.c:52
#4  0x004fa6fd in XS_APR__Bucket_alloc_create (my_perl=0xa2a1aa8, cv=0x9db8f0c) at Bucket.c:66
#5  0x00373709 in Perl_pp_entersub (my_perl=0xa2a1aa8) at pp_hot.c:2857
#6  0x0034f24f in Perl_runops_debug (my_perl=0xa2a1aa8) at dump.c:1442
#7  0x002f59b4 in S_call_body (my_perl=0xa2a1aa8, myop=0xf598e720, is_eval=0) at perl.c:2288
#8  0x002f54e8 in Perl_call_sv (my_perl=0xa2a1aa8, sv=0xad45170, flags=4) at perl.c:2206
#9  0x00fa4852 in modperl_callback (my_perl=0xa2a1aa8, handler=0xa2e05b0, p=0x9d3b2b0, r=0x97d5ca8, s=0xaca44f0, args=0x96929f8)
     at modperl_callback.c:115
#10 0x00fa511f in modperl_callback_run_handlers (idx=6, type=4, r=0x97d5ca8, c=0x0, s=0xaca44f0, pconf=0x0, plog=0x0, ptemp=0x0,
     run_mode=MP_HOOK_RUN_FIRST) at modperl_callback.c:276
#11 0x00fa5368 in modperl_callback_per_dir (idx=6, r=0x97d5ca8, run_mode=MP_HOOK_RUN_FIRST) at modperl_callback.c:364
#12 0x00f9dfec in modperl_response_handler_run (r=0x97d5ca8, finish=1) at mod_perl.c:909
#13 0x00f9e102 in modperl_response_handler (r=0x97d5ca8) at mod_perl.c:949
#14 0x0806c394 in ap_run_handler (r=0x97d5ca8) at config.c:151
#15 0x0806cab1 in ap_invoke_handler (r=0x97d5ca8) at config.c:358
#16 0x0806777f in ap_process_request (r=0x97d5ca8) at http_request.c:246
#17 0x080611fc in ap_process_http_connection (c=0x9ef61b0) at http_core.c:250
#18 0x080773f4 in ap_run_process_connection (c=0x9ef61b0) at connection.c:42
#19 0x080778ae in ap_process_connection (c=0x9ef61b0, csd=0x9dce0f8) at connection.c:175
#20 0x08068bbf in process_socket (p=0xa3446b0, sock=0x9dce0f8, my_child_num=0, my_thread_num=1, bucket_alloc=0xa79cff8)
     at worker.c:520
#21 0x0806935d in worker_thread (thd=0x9782c08, dummy=0x9a22cf8) at worker.c:834
#22 0x008b9cab in dummy_worker (opaque=0x9782c08) at thread.c:88
#23 0x00d5e98c in start_thread () from /lib/tls/libpthread.so.0

Funny thing is that when I look at apr_buckets_alloc.c:67, seems you are looking at apr-util HEAD,
and not at the APU_0_9_BRANCH.

-- 
--------------------------------------------------------------------------------
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/     F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: t/apr/bucket is dumping core on me

Posted by Joe Schaefer <jo...@sunstarsys.com>.
"Philippe M. Chiasson" <go...@ectoplasm.org> writes:

[...]

> #2  0x0021b45c in apr_bucket_alloc_create_ex (allocator=0x0) at
> apr_buckets_alloc.c:67
> #3  0x0021b405 in apr_bucket_alloc_create (p=0x9353f70) at

APU_DECLARE_NONSTD(apr_bucket_alloc_t *) apr_bucket_alloc_create(apr_pool_t *p)
{
    apr_allocator_t *allocator = apr_pool_allocator_get(p);
    apr_bucket_alloc_t *list;

#if APR_POOL_DEBUG
    /* may be NULL for debug mode. */
    if (allocator == NULL) {
        if (apr_allocator_create(&allocator) != APR_SUCCESS) {
            abort();
        }
    }
#endif

    list = apr_bucket_alloc_create_ex(allocator);
    list->pool = p;
    apr_pool_cleanup_register(list->pool, list, alloc_cleanup,
                              apr_pool_cleanup_null);

    return list;
}

Is it somehow possible that apr was compiled with 
APR_POOL_DEBUG defined, but apr-util was not?
-- 
Joe Schaefer


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org