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 47024] New: org.apache.catalina.core.ContainerBase is not thread-safe
Date Tue, 14 Apr 2009 09:21:30 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=47024

           Summary: org.apache.catalina.core.ContainerBase is not
                    thread-safe
           Product: Tomcat 6
           Version: unspecified
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: sebb@apache.org


The variable threadDone is accessed from at least two threads, but is not
volatile and access is not synchronised.

There is no guarantee that the ContainerBackgroundProcessor thread will ever
see threadDone == true.

Making the variable volatile would fix this.

At least two other variables are also accessed from the main and background
threads and need protecting:

- started
- startChildren

==

org.apache.catalina.core.ContainerBase.fireContainerEvent accesses
listeners.size() outside the synchronized (listeners) section. This is a bit
dubious.

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

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


Mime
View raw message