You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2009/04/14 11:21:30 UTC

DO NOT REPLY [Bug 47024] New: org.apache.catalina.core.ContainerBase is not thread-safe

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


DO NOT REPLY [Bug 47024] org.apache.catalina.core.ContainerBase is not thread-safe

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47024


Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX




--- Comment #1 from Mark Thomas <ma...@apache.org>  2009-04-14 10:15:02 PST ---
This isn't causing any real world bugs and due to the nature of the background
thread any issue is unlikely. That said, it wouldn't hurt to spend a little
time looking at this. I have therefore added to TODO to trunk.

Given there is no immediate need for code changes in TC6, I am marking this as
WONTFIX.

-- 
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