1 Reply Latest reply on Sep 12, 2012 10:36 AM by borges

    Dead lock between stop and start

    Clebert Suconic Master

      on master...

       

       

      I believe we shouldn't synchronize (this) on start to fix this: We have two locks now startupLock and this. We should have just one.

       

       

       

       

      Java stack information for the threads listed above:

      ===================================================

      "HQ119001: Activation for server HornetQServerImpl::ReplicatedWithDelayFailoverTest/backupServer":

      at org.hornetq.core.server.impl.HornetQServerImpl.initialisePart2(HornetQServerImpl.java:1448)

      - waiting to lock <0x00000007c1906e50> (a org.hornetq.tests.util.ServiceTestBase$InVMNodeManagerServer)

      at org.hornetq.core.server.impl.HornetQServerImpl.access$1300(HornetQServerImpl.java:163)

      at org.hornetq.core.server.impl.HornetQServerImpl$SharedNothingBackupActivation.run(HornetQServerImpl.java:2310)

      - locked <0x00000007c19075f8> (a java.lang.Object)

      at java.lang.Thread.run(Thread.java:662)

      "main":

      at org.hornetq.core.server.impl.HornetQServerImpl.stop(HornetQServerImpl.java:613)

      - waiting to lock <0x00000007c19075f8> (a java.lang.Object)

      - locked <0x00000007c1906e50> (a org.hornetq.tests.util.ServiceTestBase$InVMNodeManagerServer)

      at org.hornetq.core.server.impl.HornetQServerImpl.stop(HornetQServerImpl.java:530)

      at org.hornetq.core.server.impl.HornetQServerImpl.stop(HornetQServerImpl.java:497)

      at org.hornetq.tests.util.UnitTestCase.stopComponentOutputExceptions(UnitTestCase.java:1589)

      at org.hornetq.tests.util.UnitTestCase.tearDown(UnitTestCase.java:995)

      - locked <0x0000000744a97548> (a java.util.ArrayList)

      at org.hornetq.tests.util.ServiceTestBase.tearDown(ServiceTestBase.java:83)

      at org.hornetq.tests.integration.cluster.failover.FailoverTestBase.tearDown(FailoverTestBase.java:238)

      at junit.framework.TestCase.runBare(TestCase.java:136)

      at junit.framework.TestResult$1.protect(TestResult.java:106)

      at junit.framework.TestResult.runProtected(TestResult.java:124)

      at junit.framework.TestResult.run(TestResult.java:109)

      at junit.framework.TestCase.run(TestCase.java:120)

      at junit.framework.TestSuite.runTest(TestSuite.java:230)

      at junit.framework.TestSuite.run(TestSuite.java:225)

      at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:597)

      at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:95)

      at org.apache.maven.surefire.junit.JUnit3Provider.executeTestSet(JUnit3Provider.java:121)

      at org.apache.maven.surefire.junit.JUnit3Provider.invoke(JUnit3Provider.java:98)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:597)

      at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)

      at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)

      at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)

      at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:103)

      at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)

      Found 1 deadlock.