[ https://issues.apache.org/jira/browse/GEODE-5400?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Shu reassigned GEODE-5400: ------------------------------- Assignee: Eric Shu > JTA transaction locks are not released if the jta originator is crashed after > beforeCompletion is executed > ---------------------------------------------------------------------------------------------------------- > > Key: GEODE-5400 > URL: https://issues.apache.org/jira/browse/GEODE-5400 > Project: Geode > Issue Type: Bug > Components: transactions > Reporter: Eric Shu > Assignee: Eric Shu > Priority: Major > > Currently when the JTA originator is departed, a membership listener will be > invoked to clean the transactions initiated by the departed member. However, > if the member is departed after JTA beforeCompletion is run, the locks are > not released. > Here is a distributed test failure showing new transaction could not finish > even though the JTA transaction was closed/removed after the memberDeparted > invocation. > {noformat} > rg.apache.geode.test.dunit.RMIException: While invoking > org.apache.geode.internal.cache.tx.ClientServerJTAFailoverDistributedTest$$Lambda$26/573958827.run > in VM 0 running on Host 10.118.20.64 with 4 VMs > at org.apache.geode.test.dunit.VM.invoke(VM.java:436) > at org.apache.geode.test.dunit.VM.invoke(VM.java:405) > at org.apache.geode.test.dunit.VM.invoke(VM.java:348) > at > org.apache.geode.internal.cache.tx.ClientServerJTAFailoverDistributedTest.locksHeldInBeforeCompletionCanBeReleaseIfOriginatorDeparted(ClientServerJTAFailoverDistributedTest.java:284) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) > at > org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) > at > org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) > at > org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) > at > org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) > at > org.apache.geode.test.dunit.rules.AbstractDistributedTestRule$1.evaluate(AbstractDistributedTestRule.java:60) > at > org.apache.geode.test.dunit.rules.AbstractDistributedTestRule$1.evaluate(AbstractDistributedTestRule.java:60) > at > org.apache.geode.test.dunit.rules.AbstractDistributedTestRule$1.evaluate(AbstractDistributedTestRule.java:60) > at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55) > at org.junit.rules.RunRules.evaluate(RunRules.java:20) > at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) > at > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) > at > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) > at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) > at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) > at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) > at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) > at org.junit.runners.ParentRunner.run(ParentRunner.java:363) > at org.junit.runner.JUnitCore.run(JUnitCore.java:137) > at > com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68) > at > com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47) > at > com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242) > at > com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70) > Caused by: org.apache.geode.cache.CommitConflictException: The key 1 in > region > /__PR/_B__ClientServerJTAFailoverDistributedTest__locksHeldInBeforeCompletionCanBeReleaseIfOriginatorDeparted__region_0 > was being modified by another transaction locally. > at > org.apache.geode.internal.cache.TXReservationMgr.checkSetForConflict(TXReservationMgr.java:107) > at > org.apache.geode.internal.cache.TXReservationMgr.checkForConflict(TXReservationMgr.java:77) > at > org.apache.geode.internal.cache.TXReservationMgr.makeReservation(TXReservationMgr.java:56) > at > org.apache.geode.internal.cache.TXLockRequest.txLocalLock(TXLockRequest.java:151) > at > org.apache.geode.internal.cache.TXLockRequest.obtain(TXLockRequest.java:84) > at > org.apache.geode.internal.cache.TXState.reserveAndCheck(TXState.java:342) > at org.apache.geode.internal.cache.TXState.commit(TXState.java:413) > at > org.apache.geode.internal.cache.TXStateProxyImpl.commit(TXStateProxyImpl.java:226) > at > org.apache.geode.internal.cache.TXManagerImpl.commit(TXManagerImpl.java:413) > at > org.apache.geode.internal.cache.tx.ClientServerJTAFailoverDistributedTest.doPutTransaction(ClientServerJTAFailoverDistributedTest.java:271) > at > org.apache.geode.internal.cache.tx.ClientServerJTAFailoverDistributedTest.lambda$locksHeldInBeforeCompletionCanBeReleaseIfOriginatorDeparted$bb17a952$4(ClientServerJTAFailoverDistributedTest.java:284) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at hydra.MethExecutor.executeObject(MethExecutor.java:244) > at > org.apache.geode.test.dunit.standalone.RemoteDUnitVM.executeMethodOnObject(RemoteDUnitVM.java:70) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357) > at sun.rmi.transport.Transport$1.run(Transport.java:200) > at sun.rmi.transport.Transport$1.run(Transport.java:197) > at java.security.AccessController.doPrivileged(Native Method) > at sun.rmi.transport.Transport.serviceCall(Transport.java:196) > at > sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568) > at > sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826) > at > sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683) > at java.security.AccessController.doPrivileged(Native Method) > at > sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) > at java.lang.Thread.run(Thread.java:748) > Process finished with exit code 255 > {noformat} -- This message was sent by Atlassian JIRA (v7.6.3#76005)