You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "G.W. Haywood" <ge...@www.jubileegroup.co.uk> on 2000/06/17 18:04:37 UTC

Segfault Apache1.3.12/mod_perl1.24/Solaris2.6

Hi all, 

Sorry, this is a bit long.

I'm working on a bunch of machines running Solaris 2.6 on which I have
installed Apache+mod_perl static.  The machines are set up for just a
couple of virtual hosts at present for testing, eventually they will
be load-balanced with mod_perl on separate machines and will host many
sites.  I downloaded & compiled new sources for the latest (not CVS)
versions of Apache 1.3.12, mod_perl 1.24, mod_macro 1.1.1 and Perl
5.005_03.  The compiler is gcc 2.91.66 and was used for all the
compilations.

I set up a plain/mod_perl Apache pair on one of the machines.  The
proxying worked fine and I could get server-info and server-status OK
from the mod_perl Apache.  I left it at that and went on to other
things.  Unfortunately when the development department started working
on the scripting a couple of days later (yesterday, Friday) the
mod_perl Apache started segfaulting as soon as they tried to get it to
serve a request from their test handler.  Here's the error_log message:

[Fri Jun 16 17:20:21 2000] [notice] \
child pid 22310 exit signal Segmentation Fault (11)

There is no core dump and the same thing happens with the -X switch.
The first Perl had thread support and dynamic linking, so I recompiled
it twice, once with no thread support and once without dynamic linking
but the same thing happened.  Below are the makepl_args.mod_perl, the
output of perl -V, httpd_perl -l, perl.conf, startup.pl and test.pm
which I just noticed contains a call to Apache::Request->new() and I
don't know why.  I don't think that should make Apache segfault...

I searched the archives and there are some Solaris segfaults but
nothing seems to fit this simple case.  I don't have access to the
machines at the weekend so I've posted this hoping it might ring some
bells somewhere before I try again next week maybe with the CVS
version of mod_perl 1.24 and maybe even with 1.21 and 1.3.9 just to
see what happens.  I'll also get rid of that Apache::Request call and
try things like Apache::Registry scripts to see what happens there.

Any input gratefully received.  Especially by Leo, who gets it in the
neck if the machines aren't ready to go live next Friday...

73,
Ged.

======================================================================
makepl_args.mod_perl
----------------------------------------------------------------------
USE_APACI=1
APACHE_PREFIX=/usr/local/apache/httpd_perl
APACHE_SRC=../apache_1.3.12/src
DO_HTTPD=1
EVERYTHING=1
ALL_HOOKS=1
PERL_SSI=1
PERL_SECTIONS=1
APACI_ARGS=--sbindir=/usr/local/sbin/httpd_perl
APACI_ARGS=--sysconfdir=/usr/local/apache/httpd_perl/conf
APACI_ARGS=--runtimedir=/usr/local/apache/httpd_perl/run
APACI_ARGS=--logfiledir=/usr/local/apache/httpd_perl/logs
APACI_ARGS=--localstatedir=/usr/local/apache/httpd_perl/stat
APACI_ARGS=--proxycachedir=/usr/local/apache/httpd_perl/proxy
APACI_ARGS=--enable-module=rewrite
APACI_ARGS=--enable-module=include
APACI_ARGS=--enable-module=info
APACI_ARGS=--activate-module=src/modules/extra/mod_macro.c
======================================================================
Output of perl -V:
----------------------------------------------------------------------
Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
  Platform:
    osname=solaris, osvers=2.6, archname=sun4-solaris
    uname='sunos emap-sun-07.whoc.theplanet.co.uk 5.6 generic_105181-21 sun4u sparc '
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef useperlio=undef d_sfio=undef
  Compiler:
    cc='cc -B/usr/ccs/bin/ -B/usr/ccs/bin/', optimize='-O', gccversion=egcs-2.91.66 19990314 (egcs-1.1.2 release)
    cppflags='-I/usr/local/include'
    ccflags ='-I/usr/local/include'
    stdchar='unsigned char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries:
    ld='ld', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -lgdbm -ldl -lm -lc -lcrypt
    libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_none.xs, dlext=none, d_dlsymun=undef, ccdlflags=''
    cccdlflags='', lddlflags=''


Characteristics of this binary (from libperl): 
  Built under solaris
  Compiled at Jun 16 2000 17:02:50
  @INC:
    /usr/local/lib/perl5/5.00503/sun4-solaris
    /usr/local/lib/perl5/5.00503
    /usr/local/lib/perl5/site_perl/5.005/sun4-solaris
    /usr/local/lib/perl5/site_perl/5.005
    .
