Exception bt
2017-09-06 14:13:27,281 ERROR [javax.slee.RAEntityNotification[entity=DiameterRo].DiameterRoResourceAdaptor] [ApplicationSession-1] [TracerImpl::severe::412] Error firing event.
java.lang.IllegalStateException: No activity for handle: Diameter Session ID[localhost;350;1460764936]
at org.mobicents.slee.resource.diameter.ro.DiameterRoResourceAdaptor.fireEvent(DiameterRoResourceAdaptor.java:608)
at org.mobicents.slee.resource.diameter.ro.DiameterRoResourceAdaptor.fireEvent(DiameterRoResourceAdaptor.java:635)
at org.mobicents.slee.resource.diameter.ro.handlers.RoSessionFactory.doCreditControlAnswer(RoSessionFactory.java:64)
at org.jdiameter.client.impl.app.ro.ClientRoSessionImpl.deliverRoAnswer(ClientRoSessionImpl.java:1158)
at org.jdiameter.client.impl.app.ro.ClientRoSessionImpl.handleEventForSessionBased(ClientRoSessionImpl.java:344)
at org.jdiameter.client.impl.app.ro.ClientRoSessionImpl.handleEvent(ClientRoSessionImpl.java:196)
at org.jdiameter.client.impl.app.ro.ClientRoSessionImpl$AnswerDelivery.run(ClientRoSessionImpl.java:1340)
at org.jdiameter.common.impl.concurrent.DefaultRunnable.run(DefaultRunnable.java:47)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
How to reproduce issue.
// -------------------------------------------------------------------------------------
Step by step operations (relevant) flow
- SBB: Create client activity [RoClientSessionActivity session = roProvider.createRoClientSessionActivity();]
- SBB: Create aci
- SBB: attach sbbLocalObject to aci
- Create CCR-I object [ RoCreditControlRequest creditControlRequest = session.createRoCreditControlRequest(ccRequestType);]
- Send CCR-I to OCS: [session.sendInitialRoCreditControlRequest(creditControlRequestHw);]
- Some loging and data persisting operations (make this step time consuming to reproduce issue)
- OCS responds before step 6) ends.
- RA receives CCA and attempts to fire it
8.1) activieties.getActivity(ActivityHandle) fails, stacktrace in attached log
- SBB finishes operations, SLEE Transaction commits
// -------------------------------------------------------------------------------------
Analisys:
The creation of ACH in jboss cache with suspending and resumming the transaction. But the creation of Activity is put in transaction (without suspend and resume). The result is ACH is in cache immediately while Activity wait until the transaction is committed. If the CCR response come back quickly, Then we have another thread will trying to fetch the information of ACH and activity in jboss cache. At this time we have no Activity because the transaction is not comited in thread 1.
Exception bt
2017-09-06 14:13:27,281 ERROR [javax.slee.RAEntityNotification[entity=DiameterRo].DiameterRoResourceAdaptor] [ApplicationSession-1] [TracerImpl::severe::412] Error firing event.
java.lang.IllegalStateException: No activity for handle: Diameter Session ID[localhost;350;1460764936]
at org.mobicents.slee.resource.diameter.ro.DiameterRoResourceAdaptor.fireEvent(DiameterRoResourceAdaptor.java:608)
at org.mobicents.slee.resource.diameter.ro.DiameterRoResourceAdaptor.fireEvent(DiameterRoResourceAdaptor.java:635)
at org.mobicents.slee.resource.diameter.ro.handlers.RoSessionFactory.doCreditControlAnswer(RoSessionFactory.java:64)
at org.jdiameter.client.impl.app.ro.ClientRoSessionImpl.deliverRoAnswer(ClientRoSessionImpl.java:1158)
at org.jdiameter.client.impl.app.ro.ClientRoSessionImpl.handleEventForSessionBased(ClientRoSessionImpl.java:344)
at org.jdiameter.client.impl.app.ro.ClientRoSessionImpl.handleEvent(ClientRoSessionImpl.java:196)
at org.jdiameter.client.impl.app.ro.ClientRoSessionImpl$AnswerDelivery.run(ClientRoSessionImpl.java:1340)
at org.jdiameter.common.impl.concurrent.DefaultRunnable.run(DefaultRunnable.java:47)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
How to reproduce issue.
// -------------------------------------------------------------------------------------
Step by step operations (relevant) flow
8.1) activieties.getActivity(ActivityHandle) fails, stacktrace in attached log
// -------------------------------------------------------------------------------------
Analisys:
The creation of ACH in jboss cache with suspending and resumming the transaction. But the creation of Activity is put in transaction (without suspend and resume). The result is ACH is in cache immediately while Activity wait until the transaction is committed. If the CCR response come back quickly, Then we have another thread will trying to fetch the information of ACH and activity in jboss cache. At this time we have no Activity because the transaction is not comited in thread 1.