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 2013/02/13 00:40:34 UTC

[Bug 54555] New: Protect possible concurrent accesses to field "org.apache.tomcat.util.net.AbstractEndpoint.executor"

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

            Bug ID: 54555
           Summary: Protect possible concurrent accesses to field
                    "org.apache.tomcat.util.net.AbstractEndpoint.executor"
           Product: Tomcat 8
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: reprogrammer@gmail.com
    Classification: Unclassified

1. Method "org.apache.tomcat.util.net.AbstractEndpoint.startAcceptorThreads()"
may spawn threads of type "org.apache.tomcat.util.net.AprEndpoint.Acceptor".
2. Method "org.apache.tomcat.util.net.AprEndpoint.Acceptor.run()" may invoke
method "org.apache.tomcat.util.net.AprEndpoint.processSocketWithOptions(long)".
3. Method
"org.apache.tomcat.util.net.AprEndpoint.processSocketWithOptions(long)" may
invoke method "org.apache.tomcat.util.net.AbstractEndpoint.getExecutor()".
4. Method "org.apache.tomcat.util.net.AbstractEndpoint.getExecutor()" reads the
value stored in field "org.apache.tomcat.util.net.AbstractEndpoint.executor".

The chain of method calls 1 -> 2 -> 3 -> 4 may access a shared field "executor"
without any synchronization.

Please consider making the field "executor" volatile or synchronizing
concurrent accesses to this field.

Field "executor" is declared inside
<https://svn.apache.org/repos/asf/!svn/bc/1445426/tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java>.

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


[Bug 54555] Protect possible concurrent accesses to field "org.apache.tomcat.util.net.AbstractEndpoint.executor"

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

Mohsen Vakilian <re...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |reprogrammer@gmail.com

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


[Bug 54555] Protect possible concurrent accesses to field "org.apache.tomcat.util.net.AbstractEndpoint.executor"

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

Konstantin Kolinko <kn...@gmail.com> changed:

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

--- Comment #2 from Konstantin Kolinko <kn...@gmail.com> ---
(In reply to comment #1)
> Given when the executor is set and when the acceptor thread starts there is
> no issue here.

Agreed.
More specifically, ch.17.4.4 of Java Language Specification 3.0.

Closing as INVALID.

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


[Bug 54555] Protect possible concurrent accesses to field "org.apache.tomcat.util.net.AbstractEndpoint.executor"

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

--- Comment #1 from Mark Thomas <ma...@apache.org> ---
This looks very much like a copy and paste of some output from a code analysis
tool without any validation applied to the results.

Given when the executor is set and when the acceptor thread starts there is no
issue here.

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


[Bug 54555] Protect possible concurrent accesses to field "org.apache.tomcat.util.net.AbstractEndpoint.executor"

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

--- Comment #3 from Mohsen Vakilian <re...@gmail.com> ---
(In reply to comment #1)
> This looks very much like a copy and paste of some output from a code
> analysis tool without any validation applied to the results.
> 
This is indeed based on the findings of a code analysis tools. I assure you
that I examined the code carefully to verify this potential problem. Since I'm
not a developer of Tomcat, I couldn't convince myself that the executor cannot
be read and written concurrently. Thanks for verifying this problem and sorry
for the false alarm.

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