Bug 58394 - Data race on field org.apache.catalina.mapper.Mapper.hosts
Data race on field org.apache.catalina.mapper.Mapper.hosts
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 17:02 UTC by Yilong Li
Modified: 2015-09-17 19:29 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:02:20 UTC
Data race on field org.apache.catalina.mapper.Mapper.hosts: {{{
    Concurrent read in thread T28 (locks held: {Monitor@7c917bae})
 ---->  at org.apache.catalina.mapper.Mapper.internalMap(Mapper.java:738)
        at org.apache.catalina.mapper.Mapper.map(Mapper.java:687)
        at org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:881)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:513)
        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@7c917bae at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.run(Nio2Endpoint.java:1032)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    T28 is created by T16
        at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:1010)

    Concurrent write in thread T38 (locks held: {Monitor@21f99bc3, Monitor@212cb93e})
 ---->  at org.apache.catalina.mapper.Mapper.removeHost(Mapper.java:150)
        - locked Monitor@212cb93e at org.apache.catalina.mapper.Mapper.removeHost(Mapper.java:n/a)
        at org.apache.catalina.mapper.MapperListener.unregisterHost(MapperListener.java:319)
        at org.apache.catalina.mapper.MapperListener.lifecycleEvent(MapperListener.java:494)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
        at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
        at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:228)
        - locked Monitor@21f99bc3 at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:n/a)
        at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1424)
    T38 is created by T1
        at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:1010)
}}}
Comment 1 Mark Thomas 2015-09-17 19:29:15 UTC
Fixed in trunk and 8.0.x for 8.0.27 onwards.