Bug 58373 - Data race on field org.apache.catalina.core.StandardContext.applicationEventListenersObjects
Summary: Data race on field org.apache.catalina.core.StandardContext.applicationEventL...
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 8
Classification: Unclassified
Component: Catalina (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 01:30 UTC by Yilong Li
Modified: 2015-09-14 18:32 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 01:30:39 UTC
Reported by RV-Predict (a dynamic race detector) when running the test suite:
Data race on field org.apache.catalina.core.StandardContext.applicationEventListenersObjects: {{{
    Concurrent read in thread T204 (locks held: {Monitor@424a8381})
 ---->  at org.apache.catalina.core.StandardContext.getApplicationEventListeners(StandardContext.java:1155)
        at org.apache.catalina.core.StandardContext.fireRequestDestroyEvent(StandardContext.java:5920)
        at org.apache.catalina.connector.CoyoteAdapter.asyncDispatch(CoyoteAdapter.java:282)
        at org.apache.coyote.http11.AbstractHttp11Processor.asyncDispatch(AbstractHttp11Processor.java:1709)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:651)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:277)
        - locked Monitor@424a8381 at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:259) 
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    T204 is created by T202
        at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:1010)

    Concurrent write in thread T200 (locks held: {Monitor@42766493})
 ---->  at org.apache.catalina.core.StandardContext.setApplicationEventListeners(StandardContext.java:1161)
        at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4825)
        at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5390)
        at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
        - locked Monitor@42766493 at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:n/a) 
        at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1424)
    T200 is created by T199
        at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:1010)
}}}
Comment 1 Mark Thomas 2015-09-14 18:32:51 UTC
Fixed in trunk and 8.0.x for 8.0.27 onwards.