You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Bojan Smojver <bo...@binarix.com> on 2001/07/18 13:54:52 UTC

Problem with mod_jk 1.2.0 (latest CVS snapshot)

After including it in Apache 1.3.20, statically compiled/linked for
RedHat Linux 7.0, the error messages 'child pid xxxxx exit signal
Segmentation fault (11)' start appearing in the error log file of
Apache. mod_jk from Tomcat 3.3 M3 works fine with both Tomcat M3 and the
latest 3.3 CVS snapshot.

Here is the scenario to replicate the problem:

- start Tomcat and Apache, mod_jk for latest CVS
- call a few JSP/Velocity or whichever pages that exercise mod_jk
- restart Tomcat
- restart Apache (gracefully!) 2 seconds after Tomcat's startup (I'm
doing this from my startup script)
- try to load any page from the site you were just browsing and you'll
get errors along the lines that the web server didn't return anything
- log files show segfaults

If you stop Tomcat and Apache and start them again, this doesn't happen.
Also, when mod_jk shipped with M3 is used everything is sweet.

Don't know all that much about mod_jk, but it seems the problem is
related to graceful restart of Apache and subsequent reconnection to
Tomcat (ie. part of the code that does that was changed and ouch,
segfault :-)

Hope this helps.

Bojan

Re: Problem with mod_jk 1.2.0 (latest CVS snapshot)

Posted by Bojan Smojver <bo...@binarix.com>.
Bojan Smojver wrote:

> As for DSO, I'll have to work on that, so probably some time tomorrow
> (Sydney time).

Just did a DSO version and couldn't replicate the problem (BTW, I've
recompiled/statically linked Apache and mod_jk again since then and the
problem was still there). So, maybe it has to do with statically linking
Apache after all...

I still have to distribute this DSO version of Apache and mod_jk to some
slower machines to see if that makes any difference at all. The machine
that didn't produce any errors is a 1 GHz Athlon, so timing issues could
have been resolved by brute force, who knows...

Is there a recommendation as to the order of loading mod_jk for both
statically linked version and the DSO version? Maybe that's important.

And just one other observation, I'm also using php4. When statically
linked Apache doesn't contain php4 the problem is more difficult to
replicate (ie. it only occurs occasionally) which sort of pointed me
towards timing issues. But then again, I really don't understand the
internals of Apache to say what could be causing this.

All suggestions, fixes, resolutions etc. welcome ;-)

Bojan

Re: Problem with mod_jk 1.2.0 (latest CVS snapshot)

Posted by Bojan Smojver <bo...@binarix.com>.
OOPS! Sorry :-(

jk.conf (called from httpd.conf)
-----
###############################################################################
#                     Apache JK Configuration
File                            #
###############################################################################

<IfModule mod_jk.c>

JkWorkersFile /etc/tomcat/workers.properties
JkLogFile     /var/apache/logs/mod_jk.log
JkLogLevel    error

JkMount *.jsp                   ajp13
JkMount /*.jsp                  ajp13
JkMount *.vm                    ajp13
JkMount /*.vm                   ajp13
JkMount /servlet/*              ajp13
JkMount /login/j_security_check ajp13

</IfModule>
-----

workers.properties file:
-----
###############################################################################
#                        Apache JK Configuration
File                         #
###############################################################################

#
# Execution parameters
#######################

# Setup for RedHat Linux system
#
workers.tomcat_home=/usr/local/tomcat
workers.java_home=/usr/local/jdk
ps=/
worker.list=ajp13

# Definition for Ajp13 worker
#
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
-----

BTW, this is the stuff that was running OK with Tomcat 3.3 M3 and it
runs OK with CVS Tomcat 3.3 + mod_jk from M3.

As for DSO, I'll have to work on that, so probably some time tomorrow
(Sydney time).

One of the points that I'm trying to make anyway is that statically
linked Apache is supported, so mod_jk should run with it ;-) It runs
faster anyhow and it uses less memory.

Bojan

Gomez Henri wrote:
> 
> > After including it in Apache 1.3.20, statically compiled/linked for
> > RedHat Linux 7.0, the error messages 'child pid xxxxx exit signal
> > Segmentation fault (11)' start appearing in the error log file of
> > Apache. mod_jk from Tomcat 3.3 M3 works fine with both Tomcat M3 and
> > the
> > latest 3.3 CVS snapshot.
> 
> Could you try to rebuild it dynamically (DSO) and see if the
> problem persist. Thanks to send us mod_jk parts in httpd.conf
> and workers.properties file :)
> 
> > Here is the scenario to replicate the problem:
> >
> > - start Tomcat and Apache, mod_jk for latest CVS
> > - call a few JSP/Velocity or whichever pages that exercise mod_jk
> > - restart Tomcat
> > - restart Apache (gracefully!) 2 seconds after Tomcat's startup (I'm
> > doing this from my startup script)
> > - try to load any page from the site you were just browsing and you'll
> > get errors along the lines that the web server didn't return anything
> > - log files show segfaults
> >
> > If you stop Tomcat and Apache and start them again, this doesn't
> > happen.
> > Also, when mod_jk shipped with M3 is used everything is sweet.
> >
> > Don't know all that much about mod_jk, but it seems the problem is
> > related to graceful restart of Apache and subsequent reconnection to
> > Tomcat (ie. part of the code that does that was changed and ouch,
> > segfault :-)
> >
> > Hope this helps.
> >
> > Bojan
> >
> 
> -
> Henri Gomez                 ___[_]____
> EMAIL : hgomez@slib.fr        (. .)
> PGP KEY : 697ECEDD    ...oOOo..(_)..oOOo...
> PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6

Re: Problem with mod_jk 1.2.0 (latest CVS snapshot)

Posted by Gomez Henri <hg...@slib.fr>.
> After including it in Apache 1.3.20, statically compiled/linked for
> RedHat Linux 7.0, the error messages 'child pid xxxxx exit signal
> Segmentation fault (11)' start appearing in the error log file of
> Apache. mod_jk from Tomcat 3.3 M3 works fine with both Tomcat M3 and
> the
> latest 3.3 CVS snapshot.

Could you try to rebuild it dynamically (DSO) and see if the 
problem persist. Thanks to send us mod_jk parts in httpd.conf 
and workers.properties file :)

> Here is the scenario to replicate the problem:
> 
> - start Tomcat and Apache, mod_jk for latest CVS
> - call a few JSP/Velocity or whichever pages that exercise mod_jk
> - restart Tomcat
> - restart Apache (gracefully!) 2 seconds after Tomcat's startup (I'm
> doing this from my startup script)
> - try to load any page from the site you were just browsing and you'll
> get errors along the lines that the web server didn't return anything
> - log files show segfaults
> 
> If you stop Tomcat and Apache and start them again, this doesn't
> happen.
> Also, when mod_jk shipped with M3 is used everything is sweet.
> 
> Don't know all that much about mod_jk, but it seems the problem is
> related to graceful restart of Apache and subsequent reconnection to
> Tomcat (ie. part of the code that does that was changed and ouch,
> segfault :-)
> 
> Hope this helps.
> 
> Bojan
> 



-
Henri Gomez                 ___[_]____
EMAIL : hgomez@slib.fr        (. .)                     
PGP KEY : 697ECEDD    ...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6