tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 34541] New: - hang on shutdown - countAllocated not synchronized
Date Wed, 20 Apr 2005 13:29:13 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=34541>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34541

           Summary: hang on shutdown - countAllocated not synchronized
           Product: Tomcat 4
           Version: 4.0.6 Final
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: major
          Priority: P1
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: jcortopassi@amberpoint.com


This may be a problem in Tomcat 5.X too. We are seeing hangs during shutdown of 
Tomcat. The localhost_log shows a last line of "2005-04-20 06:03:06 
StandardWrapper[/TomcatHang:hangServlet]: Waiting for 2 instance(s) to be 
deallocated". A thread dump shows the main thread waiting at "at 
org.apache.catalina.core.StandardWrapper.unload(StandardWrapper.java:1074)". 
There are no HTTP processor threads running - they have all shutdown. 
Inspecting the code shows unload waiting for the variable countAllocated to go 
to zero. However, the code that increments and decrements countAllocated for 
non-single-threaded servlets is not synchronized, so the value will not be 
correct in some cases. To test this I added synchronized blocks to the 
increment/decrement code and no longer get hangs.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message