tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glenn Nielsen <gl...@voyager.apg.more.net>
Subject Re: cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup Catalina.java
Date Wed, 26 Dec 2001 18:49:05 GMT
Remy Maucherat wrote:
> 
> > Remy Maucherat wrote:
> > >
> > > It does work fine for me. The change is a bad idea anyway, since the
> > > shutdown is asynchronous (it would be almost equivalent to not attemping
> to
> > > shutdown and kill the process).
> > >
> >
> > The way I am using Tomcat isn't typical, the instance that fails to
> > terminate on shutdown is being used as a stand alone soap server which
> > uses https.  The only web application is the soap server.  It doesn't work
> > in this case.  This configuration had worked fine with Tomcat 4.0.1. This
> > is the first time I tried running the soap server with 4.1-dev, I wanted
> > to test the DbcpDataSourceFactory.
> >
> > I didn't realize that the container stop was asynchronous, so you are
> > right, using System.exit() like this is not a good solution.  If you
> > look at the code you will notice that the comment says FIX ME ???. :-)
> > I put the System.exit() in as a temp fix.
> 
> I don't think it's a good idea to put something in that you know is broken.
> We might forget about it (esp since there's some vacation to help).
> 

I didn't know stop was asynchronous at the time.

> > The only cause I can come up with which would prevent the java process
> > from terminating is if there are still threads running which weren't
> > terminated by the stop. Hence the speculation that the problem has
> something
> > to do with the STM changes.
> 
> If there's no STM servlets, it shouldn't do that. Also, if you look at the
> code, I don't see why it would cause some problems.
> 
> Is it Apache SOAP ?
> I'll try to look at it if it is.
> 

I did some more testing, and Apache soap 2.2 might be causing Tomcat 4.1-dev
to exhibit this behaviour.  Again, this behaviour is not seen with Tomcat 4.0.1.
If I comment out the config for that Context, Tocmat shutsdown normally.
I grepped through the soap source and it does not implement the
SingleThreadModel.

I set debug="99" in server.xml and compared start/stop of Tomcat 4.0.1
and 4.1-dev.

The only difference I found in the logs were the additional lines below 
from the Tomcat 4.1-dev start/stop, indicated with a *:


2001-12-26 12:30:39 HostConfig[localhost]: HostConfig: Processing START
* 2001-12-26 12:30:39 HostConfig[localhost]:  Starting background thread
* 2001-12-26 12:30:39 HostConfig[localhost]: BACKGROUND THREAD Starting
2001-12-26 12:30:39 HostConfig[localhost]: Deploying discovered web applications
2001-12-26 12:30:51 HostConfig[localhost]: HostConfig: Processing STOP
* 2001-12-26 12:30:51 HostConfig[localhost]:  Stopping background thread
* 2001-12-26 12:30:51 HostConfig[localhost]: BACKGROUND THREAD Stopping
2001-12-26 12:30:51 HostConfig[localhost]: Undeploying deployed web applications

I also added some code to Catalina.java for thread debug purposed in Tomcat 4.1-dev,
here is the list of ThreadGroups after waiting 10 seconds for Tomcat to stop:

Catalina.stop active threads: 3
java.lang.ThreadGroup[name=main,maxpri=10]
    Thread[main,5,main]
    Thread[Thread-0,5,main]
    Thread[Thread-1,5,main]

Regards,

Glenn
----------------------------------------------------------------------
Glenn Nielsen             glenn@more.net | /* Spelin donut madder    |
MOREnet System Programming               |  * if iz ina coment.      |
Missouri Research and Education Network  |  */                       |
----------------------------------------------------------------------

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message