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/09/24 23:46:05 UTC

Re: brand new staticised mod_perl 1.99.16 / apache 2.0.51 segfaults.

Matthew Hodgson wrote:

> Stas Bekman wrote:
>
>> Matthew, please try the current cvs, Philippe has been working hard 
>> on improving the static build since _16 was released.
>> http://perl.apache.org/download/source.html#Development_mod_perl_2_0_Source_Distribution 
>
>
>
> Okay, my previous build using latest mod_perl cvs was slightly screwy 
> due to not cleaning the build tree sufficiently & not realising that 
> you now specify MP_USE_STATIC=1 to build a statically linked httpd.  
> Armed with this knowledge, i'm happy to say that it doesn't crash 
> under debian unstable - but under stable, the same problem presents 
> itself. :(
>
> (under debian unstable, I had to export -I/usr/lib/perl/5.8/CORE/ in 
> CPPFLAGS for it to find the right perl headers when compiling)
>
> -------------8<---------- Start Bug Report ------------8<----------
> 1. Problem Description:
>
>   mod_perl 2.0 CVS head + apache 2.0.51 segfault at startup under 
> debian stable.  I also had to butcher 
> ./src/modules/perl/modperl_exports.c to remove non-existent symbol 
> references to get it to compile.

Can you list these symbols you had to rip out ?

> 2. Used Components and their Configuration:
>
> *** mod_perl version 1.9917
>
> *** using 
> /usr/local/src/web/apache2/mod_perl-2.0-cvs/lib/Apache/BuildConfig.pm
>
> *** Makefile.PL options:
>   MP_APR_LIB      => aprext
>   MP_AP_CONFIGURE => --enable-maintainer-mode 
> --prefix=/usr/local/apache2 --localstatedir=/var/run/apache2 
> --with-mpm=prefork
>   MP_AP_PREFIX    => 
> /usr/local/src/web/apache2/mod_perl-2.0-cvs/../httpd-2.0.51
>   MP_COMPAT_1X    => 1
>   MP_DEBUG        => 1
>   MP_GENERATE_XS  => 1
>   MP_INST_APACHE2 => 1
>   MP_LIBNAME      => mod_perl
>   MP_TRACE        => 1
>   MP_USE_STATIC   => 1
>
>
> *** /usr/local/src/web/apache2/mod_perl-2.0-cvs/../httpd-2.0.51/httpd -V
> Server version: Apache/2.0.51
> Server built:   Sep 24 2004 03:14:03
> 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="/usr/local/apache2"
>  -D SUEXEC_BIN="/usr/local/apache2/bin/suexec"
>  -D DEFAULT_PIDLOG="/var/run/apache2/logs/httpd.pid"
>  -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
>  -D DEFAULT_LOCKFILE="/var/run/apache2/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/src/web/apache2/httpd-2.0.51/srclib/apr/.libs
>  -L/usr/local/src/web/apache2/httpd-2.0.51/srclib/apr -lapr-0 -lrt -lm 
> -lcrypt -lnsl  -lpthread -ldl
> -L/usr/local/src/web/apache2/httpd-2.0.51/srclib/apr-util/.libs
>  -L/usr/local/src/web/apache2/httpd-2.0.51/srclib/apr-util -laprutil-0 
> -lgdbm -ldb3 -lexpat
>
>
>
> *** /usr/bin/perl -V
> Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
>   Platform:
>     osname=linux, osvers=2.6.3-deb2-skas3, archname=i386-linux
>     uname='linux mizar 2.6.3-deb2-skas3 #1 sun mar 14 14:46:35 pst 
> 2004 i686 unknown '
>     config_args='-Dccflags=-DDEBIAN -Dcccdlflags=-fPIC 
> -Darchname=i386-linux -Dprefix=/usr -Dprivlib=/usr/share/perl/5.6.1 
> -Darchlib=/usr/lib/perl/5.6.1 -Dvendorprefix=/usr 
> -Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib/perl5 
> -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl/5.6.1 
> -Dsitearch=/usr/local/lib/perl/5.6.1 -Dman1dir=/usr/share/man/man1 
> -Dman3dir=/usr/share/man/man3 -Dman1ext=1 -Dman3ext=3perl 
> -Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Uusesfio -Duseshrplib 
> -Dlibperl=libperl.so.5.6.1 -Dd_dosuid -des'
>     hint=recommended, useposix=true, d_sigaction=define
>     usethreads=undef use5005threads=undef useithreads=undef 
> usemultiplicity=undef
>     useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
>     use64bitint=undef use64bitall=undef uselongdouble=undef
>   Compiler:
>     cc='cc', ccflags ='-DDEBIAN -fno-strict-aliasing 
> -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
>     optimize='-O2',
>     cppflags='-DDEBIAN -fno-strict-aliasing -I/usr/local/include'
>     ccversion='', gccversion='2.95.4 20011002 (Debian prerelease)', 
> 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, usemymalloc=n, prototype=define
>   Linker and Libraries:
>     ld='cc', ldflags =' -L/usr/local/lib'
>     libpth=/usr/local/lib /lib /usr/lib
>     libs=-lgdbm -ldb -ldl -lm -lc -lcrypt
>     perllibs=-ldl -lm -lc -lcrypt
>     libc=/lib/libc-2.2.5.so, so=so, useshrplib=true, 
> libperl=libperl.so.5.6.1
>   Dynamic Linking:
>     dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
>     cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'
>
>
> Characteristics of this binary (from libperl):
>   Compile-time options: USE_LARGE_FILES
>   Built under linux
>   Compiled at Apr  4 2004 05:57:53
>   %ENV:
>     PERL_LWP_USE_HTTP_10="1"
>   @INC:
>     /usr/local/lib/perl/5.6.1
>     /usr/local/share/perl/5.6.1
>     /usr/lib/perl5
>     /usr/share/perl5
>     /usr/lib/perl/5.6.1
>     /usr/share/perl/5.6.1
>     /usr/local/lib/site_perl
>     .
>
> *** Packages of interest status:
>
> Apache::Request: -
> CGI            : 2.752
> LWP            : 5.64, 5.69
> mod_perl       : 1.29, 1.9917
>
>
> 3. This is the core dump trace: (if you get a core dump):
>
> (gdb) run -X
> Starting program: /usr/local/src/web/apache2/httpd-2.0.51/.libs/httpd -X
> [New Thread 1024 (LWP 20270)]
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 1024 (LWP 20270)]
> 0x4008df0b in Perl_newSVpvn () from /usr/lib/libperl.so.5.6
> (gdb) bt
> #0  0x4008df0b in Perl_newSVpvn () from /usr/lib/libperl.so.5.6
> #1  0x40036262 in perl_parse () from /usr/lib/libperl.so.5.6
> #2  0x400360f0 in perl_parse () from /usr/lib/libperl.so.5.6
> #3  0x0806a8f9 in modperl_startup (s=0x8103cc8, p=0x80fe050) at 
> mod_perl.c:234
> #4  0x0806a7d8 in modperl_startup (s=0x8103cc8, p=0x80fe050) at 
> mod_perl.c:186
> #5  0x0806b6f1 in modperl_init (base_server=0x8103cc8, p=0x80fe050) at 
> mod_perl.c:414
> #6  0x0806b870 in modperl_hook_init (pconf=0x80fe050, plog=0x8138138, 
> ptemp=0x81140a8, s=0x8103cc8) at mod_perl.c:547
> #7  0x080ae0b9 in ap_run_open_logs (pconf=0x80fe050, plog=0x8138138, 
> ptemp=0x81140a8, s=0x8103cc8) at config.c:144
> #8  0x080b4502 in main (argc=2, argv=0xbffffbf4) at main.c:600
> (gdb)
>
>
> This report was generated by t/REPORT on Fri Sep 24 02:19:31 2004 GMT.
>
> -------------8<---------- End Bug Report --------------8<----------
>
>


