Atomikos Forum

Endless growing of contexts in SessionHandleState

Hi,

I have some code that's doing a long running/looping process,and in my logs I see Atomikos log (when on DEBUG) lots and lots of:

10-06-11 15:04:58,312 [pool-19-thread-1] a SessionHandleState with 3059 context(s): delegeting session close to a TransactionContext
10-06-11 15:04:58,312 [pool-19-thread-1] a TransactionContext: changing state to null
10-06-11 15:04:58,312 [pool-19-thread-1] a TransactionContext: changing to state null
10-06-11 15:04:58,312 [pool-19-thread-1] a SessionHandleState with 3059 context(s): delegeting session close to a TransactionContext
10-06-11 15:04:58,312 [pool-19-thread-1] a TransactionContext: changing state to null
10-06-11 15:04:58,312 [pool-19-thread-1] a TransactionContext: changing to state null

When the process starts theres only like 1-2 contexts listed, over this grows and grows till it hits 3059 then follows with:


10-06-11 15:04:58,313 [pool-19-thread-1] atomikos connection proxy for Pooled connection wrapping physical connection org.postgresql.jdbc4.Jdbc4Connection@e5f8368: closed.
10-06-11 15:04:58,325 [pool-19-thread-1] getCompositeTransaction()  returning instance with id 10.0.0.165.tm0001000005
10-06-11 15:04:58,325 [pool-19-thread-1] getCompositeTransaction()  returning instance with id 10.0.0.165.tm0001000005
10-06-11 15:04:58,414 [pool-19-thread-1] getCompositeTransaction()  returning instance with id 10.0.0.165.tm0001000005
10-06-11 15:04:58,414 [pool-19-thread-1] getCompositeTransaction()  returning instance with id 10.0.0.165.tm0001000005
10-06-11 15:04:58,555 [pool-19-thread-1] Coordinator 10.0.0.165.tm0001000005 entering state: ABORTING
10-06-11 15:04:58,854 [pool-19-thread-1] Coordinator 10.0.0.165.tm0001000005 entered state: ABORTING
10-06-11 15:04:58,884 [pool-19-thread-1] (1.5) executing task: com.atomikos.icatch.imp.Propagator$PropagatorThread@3f49b9a9
10-06-11 15:04:58,884 [pool-19-thread-1] ThreadFactory: creating new thread: Atomikos:5
10-06-11 15:04:58,884 [pool-19-thread-1] (1.5) executing task: com.atomikos.icatch.imp.Propagator$PropagatorThread@75dd085d
10-06-11 15:04:58,884 [pool-19-thread-1] ThreadFactory: creating new thread: Atomikos:6
10-06-11 15:04:58,944 [Atomikos:6] XAResource.rollback ( 31302E302E302E3136352E746D30303031303030303035:31302E302E302E3136352E746D33 ) on resource smx3-1400242109 represented by XAResource instance org.postgresql.xa.PGXAConnection@15a58470
10-06-11 15:04:59,036 [pool-19-thread-1] Error in rollback: null
com.atomikos.icatch.SysException: Error in rollback: null
    at com.atomikos.icatch.imp.CoordinatorStateHandler.rollback(CoordinatorStateHandler.java:870)
    at com.atomikos.icatch.imp.ActiveStateHandler.rollback(ActiveStateHandler.java:344)
    at com.atomikos.icatch.imp.CoordinatorImp.rollback(CoordinatorImp.java:861)
    at com.atomikos.icatch.imp.TransactionStateHandler.rollback(TransactionStateHandler.java:171)
    at com.atomikos.icatch.imp.TransactionStateHandler.rollbackWithStateCheck(TransactionStateHandler.java:191)
    at com.atomikos.icatch.imp.CompositeTransactionImp.doRollback(CompositeTransactionImp.java:463)
    at com.atomikos.icatch.imp.CompositeTerminatorImp.rollback(CompositeTerminatorImp.java:183)
    at com.atomikos.icatch.jta.TransactionImp.rollback(TransactionImp.java:325)
    at smx3.entity.utils.TransactionRunnable.run(TransactionRunnable.java:64)
    at smx3.entity.utils.TransactionRunnable.runInTransaction(TransactionRunnable.java:24)
    at smx3.monitoring.ProcessMailRelayHost.run(ProcessMailRelayHost.java:35)
    at smx3.monitoring.ConnectedRunnable.run(ConnectedRunnable.java:25)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:637)


and my application dies.

What sort of code I should be looking for which is triggering the endless increase in contexts?

The code in question loads up about 10,000 tasks 10 thread java.util.concurrent.Executor, each task begins/commits a transaction via JTA.

Anyone seen this?  Have any suggested pointers?

Mark
Mark Derricutt Send private email
Friday, June 11, 2010
 
 

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

Other recent topics Other recent topics