You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Tyler MacDonald <ty...@yi.org> on 2004/12/24 00:14:29 UTC
segfault in 2.0RC1, didn't happen in 1.99_16?
-------------8<---------- Start Bug Report ------------8<----------
1. Problem Description:
Hello,
I just tried an upgrade to 2.0RC1... only to have to back out.
All of my scripts run fine, except for one -- which exits with a
segmentation fault reliably.
The segfault happens in the following line of code:
return Apache::OK;
The same script compiles OK in the following manner:
use Apache::Const qw(:common);
... that seems really, really odd to me. Segfaulting on a constant?
I just downgraded back to 1.99_16 to avoid the problem.
Here's my system configuration -- this is a production server so
I've had to move back to 1.99_16 until this problem is resolved, but nothing
else has changed.
2. Used Components and their Configuration:
*** mod_perl version 1.9916
*** using /home/faraway/src/mod_perl-1.99_16/lib/Apache/BuildConfig.pm
*** Makefile.PL options:
MP_APR_LIB => aprext
MP_AP_PREFIX => /opt/apache2
MP_COMPAT_1X =>
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_STATIC =>
*** /opt/apache2/bin/httpd -V
Server version: Apache/2.0.52
Server built: Dec 20 2004 14:46:15
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="/opt/apache2"
-D SUEXEC_BIN="/opt/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/opt/apache2/lib -lapr-0 -lrt -lm -lcrypt -lnsl -lpthread -ldl
-L/opt/apache2/lib -laprutil-0 -lgdbm -ldb-4.2 -lexpat
*** /usr/bin/perl -V
Summary of my perl5 (revision 5 version 8 subversion 4) configuration:
Platform:
osname=linux, osvers=2.6.8-1-686, archname=i386-linux-thread-multi
uname='linux cachaca 2.6.8-1-686 #1 sat aug 28 14:11:39 edt 2004 i686
gnulinux '
config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN
-Dcccdlflags=-fPIC -Darchname=i386-linux -Dprefix=/usr
-Dprivlib=/usr/share/perl/5.8 -Darchlib=/usr/lib/perl/5.8
-Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib/perl5
-Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl/5.8.4
-Dsitearch=/usr/local/lib/perl/5.8.4 -Dman1dir=/usr/share/man/man1
-Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1
-Dsiteman3dir=/usr/local/man/man3 -Dman1ext=1 -Dman3ext=3perl
-Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Uusesfio -Uusenm -Duseshrplib
-Dlibperl=libperl.so.5.8.4 -Dd_dosuid -des'
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
-DDEBIAN -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN
-fno-strict-aliasing -I/usr/local/include'
ccversion='', gccversion='3.3.4 (Debian 1:3.3.4-12)', 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=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt
perllibs=-ldl -lm -lpthread -lc -lcrypt
libc=/lib/libc-2.3.2.so, so=so, useshrplib=true,
libperl=libperl.so.5.8.4
gnulibc_version='2.3.2'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES
PERL_IMPLICIT_CONTEXT
Built under linux
Compiled at Sep 26 2004 12:01:38
%ENV:
PERL5LIB="/opt/weedns-4/perl5lib:/opt/weedns-4/skins/yi/perl5lib:/opt/crackerjacknet.com/lib:/opt/Reg-0.02/lib"
PERL_LWP_USE_HTTP_10="1"
@INC:
/opt/weedns-4/perl5lib
/opt/weedns-4/skins/yi/perl5lib
/opt/crackerjacknet.com/lib
/opt/Reg-0.02/lib
/etc/perl
/usr/local/lib/perl/5.8.4
/usr/local/share/perl/5.8.4
/usr/lib/perl5
/usr/share/perl5
/usr/lib/perl/5.8
/usr/share/perl/5.8
/usr/local/lib/site_perl
/usr/local/lib/perl/5.8.2
/usr/local/share/perl/5.8.2
/usr/local/lib/perl/5.8.0
/usr/local/share/perl/5.8.0
.
*** Packages of interest status:
Apache::Request: -
CGI : 3.04
LWP : 5.800
mod_perl : 1.9916
3. This is the core dump trace: (if you get a core dump):
[CORE TRACE COMES HERE]
This report was generated by /opt/apache2/bin/mp2bug on Thu Dec 23 23:10:51
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: segfault in 2.0RC1, didn't happen in 1.99_16?
Posted by Tyler MacDonald <ty...@yi.org>.
> Tyler, have you by chance read:
> http://perl.apache.org/docs/2.0/user/help/help.html#Resolving_Segmentation_Faults
> plus the short script that we can reproduce the problem with.
Maybe... I'll look into it in more detail later. My main point was
that no segmentation fault occurs in 1.99_16, so something must have changed
in the last two revisions that has introduced this behaviour (whether it's a
problem with mod_perl, or the way my script has been using it all along that
just surfaced with the new version). I've upgraded mod_perl many times on
this server and never had this particular problem, and of course have
recompiled everything (apache2, other modules, etc) in the same, correct
order as always.
I did do a backtrace, and can tell you that the error occured in
Perl_sv_setflag... If I muster up the courage to try this again, I'll send
you the entire trace.
> It's never a good idea to upgrade a production server, w/o first testing
> the new software on the staging machine. Please read this section in
> chapter 5 of "Practical mod_perl":
Hah! :) I need a good staging machine first. I guess I could set it
up on my home system, but I've got all sorts of other crazy stuff happening
there (daily debian-unstable upgrades, mod_bt testbed, etc) that might get
in the way.
Either way, as soon as I get a chance to test it more, I will and
will get you more info, either how I solved the problem or why I can't solve
it. :)
- Tyler
--
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: segfault in 2.0RC1, didn't happen in 1.99_16?
Posted by Stas Bekman <st...@stason.org>.
Tyler MacDonald wrote:
> -------------8<---------- Start Bug Report ------------8<----------
> 1. Problem Description:
>
> Hello,
>
> I just tried an upgrade to 2.0RC1... only to have to back out.
>
> All of my scripts run fine, except for one -- which exits with a
> segmentation fault reliably.
>
> The segfault happens in the following line of code:
>
> return Apache::OK;
>
> The same script compiles OK in the following manner:
>
> use Apache::Const qw(:common);
>
> ... that seems really, really odd to me. Segfaulting on a constant?
> I just downgraded back to 1.99_16 to avoid the problem.
Tyler, have you by chance read:
http://perl.apache.org/docs/2.0/user/help/help.html#Resolving_Segmentation_Faults
plus the short script that we can reproduce the problem with.
> Here's my system configuration -- this is a production server so
> I've had to move back to 1.99_16 until this problem is resolved, but nothing
> else has changed.
It's never a good idea to upgrade a production server, w/o first testing
the new software on the staging machine. Please read this section in
chapter 5 of "Practical mod_perl":
5.9. Three-Tier Server Scheme: Development, Staging, and Production
http://modperlbook.org/html/ch05_09.html
--
__________________________________________________________________
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