You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Michael J Schout <ms...@gkg.net> on 2000/10/18 20:50:16 UTC

possible bug in mod_perl 1.24_01

I have had an application working under apache 1.3.12/mod_perl 1.24 for several
months now with no problems.

I am currently trying to make the jump to apache 1.3.14/mod_perl 1.24_01 (since
mod_perl 1.24 will not easily build agains 1.3.14).  When I do this, and then
try to start apache, it goes into an infinite loop proocessing <perl> sections.

The stack trace from gdb looks  like this:

#0  0x4010a6a1 in buffered_vfprintf (s=0xfbad2887, format=Cannot access memory at address 0xbf7ff184
) at vfprintf.c:1736
1736	vfprintf.c: No such file or directory.
(gdb) bt
#0  0x4010a6a1 in buffered_vfprintf (s=0xfbad2887, format=Cannot access memory at address 0xbf7ff184
) at vfprintf.c:1736
#1  0x40105966 in _IO_vfprintf (s=0x401aea20, 
    format=0x8119d18 "loading perl module '%s'...", ap=0xbf801910)
    at vfprintf.c:1029
#2  0x4010e027 in fprintf (stream=0x401aea20, 
    format=0x8119d18 "loading perl module '%s'...") at fprintf.c:32
#3  0x806d0c0 in perl_require_module ()
#4  0x806b40c in perl_section ()
#5  0x806b231 in perl_section_self_boot ()
#6  0x8068d8e in perl_cmd_require ()
#7  0x8081f29 in invoke_cmd ()
#8  0x80822ac in ap_handle_command ()
#9  0x806acb7 in perl_handle_command ()
#10 0x806b826 in perl_section ()
#11 0x806b231 in perl_section_self_boot ()
#12 0x8068d8e in perl_cmd_require ()
#13 0x8081f29 in invoke_cmd ()
#14 0x80822ac in ap_handle_command ()
#15 0x806acb7 in perl_handle_command ()
#16 0x806b826 in perl_section ()
#17 0x806b231 in perl_section_self_boot ()
#18 0x8068d8e in perl_cmd_require ()
#19 0x8081f29 in invoke_cmd ()
#20 0x80822ac in ap_handle_command ()

<snip a whole bunch of repetitions of steps 15-20>

#5889 0x806acb7 in perl_handle_command ()
#5890 0x806b826 in perl_section ()
#5891 0x806b231 in perl_section_self_boot ()
#5892 0x8068c6c in perl_cmd_module ()
#5893 0x8081f29 in invoke_cmd ()
#5894 0x80822ac in ap_handle_command ()
#5895 0x80822f8 in ap_srm_command_loop ()
#5896 0x80827ed in ap_process_resource_config ()
#5897 0x8085f28 in include_config ()
#5898 0x808206c in invoke_cmd ()
#5899 0x80822ac in ap_handle_command ()

#5900 0x806acb7 in perl_handle_command ()
#5901 0x806b043 in perl_handle_command_av ()
#5902 0x806b9d8 in perl_section ()
#5903 0x808206c in invoke_cmd ()
#5904 0x80822ac in ap_handle_command ()
#5905 0x80822f8 in ap_srm_command_loop ()
#5906 0x80827ed in ap_process_resource_config ()
#5907 0x8082e74 in ap_read_config ()
#5908 0x808a745 in main ()
#5909 0x400d89cb in __libc_start_main (main=0x808a560 <main>, argc=4, 
    argv=0xbffff914, init=0x8062524 <_init>, fini=0x811741c <_fini>, 
    rtld_fini=0x4000ae60 <_dl_fini>, stack_end=0xbffff90c)
    at ../sysdeps/generic/libc-start.c:92

And when I run with "MOD_PERL_TRACE=all" I get a whole bunch of output.  It starts out like this:

