tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 58313] New: Data race inside the non-thread-safe HashMap org.apache.catalina.connector.OutputBuffer.encoders
Date Tue, 01 Sep 2015 13:34:55 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=58313

            Bug ID: 58313
           Summary: Data race inside the non-thread-safe HashMap
                    org.apache.catalina.connector.OutputBuffer.encoders
           Product: Tomcat 8
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: yilong.li@runtimeverification.com

I am running the test suite against a dynamic race detector called RV-Predict.
I get a few race reports on the HashMap
org.apache.catalina.connector.OutputBuffer.encoders:

Data race on field java.util.HashMap.$state: {{{
Concurrent write in thread T83 (locks held: {Monitor@67298f15})
 ---->  at
org.apache.catalina.connector.OutputBuffer.clearEncoders(OutputBuffer.java:255)
        at
org.apache.catalina.connector.Response.clearEncoders(Response.java:295)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:587)
        at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
        at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668)
        at
org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1073)
        at
org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.run(Nio2Endpoint.java:1032)
        - locked Monitor@67298f15 at
org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.run(Nio2Endpoint.java:1031)
        at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    T83 is created by T82
        at
java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:1010)

Concurrent read in thread T84 (locks held: {})
 ---->  at
org.apache.catalina.connector.OutputBuffer.setConverter(OutputBuffer.java:580)
        at
org.apache.catalina.connector.OutputBuffer.checkConverter(OutputBuffer.java:563)
        at org.apache.catalina.connector.Response.getWriter(Response.java:599)
        at
org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:212)
        at
org.apache.coyote.http11.TestAbstractHttp11Processor$Bug57621Servlet$1.run(TestAbstractHttp11Processor.java:757)
        at
org.apache.catalina.core.AsyncContextImpl$RunnableWrapper.run(AsyncContextImpl.java:549)
        at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    T84 is created by T83
        at
java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:1010)
}}} 

Data race on field java.util.HashMap.$state: {{{
Concurrent write in thread T60 (locks held: {Monitor@93a8632})
 ---->  at
org.apache.catalina.connector.OutputBuffer.clearEncoders(OutputBuffer.java:255)
        at
org.apache.catalina.connector.Response.clearEncoders(Response.java:295)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:587)
        at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
        at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668)
        at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:277)
        - locked Monitor@93a8632 at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:259)
        at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    T60 is created by T58
        at
java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:1010)

Concurrent read in thread T61 (locks held: {})
 ---->  at
org.apache.catalina.connector.OutputBuffer.setConverter(OutputBuffer.java:604)
        at
org.apache.catalina.connector.OutputBuffer.checkConverter(OutputBuffer.java:563)
        at org.apache.catalina.connector.Response.getWriter(Response.java:599)
        at
org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:212)
        at
org.apache.coyote.http11.TestAbstractHttp11Processor$Bug57621Servlet$1.run(TestAbstractHttp11Processor.java:757)
        at
org.apache.catalina.core.AsyncContextImpl$RunnableWrapper.run(AsyncContextImpl.java:549)
        at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    T61 is created by T60
        at
java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:1010)
}}} 

Looks like OutputBuffer.encoders is accessed from multiple threads without
proper synchronization.

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


Mime
View raw message