Re: [mp2] threaded applications inside of mod_perl

[prev] [thread] [next] [Date index for 2005/02/03]

From: bob-modperl
Subject: Re: [mp2] threaded applications inside of mod_perl
Date: 20:10 on 03 Feb 2005
On Thu, 3 Feb 2005, Stas Bekman wrote:

> Almost there. What this report lacks is:
>
> 1) the explanation of how this script was invoked. Is it running under 
> ModPerl::Registry or else? Please show us the relevant httpd.conf bits.
>
> 2) backtrace. Please read:
> http://perl.apache.org/docs/2.0/user/help/help.html#Resolving_Segmentation_Faults


httpd.conf
===========# prefork MPM
# StartServers ......... number of server processes to start
# MinSpareServers ...... minimum number of server processes which are kept 
spare
# MaxSpareServers ...... maximum number of server processes which are kept 
spare
# MaxClients ........... maximum number of server processes allowed to 
start
# MaxRequestsPerChild .. maximum number of requests a server process 
serves
<IfModule prefork.c>
StartServers         5
MinSpareServers      5
MaxSpareServers     10
MaxClients          100
MaxRequestsPerChild 10000
</IfModule>

# pthread MPM
# StartServers ......... initial  number of server processes to start
# MaxClients ........... maximum  number of server processes allowed to 
start
# MinSpareThreads ...... minimum  number of worker threads which are kept 
spare
# MaxSpareThreads ...... maximum  number of worker threads which are kept 
spare
# ThreadsPerChild ...... constant number of worker threads in each server 
process
# MaxRequestsPerChild .. maximum  number of requests a server process 
serves
<IfModule worker.c>
StartServers         2
MaxClients         150
MinSpareThreads     25
MaxSpareThreads     75
ThreadsPerChild     25
MaxRequestsPerChild  0
</IfModule>

# perchild MPM
# NumServers ........... constant number of server processes
# StartThreads ......... initial  number of worker threads in each server 
process
# MinSpareThreads ...... minimum  number of worker threads which are kept 
spare
# MaxSpareThreads ...... maximum  number of worker threads which are kept 
spare
# MaxThreadsPerChild ... maximum  number of worker threads in each server 
process
# MaxRequestsPerChild .. maximum  number of connections per server process 
(then it dies)
<IfModule perchild.c>
NumServers           5
StartThreads         5
MinSpareThreads      5
MaxSpareThreads     10
MaxThreadsPerChild  20
MaxRequestsPerChild  0
AcceptMutex fcntl
</IfModule>

# Include module configuration:
#Include /etc/apache2/mods-enabled/*.load
#Include /etc/apache2/mods-enabled/*.conf
LoadModule log_config_module /usr/lib/httpd/modules/mod_log_config.so
LoadModule env_module /usr/lib/httpd/modules/mod_env.so
LoadModule alias_module /usr/lib/httpd/modules/mod_alias.so
LoadModule cgi_module /usr/lib/httpd/modules/mod_cgi.so
LoadModule rewrite_module /usr/lib/httpd/modules/mod_rewrite.so
LoadModule access_module /usr/lib/httpd/modules/mod_access.so
LoadModule dir_module /usr/lib/httpd/modules/mod_dir.so
LoadModule mime_module /usr/lib/httpd/modules/mod_mime.so
LoadModule autoindex_module /usr/lib/httpd/modules/mod_autoindex.so
LoadModule negotiation_module /usr/lib/httpd/modules/mod_negotiation.so
LoadModule setenvif_module /usr/lib/httpd/modules/mod_setenvif.so
LoadModule status_module /usr/lib/httpd/modules/mod_status.so
LoadModule auth_module /usr/lib/httpd/modules/mod_auth.so
LoadModule deflate_module /usr/lib/httpd/modules/mod_deflate.so



startup.pl
===========
#!/usr/bin/perl
use Apache2 ();

# preload all mp2 modules
# use ModPerl::MethodLookup;
# ModPerl::MethodLookup::preload_all_modules();

use Apache::Status();
use Apache::DBI();
$Apache::DBI::DEBUG = 1;

use ModPerl::Util (); #for CORE::GLOBAL::exit

use Apache::RequestRec ();
use Apache::RequestIO ();
use Apache::RequestUtil ();

#use Apache::Server ();
use Apache::ServerUtil ();
use Apache::Connection ();
use Apache::Log ();

use APR::Table ();

use ModPerl::Registry ();

use Apache::Const -compile => ':common';
use APR::Const -compile => ':common';



===================

I have recompiled httpd with debugging and removed all references to 
strip, recompiled perl with DEBUGGING, recompiled mod_perl as well.

I know this is not useful but I'm still not getting a good backtrace.  Any 
suggestions would be useful.

Starting program: /usr/src/redhat/BUILD/httpd-2.0.51/worker/httpd -X

Program received signal SIGINT, Interrupt.
0x406826ad in ?? ()
(gdb) bt
#0  0x406826ad in ?? ()
#1  0x801684d8 in ?? ()
#2  0x80285e4c in ?? ()
#3  0x01000001 in ?? ()
#4  0x80046c20 in ?? ()
#5  0x402b7314 in ?? ()
#6  0x4020a84e in ?? ()
#7  0x00000000 in ?? ()


(message missing)

[mp2] threaded applications inside of mod_perl
bob-modperl 03:15 on 03 Feb 2005

Re: [mp2] threaded applications inside of mod_perl
bob-modperl 20:10 on 03 Feb 2005

Generated at 11:21 on 20 Feb 2005 by mariachi v0.52