https://issues.apache.org/bugzilla/show_bug.cgi?id=52356

             Bug #: 52356
           Summary: Prevent potential data races on
                    "org.apache.catalina.tribes.transport.bio.util.FastQue
                    ue.size".
           Product: Tomcat 7
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: reprogram...@gmail.com
    Classification: Unclassified


Even though accesses to
"org.apache.catalina.tribes.transport.bio.util.FastQueue.size" are synchronized
inside
"org.apache.catalina.tribes.transport.bio.util.FastQueue.add(ChannelMessage,
Member[], InterceptorPayload)" and
"org.apache.catalina.tribes.transport.bio.util.FastQueue.remove()", the read
access in "org.apache.catalina.tribes.transport.bio.util.FastQueue.getSize()"
is not properly synchronized and thus can lead to a race condition. However,
"org.apache.catalina.tribes.transport.bio.util.FastQueue.getSize()" is not
used, so this bug never manifests. Nevertheless, we suggest that Tomcat
developers either remove
"org.apache.catalina.tribes.transport.bio.util.FastQueue.getSize()" or make it
access the shared field safely.

Field "org.apache.catalina.tribes.transport.bio.util.FastQueue.size" is
declared at
<http://svn.apache.org/repos/asf/!svn/bc/1220560/tomcat/trunk/java/org/apache/catalina/tribes/transport/bio/util/FastQueue.java>.

-- 
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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to