-
Bug
-
Resolution: Done
-
Critical
-
5.3.0.Final
c3p0 uses a static HashMap without synchronization, which means it can hang: https://sourceforge.net/p/c3p0/bugs/119/
"testng-JdbcMixedCacheStoreVamTest" prio=10 tid=0x00007fe8d817a800 nid=0x58ed runnable [0x00007fe8ba06a000] java.lang.Thread.State: RUNNABLE at java.util.WeakHashMap.get(WeakHashMap.java:355) at com.mchange.v2.encounter.AbstractEncounterCounter.encounter(AbstractEncounterCounter.java:41) at com.mchange.v2.c3p0.impl.C3P0ImplUtils.allocateIdentityToken(C3P0ImplUtils.java:192) at com.mchange.v2.c3p0.impl.PoolBackedDataSourceBase.<init>(PoolBackedDataSourceBase.java:227) at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.<init>(AbstractPoolBackedDataSource.java:62) at com.mchange.v2.c3p0.ComboPooledDataSource.<init>(ComboPooledDataSource.java:109) at com.mchange.v2.c3p0.ComboPooledDataSource.<init>(ComboPooledDataSource.java:105) at org.infinispan.loaders.jdbc.connectionfactory.PooledConnectionFactory.start(PooledConnectionFactory.java:35) at org.infinispan.loaders.jdbc.mixed.JdbcMixedCacheStore.start(JdbcMixedCacheStore.java:70) at org.infinispan.loaders.jdbc.mixed.JdbcMixedCacheStoreTest.createCacheStore(JdbcMixedCacheStoreTest.java:57) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80) at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564) at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213) at org.testng.internal.Invoker.invokeMethod(Invoker.java:653) at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901) at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231) at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111) at org.testng.TestRunner.privateRun(TestRunner.java:767) at org.testng.TestRunner.run(TestRunner.java:617) at org.testng.SuiteRunner.runTest(SuiteRunner.java:334) at org.testng.SuiteRunner.access$000(SuiteRunner.java:37) at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368) at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662)
The c3p0 project has released newer versions (0.9.2.1, 0.9.5-pre3), but they don't fix the bug. We should run the jdbc test suite on a single thread until it is fixed.