perl_parse args: '/dev/null' ...allocating perl interpreter...ok
constructing perl interpreter...ok
ok
running perl interpreter...ok
mod_perl: 0 END blocks encountered during server startup
loading perl module 'Apache'...loading perl module 'Apache::Constants::Exports'...ok
ok
loading perl module 'Tie::IxHash'...ok
SVt_PV: $Group = `mschout'
handle_command (Group mschout): OK
SVt_PV: $ServerAdmin = `mschout@gkg.net'
handle_command (ServerAdmin mschout@gkg.net): OK
perl_section: </Location>
perl_section: </VirtualHost>
perl_section: </Directory>
perl_section: </Location>
perl_section: </Files>
perl_section: </Files>
SVt_PV: $ServerRoot = `/nis.home/mschout/httpd'
handle_command (ServerRoot /nis.home/mschout/httpd): OK
SVt_PV: $User = `mschout'
handle_command (User mschout): OK
perl_section: </Directory>
loading perl module 'Apache'...ok
loading perl module 'Tie::IxHash'...ok
PORTS CONFIGURATION
HTTP : 8531
HTTPS: 4531
`@Listen' directive is TAKE1, (2 elements)
default: iterating over @Listen
handle_command (Listen 8531): OK
handle_command (Listen "4531"): OK
perl_section: </Location>
perl_section: <VirtualHost _default_:4531>
SSLVerifyDepth 10 (OK) Limit=no
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key (OK) Limit=no
SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt (OK) Limit=no
SSLVerifyClient none (OK) Limit=no
SSLEngine on (OK) Limit=no
handle_command (SetEnvIf "User-Agent" ".*MSIE.*" "nokeepalive" "ssl-unclean-shutdown"): OK
perl_section: </VirtualHost>
perl_section: </Directory>
perl_section: </Location>
perl_section: </Files>
SVt_PV: $Port = `8531'
handle_command (Port 8531): OK
perl_section: </Files>
perl_section: </Directory>
loading perl module 'Apache'...ok
loading perl module 'Tie::IxHash'...ok
SVt_PV: $DAVLockDB = `/var/tmp/DAVLock.mschout'
handle_command (DAVLockDB /var/tmp/DAVLock.mschout): OK
`@Listen' directive is TAKE1, (0 elements)
default: iterating over @Listen
perl_section: </Location>
perl_section: </VirtualHost>
perl_section: </Directory>
perl_section: </Location>
perl_section: </Files>
perl_section: </Files>
perl_section: </Directory>
SVt_PV: $DAVMinTimeout = `600'
handle_command (DAVMinTimeout 600): OK
loading perl module 'Apache'...ok
loading perl module 'Tie::IxHash'...ok
`@Listen' directive is TAKE1, (0 elements)
default: iterating over @Listen
perl_section: </Location>
perl_section: </VirtualHost>
perl_section: </Directory>
perl_section: <Location /tmpldav>
AllowOverride None (OK) Limit=no
DAV On (OK) Limit=no
Options Indexes (OK) Limit=no
perl_section: </Location>
perl_section: </Files>
perl_section: </Files>
`@Alias' directive is TAKE2, (4 elements)
handle_command (Alias /tmpldav /nis.home/mschout/dev/gkgdrs/gkgnsi/templates): OK
handle_command (Alias "/htmldav" "/nis.home/mschout/dev/gkgdrs/gkgweb/html"): OK
perl_section: </Directory>
loading perl module 'Apache'...ok
loading perl module 'Tie::IxHash'...ok
`@Listen' directive is TAKE1, (0 elements)
default: iterating over @Listen
perl_section: </Location>
perl_section: </VirtualHost>
perl_section: </Directory>
perl_section: <Location /htmldav>
AllowOverride None (OK) Limit=no
DAV On (OK) Limit=no
Options Indexes (OK) Limit=no
perl_section: </Location>
perl_section: </Files>
perl_section: </Files>
`@Alias' directive is TAKE2, (0 elements)
perl_section: </Directory>
loading perl module 'Apache'...ok
PerlModule: arg='Apache::Status'
loading perl module 'Apache::Status'...ok
bootstrapping <Perl> sections: arg=Apache::Status, keys=22
loading perl module 'Apache'...ok
loading perl module 'Tie::IxHash'...ok
`@Listen' directive is TAKE1, (0 elements)
default: iterating over @Listen
perl_section: </Location>
perl_section: </VirtualHost>
perl_section: </Directory>
perl_section: </Location>
perl_section: </Files>
perl_section: </Files>
`@Alias' directive is TAKE2, (0 elements)
perl_section: </Directory>
mod_perl: delete $INC{'Apache/Status.pm'} (klen=16)
init `PerlHandler' stack
perl_cmd_push_handlers: @PerlHandler, 'Apache::Status'
pushing `Apache::Status' into `PerlHandler' handlers
loading perl module 'Apache'...ok
loading perl module 'Tie::IxHash'...ok
SVt_PV: $CustomLog = `devel.gkg.net/access_log combined'
handle_command (CustomLog devel.gkg.net/access_log combined): OK
SVt_PV: $ErrorLog = `devel.gkg.net/error_log'
handle_command (ErrorLog devel.gkg.net/error_log): OK
SVt_PV: $SSLSessionCache = `dbm:devel.gkg.net/ssl_scache'
handle_command (SSLSessionCache dbm:devel.gkg.net/ssl_scache): OK
perl_section: </Location>
perl_section: </VirtualHost>
perl_section: </Location>
perl_section: </Files>
`@Include' directive is TAKE1, (1 elements)
default: iterating over @Include
handle_command (Include "/nis.home/mschout/dev/gkgdrs/gkgnsi/conf/httpd.conf"): loading perl module 'Apache'...ok
PerlModule: arg='Apache::DBI'
loading perl module 'Apache::DBI'...ok
bootstrapping <Perl> sections: arg=Apache::DBI, keys=49
loading perl module 'Apache'...ok
loading perl module 'Tie::IxHash'...ok
SVt_PV: $CustomLog = `devel.gkg.net/access_log combined'
handle_command (CustomLog devel.gkg.net/access_log combined): OK
SVt_PV: $ErrorLog = `devel.gkg.net/error_log'
handle_command (ErrorLog devel.gkg.net/error_log): OK
SVt_PV: $SSLSessionCache = `dbm:devel.gkg.net/ssl_scache'
handle_command (SSLSessionCache dbm:devel.gkg.net/ssl_scache): OK
perl_section: </Location>
perl_section: </VirtualHost>
perl_section: </Location>
perl_section: </Files>
`@Include' directive is TAKE1, (0 elements)
default: iterating over @Include
perl_section: </Directory>
SVt_PV: $LockFile = `/var/tmp/httpd.lock.mschout'
handle_command (LockFile /var/tmp/httpd.lock.mschout): OK
SVt_PV: $DocumentRoot = `/nis.home/mschout/dev/gkgdrs/gkgweb/html'
handle_command (DocumentRoot /nis.home/mschout/dev/gkgdrs/gkgweb/html): OK
`@Listen' directive is TAKE1, (0 elements)
default: iterating over @Listen
SVt_PV: $ScoreBoardFile = `devel.gkg.net/httpd.scoreboard'
handle_command (ScoreBoardFile devel.gkg.net/httpd.scoreboard): OK
perl_section: </Directory>
SVt_PV: $RewriteLog = `devel.gkg.net/rewrite_log'
handle_command (RewriteLog devel.gkg.net/rewrite_log): OK
SVt_PV: $SSLMutex = `file:devel.gkg.net/ssl_mutex'
handle_command (SSLMutex file:devel.gkg.net/ssl_mutex): OK
SVt_PV: $PerlRequire = `/nis.home/mschout/dev/gkgdrs/gkgnsi/conf/startup.pl'
handle_command (PerlRequire /nis.home/mschout/dev/gkgdrs/gkgnsi/conf/startup.pl): PerlRequire: arg=`/nis.home/mschout/dev/gkgdrs/gkgnsi/conf/startup.pl'
attempting to require `/nis.home/mschout/dev/gkgdrs/gkgnsi/conf/startup.pl'
fetching PerlChildInitHandler stack
PerlChildInitHandler handlers stack undef, creating
pushing CODE ref into `PerlChildInitHandler' handlers
fetching PerlChildInitHandler stack
pushing CODE ref into `PerlChildInitHandler' handlers
fetching PerlChildInitHandler stack
pushing CODE ref into `PerlChildInitHandler' handlers
fetching PerlChildInitHandler stack
pushing CODE ref into `PerlChildInitHandler' handlers
bootstrapping <Perl> sections: arg=/nis.home/mschout/dev/gkgdrs/gkgnsi/conf/startup.pl, keys=49
loading perl module 'Apache'...ok
loading perl module 'Tie::IxHash'...ok
SVt_PV: $CustomLog = `devel.gkg.net/access_log combined'
handle_command (CustomLog devel.gkg.net/access_log combined): OK
SVt_PV: $ErrorLog = `devel.gkg.net/error_log'
handle_command (ErrorLog devel.gkg.net/error_log): OK
SVt_PV: $SSLSessionCache = `dbm:devel.gkg.net/ssl_scache'
handle_command (SSLSessionCache dbm:devel.gkg.net/ssl_scache): OK
perl_section: </Location>
perl_section: </VirtualHost>
perl_section: </Location>
perl_section: </Files>
`@Include' directive is TAKE1, (0 elements)
default: iterating over @Include
perl_section: </Directory>
SVt_PV: $LockFile = `/var/tmp/httpd.lock.mschout'
handle_command (LockFile /var/tmp/httpd.lock.mschout): OK
SVt_PV: $DocumentRoot = `/nis.home/mschout/dev/gkgdrs/gkgweb/html'
handle_command (DocumentRoot /nis.home/mschout/dev/gkgdrs/gkgweb/html): OK
`@Listen' directive is TAKE1, (0 elements)
default: iterating over @Listen
SVt_PV: $ScoreBoardFile = `devel.gkg.net/httpd.scoreboard'
handle_command (ScoreBoardFile devel.gkg.net/httpd.scoreboard): OK
perl_section: </Directory>
SVt_PV: $RewriteLog = `devel.gkg.net/rewrite_log'
handle_command (RewriteLog devel.gkg.net/rewrite_log): OK
SVt_PV: $SSLMutex = `file:devel.gkg.net/ssl_mutex'
handle_command (SSLMutex file:devel.gkg.net/ssl_mutex): OK
SVt_PV: $PerlRequire = `/nis.home/mschout/dev/gkgdrs/gkgnsi/conf/startup.pl'
handle_command (PerlRequire /nis.home/mschout/dev/gkgdrs/gkgnsi/conf/startup.pl): PerlRequire: arg=`/nis.home/mschout/dev/gkgdrs/gkgnsi/conf/startup.pl'
attempting to require `/nis.home/mschout/dev/gkgdrs/gkgnsi/conf/startup.pl'
bootstrapping <Perl> sections: arg=/nis.home/mschout/dev/gkgdrs/gkgnsi/conf/startup.pl, keys=49
loading perl module 'Apache'...ok
loading perl module 'Tie::IxHash'...ok
SVt_PV: $CustomLog = `devel.gkg.net/access_log combined'
handle_command (CustomLog devel.gkg.net/access_log combined): OK
SVt_PV: $ErrorLog = `devel.gkg.net/error_log'
handle_command (ErrorLog devel.gkg.net/error_log): OK
SVt_PV: $SSLSessionCache = `dbm:devel.gkg.net/ssl_scache'
handle_command (SSLSessionCache dbm:devel.gkg.net/ssl_scache): OK
perl_section: </Location>
perl_section: </VirtualHost>
perl_section: </Location>
perl_section: </Files>
`@Include' directive is TAKE1, (0 elements)
default: iterating over @Include
perl_section: </Directory>
SVt_PV: $LockFile = `/var/tmp/httpd.lock.mschout'
handle_command (LockFile /var/tmp/httpd.lock.mschout): OK
SVt_PV: $DocumentRoot = `/nis.home/mschout/dev/gkgdrs/gkgweb/html'
handle_command (DocumentRoot /nis.home/mschout/dev/gkgdrs/gkgweb/html): OK
`@Listen' directive is TAKE1, (0 elements)
default: iterating over @Listen
SVt_PV: $ScoreBoardFile = `devel.gkg.net/httpd.scoreboard'
handle_command (ScoreBoardFile devel.gkg.net/httpd.scoreboard): OK
perl_section: </Directory>
SVt_PV: $RewriteLog = `devel.gkg.net/rewrite_log'
handle_command (RewriteLog devel.gkg.net/rewrite_log): OK
SVt_PV: $SSLMutex = `file:devel.gkg.net/ssl_mutex'
handle_command (SSLMutex file:devel.gkg.net/ssl_mutex): OK
SVt_PV: $PerlRequire = `/nis.home/mschout/dev/gkgdrs/gkgnsi/conf/startup.pl'
handle_command (PerlRequire /nis.home/mschout/dev/gkgdrs/gkgnsi/conf/startup.pl): PerlRequire: arg=`/nis.home/mschout/dev/gkgdrs/gkgnsi/conf/startup.pl'
attempting to require `/nis.home/mschout/dev/gkgdrs/gkgnsi/conf/startup.pl'
bootstrapping <Perl> sections: arg=/nis.home/mschout/dev/gkgdrs/gkgnsi/conf/startup.pl, keys=49

Etc.  it continues looping.  The next line in the log is
loading perl module 'Apache'...ok

and it starts to loop the last 32 lines or so.  It continues to do this until
it crashes.

My guess is that its running out of stack space when it crahes.  However, I
dont understand why I'm seeing it enter this infinite loop.  If I downgrade to
1.3.12 / 1.24 the server starts right up.

I dont know what else to do to look into this further.  The trace log doesnt
really seen to implicate any problem either.

Anyone else seen this / anyone have any ideas?

Mike


Re: possible bug in mod_perl 1.24_01

Posted by Michael J Schout <ms...@gkg.net>.
I should also have mentioned:

I am using perl 5.6.0, Linux 2.2.x

I used the same perl / os for both apache1.3.12/mod_perl 1.24, and apache
1.3.14/mod_perl 1.24_01.

Mike


Re: possible bug in mod_perl 1.24_01

Posted by Doug MacEachern <do...@covalent.net>.
On Wed, 18 Oct 2000, Michael J Schout wrote:

> I have had an application working under apache 1.3.12/mod_perl 1.24 for several
> months now with no problems.
> 
> I am currently trying to make the jump to apache 1.3.14/mod_perl 1.24_01 (since
> mod_perl 1.24 will not easily build agains 1.3.14).  When I do this, and then
> try to start apache, it goes into an infinite loop proocessing <perl> sections.

thanks for the debugging (and patience), try this patch just applied to
cvs..

prevent $PerlRequire in a <Perl> section from triggering an endless loop
[Salvador Ortiz Garcia <so...@msg.com.mx>]

Index: src/modules/perl/mod_perl.h
===================================================================
RCS file: /home/cvs/modperl/src/modules/perl/mod_perl.h,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -r1.105 -r1.106
--- src/modules/perl/mod_perl.h	2000/10/03 18:19:14	1.105
+++ src/modules/perl/mod_perl.h	2000/12/20 07:24:43	1.106
@@ -491,9 +491,10 @@
 #ifdef PERL_SECTIONS
 # ifndef PERL_SECTIONS_SELF_BOOT
 #  ifdef WIN32
-#   define PERL_SECTIONS_SELF_BOOT getenv("PERL_SECTIONS_SELF_BOOT")
+#   define PERL_SECTIONS_SELF_BOOT \
+       (getenv("PERL_SECTIONS_SELF_BOOT") && !perl_sections_self_boot)
 #  else
-#   define PERL_SECTIONS_SELF_BOOT 1
+#   define PERL_SECTIONS_SELF_BOOT !perl_sections_self_boot
 #  endif
 # endif
 #endif