Bug 58387 - Data race on field org.apache.coyote.Request.hook
Data race on field org.apache.coyote.Request.hook
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 16:24 UTC by Yilong Li
Modified: 2015-09-17 07:47 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 16:24:36 UTC
Reported by RV-Predict (a dynamic race detector) when running the test suite:
Data race on field org.apache.coyote.Request.hook: {{{
    Concurrent read in thread T21 (locks held: {})
 ---->  at org.apache.coyote.Request.action(Request.java:372)
        at org.apache.catalina.connector.Request.cometClose(Request.java:2583)
        at org.apache.catalina.connector.CometEventImpl.close(CometEventImpl.java:98)
        at org.apache.catalina.comet.TestCometProcessor$AsyncCometCloseThread.run(TestCometProcessor.java:665)
    T21 is created by T20
        at org.apache.catalina.comet.TestCometProcessor$AsyncCometCloseValve.invoke(TestCometProcessor.java:648)

    Concurrent write in thread T20 (locks held: {Monitor@78eabf38})
 ---->  at org.apache.coyote.Request.action(Request.java:373)
        at org.apache.catalina.connector.InputBuffer.available(InputBuffer.java:244)
        at org.apache.catalina.connector.Request.getAvailable(Request.java:2559)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:673)
        at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1074)
        at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.run(Nio2Endpoint.java:1033)
        - locked Monitor@78eabf38 at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.run(Nio2Endpoint.java:1032)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    T20 is created by T19
        at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:1010)
}}} 

Data race on field org.apache.coyote.Request.hook: {{{
    Concurrent write in thread T20 (locks held: {Monitor@78eabf38})
 ---->  at org.apache.coyote.Request.action(Request.java:373)
        at org.apache.catalina.connector.InputBuffer.available(InputBuffer.java:244)
        at org.apache.catalina.connector.Request.getAvailable(Request.java:2559)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:673)
        at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1074)
        at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.run(Nio2Endpoint.java:1033)
        - locked Monitor@78eabf38 at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.run(Nio2Endpoint.java:1032)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    T20 is created by T19
        at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:1010)

    Concurrent read in thread T21 (locks held: {})
 ---->  at org.apache.coyote.Request.action(Request.java:376)
        at org.apache.catalina.connector.Request.cometClose(Request.java:2583)
        at org.apache.catalina.connector.CometEventImpl.close(CometEventImpl.java:98)
        at org.apache.catalina.comet.TestCometProcessor$AsyncCometCloseThread.run(TestCometProcessor.java:665)
    T21 is created by T20
        at org.apache.catalina.comet.TestCometProcessor$AsyncCometCloseValve.invoke(TestCometProcessor.java:648)
}}} 

Data race on field org.apache.coyote.Request.hook: {{{
    Concurrent write in thread T20 (locks held: {Monitor@78eabf38})
 ---->  at org.apache.coyote.Request.action(Request.java:373)
        at org.apache.catalina.connector.InputBuffer.available(InputBuffer.java:244)
        at org.apache.catalina.connector.Request.getAvailable(Request.java:2559)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:673)
        at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1074)
        at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.run(Nio2Endpoint.java:1033)
        - locked Monitor@78eabf38 at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.run(Nio2Endpoint.java:1032)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    T20 is created by T19
        at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:1010)

    Concurrent read in thread T21 (locks held: {})
 ---->  at org.apache.coyote.Request.action(Request.java:380)
        at org.apache.catalina.connector.Request.cometClose(Request.java:2583)
        at org.apache.catalina.connector.CometEventImpl.close(CometEventImpl.java:98)
        at org.apache.catalina.comet.TestCometProcessor$AsyncCometCloseThread.run(TestCometProcessor.java:665)
    T21 is created by T20
        at org.apache.catalina.comet.TestCometProcessor$AsyncCometCloseValve.invoke(TestCometProcessor.java:648)
}}}
Comment 1 Mark Thomas 2015-09-17 07:47:04 UTC
Fixed in trunk and 8.0.x for 8.0.27 onwards.