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/startupCatalina.java
Date Thu, 27 Dec 2001 00:31:49 GMT
Glenn Nielsen wrote:
> 
> "Craig R. McClanahan" wrote:
> >
> > On Wed, 26 Dec 2001, Glenn Nielsen wrote:
> >
> > >
> > > 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]
> > >
> >
> > Looks like some background threads are not getting created as daemons.
> > HostConfig calls thread.setDaemon(true) after creating its background
> > thread (as well as setting the thread name), so it doesn't look like that
> > is the culprit.
> >
> 
> Right, I saw that as I was looking through the code to see where threads
> were created.
> 
> > Does Apache SOAP try to create background threads without cleaning them
> > up afterwards?  Or, maybe the XML parser it's using?
> >
> 
> Nothing has changed in the soap web application except running it
> in Tomcat 4.1-dev instead of Tocmat 4.0.1.  Under 4.1-dev the java
> process fails to terminate on a stop, under 4.0.1 the process terminated
> normally.
> 

After playing around with my server.xml config and the soap web app
web.xml I have isolated the problem down to a <listener> configured in
the web.xml.  Removing the <listener> config fixes the problem.
>From looking at the list of Threads in the main ThreadGroup, if a listener
is configured there is an additional thread created that is never destroyed 
or setDaemon().  The listener class itself does not use threads.

Getting closer.

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