======================================================================
httpd_perl -l
----------------------------------------------------------------------
Compiled-in modules:
  http_core.c
  mod_env.c
  mod_log_config.c
  mod_mime.c
  mod_negotiation.c
  mod_status.c
  mod_info.c
  mod_include.c
  mod_autoindex.c
  mod_dir.c
  mod_cgi.c
  mod_asis.c
  mod_imap.c
  mod_actions.c
  mod_userdir.c
  mod_alias.c
  mod_rewrite.c
  mod_access.c
  mod_auth.c
  mod_setenvif.c
  mod_perl.c
  mod_macro.c
suexec: disabled; invalid wrapper /usr/local/sbin/httpd_perl/suexec
======================================================================
#perl.conf
PerlRequire          /usr/local/apache/httpd_perl/conf/startup.pl
======================================================================
#!/usr/local/bin/perl
#startup.pl
BEGIN
{
  use Apache();
  print STDERR "Running startup.pl\n";
  use lib "/www/global";
  print STDERR "Got redirect!\n";
}
1;
======================================================================
package test;
use strict;
sub handler {
	my $r = shift;
	my $q = Apache::Request->new($r);
	$r->content_type('text/html');
	print "\n\n";
	print "Hello\n";
}
1;    
======================================================================
End of message


Re: Segfault Apache1.3.12/mod_perl1.24/Solaris2.6

Posted by Doug MacEachern <do...@covalent.net>.
On Mon, 19 Jun 2000, G.W. Haywood wrote:

> Hi Eric,
> 
> > > [Fri Jun 16 17:20:21 2000] [notice] \
> > > child pid 22310 exit signal Segmentation Fault (11)
> 
> On Mon, 19 Jun 2000, Eric Cholet wrote:
> 
> > backtrace.
> 
> (gdb) bt
> #0  0x2b444 in perl_handler_ismethod ()
> #1  0x2c43c in perl_call_handler ()
> #2  0x2bd5c in perl_run_stacked_handlers ()
> #3  0x29920 in perl_handler ()
> #4  0x7fce8 in ap_invoke_handler ()
> #5  0x9bdfc in ap_some_auth_required ()
> #6  0x9be7c in ap_process_request ()
> #7  0x8fbac in ap_child_terminate ()
> #8  0x8fe14 in ap_child_terminate ()
> #9  0x90014 in ap_child_terminate ()
> #10 0x908f4 in ap_child_terminate ()
> #11 0x914a0 in main ()
> 
> Curiously enough, Apache::Registry seems to run ok with a simple
> "Hello world" type of script.  Stay tuned.

if you haven't tried already, this bug has been fixed in cvs for quite a
while:
fix for 'sub handler : method {}' support when method is not found
[Eric Cholet <ch...@logilune.com>]



Re: Segfault Apache1.3.12/mod_perl1.24/Solaris2.6

Posted by "G.W. Haywood" <ge...@www.jubileegroup.co.uk>.
Hi Eric,

> > [Fri Jun 16 17:20:21 2000] [notice] \
> > child pid 22310 exit signal Segmentation Fault (11)

On Mon, 19 Jun 2000, Eric Cholet wrote:

> backtrace.

(gdb) bt
#0  0x2b444 in perl_handler_ismethod ()
#1  0x2c43c in perl_call_handler ()
#2  0x2bd5c in perl_run_stacked_handlers ()
#3  0x29920 in perl_handler ()
#4  0x7fce8 in ap_invoke_handler ()
#5  0x9bdfc in ap_some_auth_required ()
#6  0x9be7c in ap_process_request ()
#7  0x8fbac in ap_child_terminate ()
#8  0x8fe14 in ap_child_terminate ()
#9  0x90014 in ap_child_terminate ()
#10 0x908f4 in ap_child_terminate ()
#11 0x914a0 in main ()

Curiously enough, Apache::Registry seems to run ok with a simple
"Hello world" type of script.  Stay tuned.

73,
Ged.


Re: Segfault Apache1.3.12/mod_perl1.24/Solaris2.6

Posted by Eric Cholet <ch...@logilune.com>.
> Hi all, 
> 
> Sorry, this is a bit long.
[snip] 
> [Fri Jun 16 17:20:21 2000] [notice] \
> child pid 22310 exit signal Segmentation Fault (11)
[snip] 
> There is no core dump and the same thing happens with the -X switch.

please see the instructions in SUPPORT on how to provide a backtrace.

--
Eric