perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: [mp2] pools that go out of scope aren't a problem anymore?
Date Thu, 25 Nov 2004 23:29:46 GMT
Joe Schaefer wrote:

>>Do you have any tests that clearly demonstrate the problem?
> 
> 
> Guaranteeing a segfault may be tricky, 

They don't quite segfault for me. How is your system different than mine? 
See my t/REPORT at the end of this email

> but here are few command-line 
> examples that work consistently for me:
> 
>   % ~/perl/5.8.x/bin/perl -MApache2 -MAPR::Pool -MAPR::Table -wle ' 
>   {
>     my $p = APR::Pool->new; $p->cleanup_register(sub {print "Gone"}); 
>     $t = APR::Table::make($p, 10) 
>   }; print "Left block"; $t->set(a=>5); print $t->get("a")'
> 
>   Gone
>   Left block
>   Segmentation fault

perl-5.8.6-ithread -Mblib -MApache2 -MAPR::Pool -MAPR::Table -wl
  {
     my $p = APR::Pool->new; $p->cleanup_register(sub {print "Gone"});
     $t = APR::Table::make($p, 10)
   }; print "Left block"; $t->set(a=>5); print $t->get("a")
Gone
Left block
5

>   % ~/perl/5.8.x/bin/perl -MApache2 -MAPR::Pool -MAPR::Table -wle '
>   $t= APR::Table::make(APR::Pool->new, 10); 
>   $t->set($_=>$_), print "Set $_" for 1..20'
> 
>   Segmentation fault

Set 1
[...]
Set 20



> And as dumb luck would have it, here's what your specific
> example did for me:
> 
>     % ~/perl/5.8.x/bin/perl -MApache2 -MAPR::Pool -MAPR::Table -wle '
>     $t = APR::Table::make(APR::Pool->new, 10); 
>     $t->set(a=>5); print "Set ok"; print $t->get("a")'
> 
>     Set ok
>     5

2. Used Components and their Configuration:

*** mod_perl version 1.9918

*** using /home/stas/apache.org/mp2-svn/lib/Apache/BuildConfig.pm

*** Makefile.PL options:
   MP_APR_LIB      => aprext
   MP_APXS         => /home/stas/httpd/prefork/bin/apxs
   MP_CCOPTS       => -Wall -Werror
   MP_COMPAT_1X    => 1
   MP_DEBUG        => 1
   MP_GENERATE_XS  => 1
   MP_INST_APACHE2 => 1
   MP_LIBNAME      => mod_perl
   MP_MAINTAINER   => 1
   MP_TRACE        => 1
   MP_USE_DSO      => 1
   MP_USE_GTOP     => 1


*** /home/stas/httpd/prefork/bin/httpd -V
Server version: Apache/2.0.53-dev
Server built:   Sep 23 2004 23:20:50
Server's Module Magic Number: 20020903:9
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_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="/home/stas/httpd/prefork"
  -D SUEXEC_BIN="/home/stas/httpd/prefork/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/home/stas/httpd/prefork/lib -lapr-0 -lrt -lm -lcrypt -lnsl  -lpthread 
-ldl
  -L/home/stas/httpd/prefork/lib -laprutil-0 -lgdbm -ldb-4.0 -lexpat



*** /home/stas/perl/5.8.6-ithread/bin/perl5.8.6 -V
Summary of my perl5 (revision 5 version 8 subversion 6) configuration:
   Platform:
     osname=linux, osvers=2.6.8.1-12mdk, archname=i686-linux-thread-multi
     uname='linux rabbit.stason.org 2.6.8.1-12mdk #1 fri oct 1 12:53:41 
cest 2004 i686 mobile intel(r) pentium(r) 4 - m cpu 2.00ghz unknown gnulinux '
     config_args='-des -Dprefix=/home/stas/perl/5.8.6-ithread -Dusethreads 
-Doptimize=-g -Duseshrplib -Dusedevel -Accflags=-DDEBUG_LEAKING_SCALARS'
     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 
-DDEBUG_LEAKING_SCALARS -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 
-DDEBUG_LEAKING_SCALARS -DDEBUGGING -fno-strict-aliasing -pipe 
-I/usr/local/include -I/usr/include/gdbm'
     ccversion='', gccversion='3.4.1 (Mandrakelinux 10.1 3.4.1-4mdk)', 
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,/home/stas/perl/5.8.6-ithread/lib/5.8.6/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
   Locally applied patches:
         MAINT23477
   Built under linux
   Compiled at Nov 23 2004 11:38:42
   %ENV:
     PERLDOC_PAGER="less -R"
     PERL_LWP_USE_HTTP_10="1"
   @INC:
     /home/stas/perl/5.8.6-ithread/lib/5.8.6/i686-linux-thread-multi
     /home/stas/perl/5.8.6-ithread/lib/5.8.6
     /home/stas/perl/5.8.6-ithread/lib/site_perl/5.8.6/i686-linux-thread-multi
     /home/stas/perl/5.8.6-ithread/lib/site_perl/5.8.6
     /home/stas/perl/5.8.6-ithread/lib/site_perl
     .

*** Packages of interest status:

Apache::Request: -
CGI            : 3.05
LWP            : 5.800
mod_perl       : 1.2901, 1.9918



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

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


Mime
View raw message