Bug 58393 - Data race on field org.apache.catalina.tribes.membership.McastService.listener
Data race on field org.apache.catalina.tribes.membership.McastService.listener
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 16:59 UTC by Yilong Li
Modified: 2015-09-17 10: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 16:59:11 UTC
Reported by RV-Predict (a dynamic race detector) when running the test suite:
Data race on field org.apache.catalina.tribes.membership.McastService.listener: {{{
    Concurrent read in thread T191 (locks held: {})
 ---->  at org.apache.catalina.tribes.membership.McastService.memberDisappeared(McastService.java:471)
        at org.apache.catalina.tribes.membership.McastServiceImpl$1.run(McastServiceImpl.java:383)
    T191 is created by T184
        at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:1010)

    Concurrent write in thread T1 (locks held: {Monitor@2b72a3de, Monitor@1619d915, Monitor@2b72a3c7})
 ---->  at org.apache.catalina.tribes.membership.McastService.setMembershipListener(McastService.java:441)
        at org.apache.catalina.tribes.group.ChannelCoordinator.internalStop(ChannelCoordinator.java:223)
        - locked Monitor@2b72a3c7 at org.apache.catalina.tribes.group.ChannelCoordinator.internalStop(ChannelCoordinator.java:n/a)
        at org.apache.catalina.tribes.group.ChannelCoordinator.stop(ChannelCoordinator.java:121)
        at org.apache.catalina.tribes.group.ChannelInterceptorBase.stop(ChannelInterceptorBase.java:171)
        at org.apache.catalina.tribes.group.ChannelInterceptorBase.stop(ChannelInterceptorBase.java:171)
        at org.apache.catalina.tribes.group.ChannelInterceptorBase.stop(ChannelInterceptorBase.java:171)
        at org.apache.catalina.tribes.group.interceptors.NonBlockingCoordinator.stop(NonBlockingCoordinator.java:467)
        - locked Monitor@1619d915 at org.apache.catalina.tribes.group.interceptors.NonBlockingCoordinator.stop(NonBlockingCoordinator.java:463)
        at org.apache.catalina.tribes.group.ChannelInterceptorBase.stop(ChannelInterceptorBase.java:171)
        at org.apache.catalina.tribes.group.GroupChannel.stop(GroupChannel.java:444)
        - locked Monitor@2b72a3de at org.apache.catalina.tribes.group.GroupChannel.stop(GroupChannel.java:n/a)
        at org.apache.catalina.tribes.group.interceptors.TestNonBlockingCoordinator.tearDown(TestNonBlockingCoordinator.java:127)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
        at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:38)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:535)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1182)
        at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:1033)
    T1 is the main thread
}}}
Comment 1 Mark Thomas 2015-09-17 10:29:41 UTC
Fixed in trunk and 8.0.x for 8.0.27 onwards.