[jbossts-issues] [JBoss JIRA] (JBTM-1482) If a naughty afterCompletion sync throws an exception, log the exception call stack

Tom Jenkinson (JIRA) jira-events at lists.jboss.org
Thu Sep 19 09:22:05 EDT 2013


     [ https://issues.jboss.org/browse/JBTM-1482?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tom Jenkinson resolved JBTM-1482.
---------------------------------

    Fix Version/s: 4.17.11
       Resolution: Done


Sorry, I must have resolved this a while back, I am certainly not seeing it anymore. I will mark it as Out of Date, let me know if its not fixed.

I checked it by running a version of ArjunaJTA/jta/tests/../JTATest.java to throw a runtime in afterCompletion and get this:

Sep 19, 2013 2:19:27 PM com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple afterCompletion
WARN: ARJUNA016029: SynchronizationImple.afterCompletion - failed for com.hp.mwtests.ts.jta.common.Synchronization at 483ee0b7 with exception
java.lang.RuntimeException
	at com.hp.mwtests.ts.jta.common.Synchronization.afterCompletion(Synchronization.java:72)
	at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.afterCompletion(SynchronizationImple.java:96)
	at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.afterCompletion(TwoPhaseCoordinator.java:532)
	at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:101)
	at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162)
	at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1170)
	at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126)
	at com.hp.mwtests.ts.jta.basic.JTATest.test(JTATest.java:102)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

Sep 19, 2013 2:19:33 PM com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator afterCompletion
WARN: ARJUNA012127: TwoPhaseCoordinator.afterCompletion - returned failure for SynchronizationImple< 0:ffff7f000001:d16e:523af9d9:9, com.hp.mwtests.ts.jta.common.Synchronization at 483ee0b7 >

Strangely looking at git blame I can't find anytime this would not have been the case for 16029 :(
                
> If a naughty afterCompletion sync throws an exception, log the exception call stack
> -----------------------------------------------------------------------------------
>
>                 Key: JBTM-1482
>                 URL: https://issues.jboss.org/browse/JBTM-1482
>             Project: JBoss Transaction Manager
>          Issue Type: Enhancement
>      Security Level: Public(Everyone can see) 
>          Components: Transaction Core
>            Reporter: Scott Marlow
>            Assignee: Tom Jenkinson
>            Priority: Minor
>             Fix For: 4.17.11, 5.0.0.M5
>
>   Original Estimate: 30 minutes
>  Remaining Estimate: 30 minutes
>
> Currently, when this happens with AS, I see:
> {quote}
> 2013-02-18 16:24:43,837|WARN |[com.arjuna.ats.jta]|(ThreadId: Transaction Reaper Worker 221)|ARJUNA016029: SynchronizationImple.afterCompletion - failed for org.jboss.as.jpa.transaction.TransactionUtil$SessionSynchronization at 634ef5a7 with exception: java.lang.NullPointerException
> {quote}
> From a related email conversation:
> {quote}
> Here's our Logger code:
>     @Message(id = 16029, value = "SynchronizationImple.afterCompletion - failed for {0} with exception", format = MESSAGE_FORMAT)
>     @LogMessage(level = WARN)
>     public void warn_resources_arjunacore_SynchronizationImple(String arg0, @Cause() Throwable arg1);
> Here is where we call our logger:
>     jtaLogger.i18NLogger.warn_resources_arjunacore_SynchronizationImple(_theSynch.toString(), e);
> Maybe the message should have the {1} in it, i.e. it change it like so:
> "SynchronizationImple.afterCompletion - failed for {0} with exception {1}"
> {quote}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jbossts-issues mailing list