Connection Leak in Batch Framework
----------------------------------
Key: MIFOS-5098
URL: http://mifosforge.jira.com/browse/MIFOS-5098
Project: mifos
Issue Type: Bug
Reporter: Michael Vorburger
Priority: Critical
Using MIFOS-5096, I've identified what appears to be a Connection Leak in the
Batch Framework:
{noformat}2011-07-24/00:05:35.399/IST INFO,
com.mchange.v2.resourcepool.BasicResourcePool, ?, ?, ?, A checked-out resource
is overdue, and will be destroyed:
com.mchange.v2.c3p0.impl.NewPooledConnection@1c52f9e
2011-07-24/00:05:35.399/IST INFO,
com.mchange.v2.resourcepool.BasicResourcePool, ?, ?, ?, Logging the stack trace
by which the overdue resource was checked-out.
java.lang.Exception: DEBUG ONLY: Overdue resource check-out stack trace.
at
com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:506)
at
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525)
at
com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)
at
org.hibernate.connection.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:78)
at
org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)
at
org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)
at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:160)
at
org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:81)
at
org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1473)
at
org.mifos.framework.components.batchjobs.TaskHelper.checkHibernateSession(TaskHelper.java:68)
at
org.mifos.framework.components.batchjobs.TaskHelper.execute(TaskHelper.java:54)
at
org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:358)
at
org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
at
org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:261)
at
org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:76)
at
org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:367)
at
org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:214)
at
org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:143)
at
org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:247)
at
org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:196)
at
org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:135)
at
org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:61)
at
org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:60)
at
org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:144)
at
org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:124)
at
org.springframework.batch.core.job.flow.FlowJob.doExecute(FlowJob.java:135)
at
org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:281)
at
org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:120)
at
org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:48)
at
org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:114)
at
org.mifos.framework.components.batchjobs.MifosBatchJob.launchJob(MifosBatchJob.java:105)
at
org.mifos.framework.components.batchjobs.MifosBatchJob.checkAndLaunchJob(MifosBatchJob.java:136)
at
org.mifos.framework.components.batchjobs.MifosBatchJob.executeInternal(MifosBatchJob.java:86)
at
org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
at
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549){noformat}
This appears without doing anything in particular (if you have the MIFOS-5096
c3p0.properties on the CP), just start-up, and wait a bit - I got two within
5-10 minutes (presumably when Batch Jobs run?).
I am not fully qualified to decide the severity of this alone, but if every
time some batch job runs one more connection is leaked/lost, this seems quite
bad - a Critical bug? The unreturnedConnectionTimeout of MIFOS-5096 would
"work around" this and, if MIFOS-5096 is integrated, users wouldn't get hit by
it anymore - but even then it should still be fixed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Storage Efficiency Calculator
This modeling tool is based on patent-pending intellectual property that
has been used successfully in hundreds of IBM storage optimization engage-
ments, worldwide. Store less, Store more with what you own, Move data to
the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/
_______________________________________________
Mifos-issues mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mifos-issues