[hibernate-dev] Still an issue with Agroal when closing the pool

Guillaume Smet guillaume.smet at gmail.com
Sat Jan 5 16:40:37 EST 2019


Hi Luis,

We talked at some point about a potential issue in Agroal, you said 1.3
should have all the known issues solved but apparently, there is still one
as we have transient test failures on ORM from time to time.

A good example is the following one:
http://ci.hibernate.org/view/ORM/job/hibernate-orm-master-h2-javassist/lastCompletedBuild/testReport/org.hibernate.test.agroal/AgroalTransactionIsolationConfigTest/testSettingIsolationAsName/
(it's build #265, haven't found a way to get a stable URL from Jenkins)

The issue is in this test:
org.hibernate.test.agroal.AgroalTransactionIsolationConfigTest.testSettingIsolationAsName
.

And we have the following stacktrace when closing the pool:

java.util.concurrent.RejectedExecutionException: Task
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask at 189a0b8e
rejected from io.agroal.pool.util.PriorityScheduledExecutor at 2ded5d2e[Shutting
down, pool size = 1, active threads = 0, queued tasks = 1, completed
tasks = 2]
	at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2063)
	at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:830)
	at java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:326)
	at java.util.concurrent.ScheduledThreadPoolExecutor.schedule(ScheduledThreadPoolExecutor.java:533)
	at java.util.concurrent.ScheduledThreadPoolExecutor.execute(ScheduledThreadPoolExecutor.java:622)
	at io.agroal.pool.util.PriorityScheduledExecutor.executeNow(PriorityScheduledExecutor.java:46)
	at io.agroal.pool.util.PriorityScheduledExecutor.executeNow(PriorityScheduledExecutor.java:35)
	at io.agroal.pool.util.PriorityScheduledExecutor.shutdown(PriorityScheduledExecutor.java:67)
	at io.agroal.pool.ConnectionPool.close(ConnectionPool.java:126)
	at io.agroal.pool.DataSource.close(DataSource.java:54)
	at org.hibernate.agroal.internal.AgroalConnectionProvider.stop(AgroalConnectionProvider.java:142)
	at org.hibernate.testing.common.connections.BaseTransactionIsolationConfigTest.testSettingIsolationAsName(BaseTransactionIsolationConfigTest.java:101)


It happens once in a while. I already had the issue locally but lately I
only observed it on CI.

I suppose it won't be easy to get to the bottom of it but it would be nice
if we could get this fixed.

Thanks.

-- 
Guillaume


More information about the hibernate-dev mailing list