Bug 58379 - Data race on field org.apache.coyote.AbstractProcessor.socketWrapper
Data race on field org.apache.coyote.AbstractProcessor.socketWrapper
Status: RESOLVED FIXED
Product: Tomcat 8
Classification: Unclassified
Component: Catalina
8.0.x-trunk
PC Linux
: P2 normal (vote)
: ----
Assigned To: Tomcat Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2015-09-12 07:54 UTC by Yilong Li
Modified: 2015-09-15 10:40 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yilong Li 2015-09-12 07:54:32 UTC
Reported by RV-Predict (a dynamic race detector) when running the test suite:
Data race on field org.apache.coyote.AbstractProcessor.socketWrapper: {{{
    Concurrent write in thread T28 (locks held: {Monitor@7c86e429})
 ---->  at org.apache.coyote.AbstractProcessor.setSocketWrapper(AbstractProcessor.java:145)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:978)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:673)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:279)
        - locked Monitor@7c86e429 at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:259) 
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    T28 is created by T27
        at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:1010)

    Concurrent read in thread T27 (locks held: {})
 ---->  at org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:907)
        at org.apache.coyote.Request.action(Request.java:378)
        at org.apache.catalina.core.AsyncContextImpl$RunnableWrapper.run(AsyncContextImpl.java:570)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    T27 is created by T26
        at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:1010)
}}}

Data race on field org.apache.coyote.AbstractProcessor.socketWrapper: {{{
    Concurrent read in thread T27 (locks held: {})
 ---->  at org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:907)
        at org.apache.coyote.Request.action(Request.java:378)
        at org.apache.catalina.core.AsyncContextImpl$RunnableWrapper.run(AsyncContextImpl.java:570)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    T27 is created by T26
        at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:1010)

    Concurrent write in thread T28 (locks held: {Monitor@7c86e429})
 ---->  at org.apache.coyote.http11.Http11Processor.recycleInternal(Http11Processor.java:214)
        at org.apache.coyote.http11.AbstractHttp11Processor.recycle(AbstractHttp11Processor.java:1838)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.release(Http11Protocol.java:143)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:750)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:279)
        - locked Monitor@7c86e429 at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:259) 
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    T28 is created by T27
        at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:1010)
}}}
Comment 1 Mark Thomas 2015-09-15 10:40:58 UTC
Fixed in trunk and 8.0.x for 8.0.27 onwards.