Re: brand new staticised mod_perl 1.99.16 / apache 2.0.51 segfaults.

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

Matthew Hodgson wrote:
> Hi,
> 
> is there anything more I can do to try to assist with getting mod_perl2 to
> play nice with perl 5.6.1  (esp. when statically linked)?

No, your bug reports were very helpfull ;-)

   Or is it time
> for me to finally upgrade all my servers to debian sarge, complete with 
> perl 5.8.x?

Well, as much as Perl 5.8.x is superior to  Perl 5.6.1 IMO, mod_perl is still
supported on 5.6.1. I am currently investigating the problems you are having
with 5.6.1. So, I might not upgrade just yet.

More on this later.

> cheers,
> 
> Matthew.
> 
> 
> On Fri, 24 Sep 2004, Philippe M. Chiasson wrote:
> 
> 
>>Matthew Hodgson wrote:
>>
>>
>>>Stas Bekman wrote:
>>>
>>>
>>>>Matthew, please try the current cvs, Philippe has been working hard on 
>>>>improving the static build since _16 was released.
>>>>http://perl.apache.org/download/source.html#Development_mod_perl_2_0_Source_Distribution 
>>>
>>>
>>>
>>>Okay, my previous build using latest mod_perl cvs was slightly screwy due 
>>>to not cleaning the build tree sufficiently & not realising that you now 
>>>specify MP_USE_STATIC=1 to build a statically linked httpd.  Armed with 
>>>this knowledge, i'm happy to say that it doesn't crash under debian 
>>>unstable - but under stable, the same problem presents itself. :(
>>>
>>>(under debian unstable, I had to export -I/usr/lib/perl/5.8/CORE/ in 
>>>CPPFLAGS for it to find the right perl headers when compiling)
>>>
>>>-------------8<---------- Start Bug Report ------------8<----------
>>>1. Problem Description:
>>>
>>> mod_perl 2.0 CVS head + apache 2.0.51 segfault at startup under debian 
>>>stable.  I also had to butcher ./src/modules/perl/modperl_exports.c to 
>>>remove non-existent symbol references to get it to compile.
>>
>>Can you list these symbols you had to rip out ?
>>
>>
>>>2. Used Components and their Configuration:
>>>
>>>*** mod_perl version 1.9917
>>>
>>>*** using 
>>>/usr/local/src/web/apache2/mod_perl-2.0-cvs/lib/Apache/BuildConfig.pm
>>>
>>>*** Makefile.PL options:
>>>MP_APR_LIB      => aprext
>>>MP_AP_CONFIGURE => --enable-maintainer-mode 
>>>--prefix=/usr/local/apache2 --localstatedir=/var/run/apache2 
>>>--with-mpm=prefork
>>> MP_AP_PREFIX    => 
>>>/usr/local/src/web/apache2/mod_perl-2.0-cvs/../httpd-2.0.51
>>>MP_COMPAT_1X    => 1
>>>MP_DEBUG        => 1
>>>MP_GENERATE_XS  => 1
>>>MP_INST_APACHE2 => 1
>>>MP_LIBNAME      => mod_perl
>>>MP_TRACE        => 1
>>>MP_USE_STATIC   => 1
>>>
>>>
>>>*** /usr/local/src/web/apache2/mod_perl-2.0-cvs/../httpd-2.0.51/httpd -V
>>>Server version: Apache/2.0.51
>>>Server built:   Sep 24 2004 03:14:03
>>>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="/usr/local/apache2"
>>>-D SUEXEC_BIN="/usr/local/apache2/bin/suexec"
>>>-D DEFAULT_PIDLOG="/var/run/apache2/logs/httpd.pid"
>>>-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
>>>-D DEFAULT_LOCKFILE="/var/run/apache2/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/src/web/apache2/httpd-2.0.51/srclib/apr/.libs
>>>-L/usr/local/src/web/apache2/httpd-2.0.51/srclib/apr -lapr-0 -lrt -lm 
>>>-lcrypt -lnsl  -lpthread -ldl
>>>-L/usr/local/src/web/apache2/httpd-2.0.51/srclib/apr-util/.libs
>>>-L/usr/local/src/web/apache2/httpd-2.0.51/srclib/apr-util -laprutil-0 
>>>-lgdbm -ldb3 -lexpat
>>>
>>>
>>>
>>>*** /usr/bin/perl -V
>>>Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
>>>Platform:
>>>osname=linux, osvers=2.6.3-deb2-skas3, archname=i386-linux
>>>uname='linux mizar 2.6.3-deb2-skas3 #1 sun mar 14 14:46:35 pst 
>>>2004 i686 unknown '
>>>   config_args='-Dccflags=-DDEBIAN -Dcccdlflags=-fPIC 
>>>-Darchname=i386-linux -Dprefix=/usr -Dprivlib=/usr/share/perl/5.6.1 
>>>-Darchlib=/usr/lib/perl/5.6.1 -Dvendorprefix=/usr 
>>>-Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib/perl5 
>>>-Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl/5.6.1 
>>>-Dsitearch=/usr/local/lib/perl/5.6.1 -Dman1dir=/usr/share/man/man1 
>>>-Dman3dir=/usr/share/man/man3 -Dman1ext=1 -Dman3ext=3perl 
>>>-Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Uusesfio -Duseshrplib 
>>>-Dlibperl=libperl.so.5.6.1 -Dd_dosuid -des'
>>>hint=recommended, useposix=true, d_sigaction=define
>>>usethreads=undef use5005threads=undef useithreads=undef 
>>>usemultiplicity=undef
>>>useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
>>>use64bitint=undef use64bitall=undef uselongdouble=undef
>>>Compiler:
>>>   cc='cc', ccflags ='-DDEBIAN -fno-strict-aliasing -I/usr/local/include 
>>>-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
>>>optimize='-O2',
>>>cppflags='-DDEBIAN -fno-strict-aliasing -I/usr/local/include'
>>>ccversion='', gccversion='2.95.4 20011002 (Debian prerelease)', 
>>>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, usemymalloc=n, prototype=define
>>>Linker and Libraries:
>>>ld='cc', ldflags =' -L/usr/local/lib'
>>>libpth=/usr/local/lib /lib /usr/lib
>>>libs=-lgdbm -ldb -ldl -lm -lc -lcrypt
>>>perllibs=-ldl -lm -lc -lcrypt
>>>libc=/lib/libc-2.2.5.so, so=so, useshrplib=true, 
>>>libperl=libperl.so.5.6.1
>>>Dynamic Linking:
>>>dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
>>>cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'
>>>
>>>
>>>Characteristics of this binary (from libperl):
>>>Compile-time options: USE_LARGE_FILES
>>>Built under linux
>>>Compiled at Apr  4 2004 05:57:53
>>>%ENV:
>>> PERL_LWP_USE_HTTP_10="1"
>>>@INC:
>>>/usr/local/lib/perl/5.6.1
>>>/usr/local/share/perl/5.6.1
>>>/usr/lib/perl5
>>>/usr/share/perl5
>>>/usr/lib/perl/5.6.1
>>>/usr/share/perl/5.6.1
>>>/usr/local/lib/site_perl
>>>.
>>>
>>>*** Packages of interest status:
>>>
>>>Apache::Request: -
>>>CGI            : 2.752
>>>LWP            : 5.64, 5.69
>>>mod_perl       : 1.29, 1.9917
>>>
>>>
>>>3. This is the core dump trace: (if you get a core dump):
>>>
>>>(gdb) run -X
>>>Starting program: /usr/local/src/web/apache2/httpd-2.0.51/.libs/httpd -X
>>>[New Thread 1024 (LWP 20270)]
>>>
>>>Program received signal SIGSEGV, Segmentation fault.
>>>[Switching to Thread 1024 (LWP 20270)]
>>>0x4008df0b in Perl_newSVpvn () from /usr/lib/libperl.so.5.6
>>>(gdb) bt
>>>
>>>>0  0x4008df0b in Perl_newSVpvn () from /usr/lib/libperl.so.5.6
>>>>1  0x40036262 in perl_parse () from /usr/lib/libperl.so.5.6
>>>>2  0x400360f0 in perl_parse () from /usr/lib/libperl.so.5.6
>>>>3  0x0806a8f9 in modperl_startup (s=0x8103cc8, p=0x80fe050) at 
>>>
>>>mod_perl.c:234
>>>#4  0x0806a7d8 in modperl_startup (s=0x8103cc8, p=0x80fe050) at 
>>>mod_perl.c:186
>>>#5  0x0806b6f1 in modperl_init (base_server=0x8103cc8, p=0x80fe050) at 
>>>mod_perl.c:414
>>>#6  0x0806b870 in modperl_hook_init (pconf=0x80fe050, plog=0x8138138, 
>>>ptemp=0x81140a8, s=0x8103cc8) at mod_perl.c:547
>>>#7  0x080ae0b9 in ap_run_open_logs (pconf=0x80fe050, plog=0x8138138, 
>>>ptemp=0x81140a8, s=0x8103cc8) at config.c:144
>>>#8  0x080b4502 in main (argc=2, argv=0xbffffbf4) at main.c:600
>>>(gdb)
>>>
>>>
>>>This report was generated by t/REPORT on Fri Sep 24 02:19:31 2004 GMT.
>>>
>>>-------------8<---------- End Bug Report --------------8<----------
>>>
>>>
>>
>>
>>
> 

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