Atomikos Forum

All feedback will be investigated, but priority support, confidential support, and product priority updates are reserved for customers. Interested in becoming a customer? Subscribe here...

Only registered users can post (registration is free). Problems registering? Send an email to support@atomikos.com to get help.


Concurrency bug in (SessionHandleState.java:301) 3.8.0

Received the below exception in production.
Looking at the source code 'currentContext' isn't accessed within a synchronised block in some methods and so the pattern

if ( currentContext != null && tx != null ) ret = currentContext....

can still produce a NullPointer...

What would be the side affect of this? Would my DMLC recover gracefully. We don't see any proceeding logs after this so we were worried the process may have hung.

Here is my stacktrace:

java.lang.NullPointerException       
at com.atomikos.datasource.xa.session.SessionHandleState.isInactiveInTransaction(SessionHandleState.java:301)[transactions-jta-3.8.0.jar:]       
at com.atomikos.jms.AtomikosJmsXaSessionProxy.isInactiveTransaction(AtomikosJmsXaSessionProxy.java:249)[transactions-jms-3.8.0.jar:]       
at com.atomikos.jms.AtomikosJmsConnectionProxy.isInactiveInTransaction(AtomikosJmsConnectionProxy.java:378)[transactions-jms-3.8.0.jar:]       
at com.atomikos.jms.AtomikosPooledJmsConnection.canBeRecycledForCallingThread(AtomikosPooledJmsConnection.java:162)[transactions-jms-3.8.0.jar:]       
at com.atomikos.datasource.pool.ConnectionPool.recycleConnectionIfPossible(ConnectionPool.java:106)[transactions-jta-3.8.0.jar:]       
at com.atomikos.datasource.pool.ConnectionPool.borrowConnection(ConnectionPool.java:136)[transactions-jta-3.8.0.jar:]       
at com.atomikos.jms.AtomikosConnectionFactoryBean.createConnection(AtomikosConnectionFactoryBean.java:591)[transactions-jms-3.8.0.jar:]       
at org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:184)[org.springframework.jms-3.1.2.RELEASE.jar:3.1.2.RELEASE]       
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.access$0(AbstractPollingMessageListenerContainer.java:1)[org.springframework.jms-3.1.2.RELEASE.jar:3.1.2.RELEASE]       
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer$MessageListenerContainerResourceFactory.createConnection(AbstractPollingMessageListenerContainer.java:527)[org.springframework.jms-3.1.2.RELEASE.jar:3.1.2.RELEASE]       
at org.springframework.jms.connection.ConnectionFactoryUtils.doGetTransactionalSession(ConnectionFactoryUtils.java:297)[org.springframework.jms-3.1.2.RELEASE.jar:3.1.2.RELEASE]       
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:289)[org.springframework.jms-3.1.2.RELEASE.jar:3.1.2.RELEASE]       
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:244)[org.springframework.jms-3.1.2.RELEASE.jar:3.1.2.RELEASE]       
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1071)[org.springframework.jms-3.1.2.RELEASE.jar:3.1.2.RELEASE]       
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1063)[org.springframework.jms-3.1.2.RELEASE.jar:3.1.2.RELEASE]       
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:960)[org.springframework.jms-3.1.2.RELEASE.jar:3.1.2.RELEASE]       
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_19]       
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_19]       
at java.lang.Thread.run(Thread.java:619)[:1.6.0_19]
Daniel Oxlade Send private email
Friday, July 05, 2013
 
 
Thanks,

This looks like a bug indeed; we've had prior reports of it. I can prioritize this if you have access to a budget for support.

Concerning the side effect: Spring's DMLC by default stops processing when there is an exception in the MessageListener (AFAIK).

HTH
Guy Pardon Send private email
Thursday, July 11, 2013
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz