The main ASF Bugzilla instance will be unavailable for 4 hours starting 19.00 UTC 2016-10-29 for an upgrade to 5.0.3
Bug 58373 - Data race on field org.apache.catalina.core.StandardContext.applicationEventListenersObjects
Data race on field org.apache.catalina.core.StandardContext.applicationEventL...
Product: Tomcat 8
Classification: Unclassified
Component: Catalina
PC Linux
: P2 normal (vote)
: ----
Assigned To: Tomcat Developers Mailing List
Depends on:
  Show dependency tree
Reported: 2015-09-12 01:30 UTC by Yilong Li
Modified: 2015-09-14 18:32 UTC (History)
0 users


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(
        at org.apache.catalina.core.StandardContext.fireRequestDestroyEvent(
        at org.apache.catalina.connector.CoyoteAdapter.asyncDispatch(
        at org.apache.coyote.http11.AbstractHttp11Processor.asyncDispatch(
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
        - locked Monitor@424a8381 at$ 
        at org.apache.tomcat.util.threads.TaskThread$
    T204 is created by T202
        at java.util.concurrent.ThreadPoolExecutor.addWorker(

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