Bug 58399 - Data race on field org.apache.tomcat.util.buf.ByteChunk.charset
Summary: Data race on field org.apache.tomcat.util.buf.ByteChunk.charset
Status: RESOLVED DUPLICATE of bug 58371
Alias: None
Product: Tomcat 8
Classification: Unclassified
Component: Util (show other bugs)
Version: 8.0.x-trunk
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ----
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-12 17:25 UTC by Yilong Li
Modified: 2015-09-18 08:58 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 17:25:47 UTC
Reported by RV-Predict (a dynamic race detector) when running the test suite:
Data race on field org.apache.tomcat.util.buf.ByteChunk.charset: {{{
    Concurrent read in thread T20 (locks held: {Monitor@45a7152e})
 ---->  at org.apache.tomcat.util.buf.ByteChunk.toStringInternal(ByteChunk.java:496)
        at org.apache.tomcat.util.buf.StringCache.toString(StringCache.java:219)
        at org.apache.tomcat.util.buf.ByteChunk.toString(ByteChunk.java:492)
        at org.apache.tomcat.util.buf.MessageBytes.toString(MessageBytes.java:166)
        at org.apache.catalina.connector.Request.getRequestURI(Request.java:2178)
        at org.apache.catalina.core.AsyncContextImpl.dispatch(AsyncContextImpl.java:202)
        - locked Monitor@45a7152e at org.apache.catalina.core.AsyncContextImpl.dispatch(AsyncContextImpl.java:192)
        at org.apache.catalina.core.AsyncContextImpl.dispatch(AsyncContextImpl.java:187)
        at org.apache.catalina.core.TestAsyncContextImpl$DispatchingServlet$1.run(TestAsyncContextImpl.java:710)
    T20 is created by T19
        at org.apache.catalina.core.TestAsyncContextImpl$DispatchingServlet.doGet(TestAsyncContextImpl.java:715)

    Concurrent write in thread T19 (locks held: {Monitor@75c39be9})
 ---->  at org.apache.tomcat.util.buf.ByteChunk.toStringInternal(ByteChunk.java:497)
        at org.apache.tomcat.util.buf.StringCache.toString(StringCache.java:219)
        at org.apache.tomcat.util.buf.ByteChunk.toString(ByteChunk.java:492)
        at org.apache.tomcat.util.buf.MessageBytes.toString(MessageBytes.java:166)
        at org.apache.coyote.RequestInfo.updateCounters(RequestInfo.java:167)
        at org.apache.coyote.Request.updateCounters(Request.java:566)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1153)
        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@75c39be9 at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.run(Nio2Endpoint.java:1032)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    T19 is created by T18
        at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:1010)
}}} 

Data race on field org.apache.tomcat.util.buf.ByteChunk.charset: {{{
    Concurrent write in thread T19 (locks held: {Monitor@75c39be9})
 ---->  at org.apache.tomcat.util.buf.ByteChunk.toStringInternal(ByteChunk.java:497)
        at org.apache.tomcat.util.buf.StringCache.toString(StringCache.java:219)
        at org.apache.tomcat.util.buf.ByteChunk.toString(ByteChunk.java:492)
        at org.apache.tomcat.util.buf.MessageBytes.toString(MessageBytes.java:166)
        at org.apache.coyote.RequestInfo.updateCounters(RequestInfo.java:167)
        at org.apache.coyote.Request.updateCounters(Request.java:566)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1153)
        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@75c39be9 at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.run(Nio2Endpoint.java:1032)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    T19 is created by T18
        at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:1010)

    Concurrent read in thread T20 (locks held: {Monitor@45a7152e})
 ---->  at org.apache.tomcat.util.buf.ByteChunk.toStringInternal(ByteChunk.java:502)
        at org.apache.tomcat.util.buf.StringCache.toString(StringCache.java:219)
        at org.apache.tomcat.util.buf.ByteChunk.toString(ByteChunk.java:492)
        at org.apache.tomcat.util.buf.MessageBytes.toString(MessageBytes.java:166)
        at org.apache.catalina.connector.Request.getRequestURI(Request.java:2178)
        at org.apache.catalina.core.AsyncContextImpl.dispatch(AsyncContextImpl.java:202)
        - locked Monitor@45a7152e at org.apache.catalina.core.AsyncContextImpl.dispatch(AsyncContextImpl.java:192)
        at org.apache.catalina.core.AsyncContextImpl.dispatch(AsyncContextImpl.java:187)
        at org.apache.catalina.core.TestAsyncContextImpl$DispatchingServlet$1.run(TestAsyncContextImpl.java:710)
    T20 is created by T19
        at org.apache.catalina.core.TestAsyncContextImpl$DispatchingServlet.doGet(TestAsyncContextImpl.java:715)
}}}
Comment 1 Mark Thomas 2015-09-18 08:58:57 UTC

*** This bug has been marked as a duplicate of bug 58371 ***