[JBoss JIRA] (ISPN-9917) JCachingProvider should not use weak ClassLoader references
by Tristan Tarrant (Jira)
[ https://issues.jboss.org/browse/ISPN-9917?page=com.atlassian.jira.plugin.... ]
Tristan Tarrant updated ISPN-9917:
----------------------------------
Fix Version/s: 9.4.8.Final
(was: 9.4.7.Final)
> JCachingProvider should not use weak ClassLoader references
> -----------------------------------------------------------
>
> Key: ISPN-9917
> URL: https://issues.jboss.org/browse/ISPN-9917
> Project: Infinispan
> Issue Type: Bug
> Components: JCache
> Affects Versions: 10.0.0.Alpha3, 9.4.6.Final
> Reporter: Dan Berindei
> Assignee: Dan Berindei
> Priority: Major
> Fix For: 10.0.0.Beta1, 9.4.8.Final
>
>
> The idea behind {{WeakClassLoader}} is that we want users to be able to use {{Caching.getCachingProvider().getCacheManager()}} and not worry about closing the cache manager: instead Infinispan will close the manager when there are no more references to the provided {{ClassLoader}}.
> In order to close the manager automatically, {{AbstractJCachingProvider}} maintains a {{WeakHashMap}} of classloaders to managers, and if the cache manager had a strong reference to the classloader, the {{WeakHashMap}} entry would never be collected. However, this approach causes problems when a test creates a temporary {{ClassLoader}} instance and calls {{Caching.getCachingProvider().getCacheManager(tempClassLoader)}}, because the JVM is free to collect {{tempClassLoader}} immediately after it's used to create the {{WeakClassLoader}}. This can cause failures in the jcache tck with the IBM JDK:
> {noformat}
> [OK: 268, KO: 3, SKIP: 0] Test failed: CachingProviderTest.closeCacheManagerByURIAndClassLoader
> org.infinispan.commons.CacheConfigurationException: org.infinispan.commons.CacheException: Unable to construct a GlobalComponentRegistry!
> at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:344)
> at org.infinispan.jcache.embedded.JCacheManager.<init>(JCacheManager.java:70)
> at org.infinispan.jcache.embedded.JCachingProvider.createCacheManager(JCachingProvider.java:46)
> at org.infinispan.jcache.AbstractJCachingProvider.getCacheManager(AbstractJCachingProvider.java:67)
> at org.jsr107.tck.spi.CachingProviderTest.closeCacheManagerByURIAndClassLoader(CachingProviderTest.java:175)
> Caused by: org.infinispan.commons.CacheException: Unable to construct a GlobalComponentRegistry!
> at org.infinispan.factories.GlobalComponentRegistry.<init>(GlobalComponentRegistry.java:164)
> at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:329)
> ... 39 more
> Caused by: org.infinispan.commons.CacheConfigurationException: Unable to inject dependencies for component class org.infinispan.notifications.cachemanagerlistener.CacheManagerNotifierImpl, path org.infinispan.notifications.cachemanagerlistener.CacheManagerNotifier (a org.infinispan.notifications.cachemanagerlistener.CacheManagerNotifierImpl)
> at org.infinispan.factories.impl.BasicComponentRegistryImpl.performInjection(BasicComponentRegistryImpl.java:286)
> at org.infinispan.factories.impl.BasicComponentRegistryImpl.wireWrapper(BasicComponentRegistryImpl.java:176)
> at org.infinispan.factories.impl.BasicComponentRegistryImpl.registerComponent(BasicComponentRegistryImpl.java:360)
> at org.infinispan.factories.GlobalComponentRegistry.<init>(GlobalComponentRegistry.java:120)
> ... 40 more
> Caused by: org.infinispan.commons.CacheException: ClassLoader reference was garbage collected
> at org.infinispan.jcache.embedded.WeakClassLoader.requireClassLoader(WeakClassLoader.java:49)
> at org.infinispan.jcache.embedded.WeakClassLoader.findClass(WeakClassLoader.java:30)
> at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:925)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:870)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:853)
> at java.lang.Class.forNameImpl(Native Method)
> at java.lang.Class.forName(Class.java:402)
> at org.infinispan.commons.util.Util.loadClassStrict(Util.java:170)
> at org.infinispan.commons.util.Util.loadClass(Util.java:122)
> at org.infinispan.factories.impl.BasicComponentRegistryImpl.tryAutoInstantiation(BasicComponentRegistryImpl.java:249)
> at org.infinispan.factories.impl.BasicComponentRegistryImpl.findFactory(BasicComponentRegistryImpl.java:202)
> at org.infinispan.factories.impl.BasicComponentRegistryImpl.getComponent0(BasicComponentRegistryImpl.java:94)
> at org.infinispan.factories.impl.BasicComponentRegistryImpl.getDependency(BasicComponentRegistryImpl.java:327)
> at org.infinispan.factories.impl.BasicComponentRegistryImpl.setInjectionField(BasicComponentRegistryImpl.java:315)
> at org.infinispan.factories.impl.BasicComponentRegistryImpl.performInjection(BasicComponentRegistryImpl.java:276)
> ... 43 more
> {noformat}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 11 months
[JBoss JIRA] (ISPN-9919) Partial updates in Hibernate 2L cache upon failure
by Tristan Tarrant (Jira)
[ https://issues.jboss.org/browse/ISPN-9919?page=com.atlassian.jira.plugin.... ]
Tristan Tarrant updated ISPN-9919:
----------------------------------
Fix Version/s: 9.4.8.Final
(was: 9.4.7.Final)
> Partial updates in Hibernate 2L cache upon failure
> --------------------------------------------------
>
> Key: ISPN-9919
> URL: https://issues.jboss.org/browse/ISPN-9919
> Project: Infinispan
> Issue Type: Bug
> Components: Hibernate Cache
> Affects Versions: 10.0.0.Alpha3, 9.4.6.Final
> Reporter: Galder Zamarreño
> Assignee: Galder Zamarreño
> Priority: Major
> Fix For: 10.0.0.Final, 9.4.8.Final
>
>
> This issue only affects 5.3:
> For a repl read-write, entity cache, if the failure happens on the async FutureUpdate call, that's fine because the Tombstone has already been sent and the cache won't return anything.
> If the failure happens when the Tombstone is sent, we seem to have a problem because it results in stale data in the node that failed to apply the Tombstone. The FutureUpdate that comes after the Tombstone cannot apply because it doesn't find the Tombstone.
> In 5.3, Sync logs any errors but does not propagate it, so it ends up with inconsistent state.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 11 months
[JBoss JIRA] (ISPN-9933) Cache components are not stopped after startup error
by Tristan Tarrant (Jira)
[ https://issues.jboss.org/browse/ISPN-9933?page=com.atlassian.jira.plugin.... ]
Tristan Tarrant updated ISPN-9933:
----------------------------------
Fix Version/s: 9.4.8.Final
(was: 9.4.7.Final)
> Cache components are not stopped after startup error
> ----------------------------------------------------
>
> Key: ISPN-9933
> URL: https://issues.jboss.org/browse/ISPN-9933
> Project: Infinispan
> Issue Type: Bug
> Components: Core
> Affects Versions: 10.0.0.Alpha3, 9.4.6.Final
> Reporter: Dan Berindei
> Assignee: Dan Berindei
> Priority: Major
> Labels: testsuite_stability
> Fix For: 10.0.0.Beta1, 9.4.8.Final
>
>
> When a cache fails to start (e.g. because a store is not available on startup), the cache is not registered in {{DefaultCacheManager's}} map, and stopping the cache manager does not stop any of the components that already started (or even the component that failed).
> E.g. in {{NonStringKeyPreloadTest}}, the store is not available on startup, and the threads created by HikariCP on startup (in 9.4.x) are not released. The test also leaks an Agroal thread on master, but that is because the test is keeping the connection pool factory in a static field.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 11 months
[JBoss JIRA] (ISPN-9954) Missing dependency on server/integration/testsuite
by Tristan Tarrant (Jira)
[ https://issues.jboss.org/browse/ISPN-9954?page=com.atlassian.jira.plugin.... ]
Tristan Tarrant updated ISPN-9954:
----------------------------------
Fix Version/s: 9.4.8.Final
(was: 9.4.7.Final)
> Missing dependency on server/integration/testsuite
> --------------------------------------------------
>
> Key: ISPN-9954
> URL: https://issues.jboss.org/browse/ISPN-9954
> Project: Infinispan
> Issue Type: Bug
> Components: Dependency, Test Suite - Server
> Affects Versions: 9.4.6.Final
> Reporter: Gustavo Lira
> Assignee: Gustavo Lira
> Priority: Major
> Fix For: 10.0.0.Beta1, 9.4.8.Final
>
>
> infinispan-remote dependecy is missing when we try to build infinispan using the following command
> {code}mvn -s settings_mead_jdg.xml -f infinispan/pom.xml -pl server/integration/testsuite -B clean verify -Dmaven.test.failure.ignore=true -Pclient.hotrod.osgi -Dversion.karaf=4.2.0 -Dzip.dist=/path/to/infinispan-server.zip {code}
> Here the throwed exception
> {noformat}
> [INFO] Running org.infinispan.server.test.client.hotrod.osgi.RemoteCacheOsgiIT
> [OK: 0, KO: 0, SKIP: 0] Test starting: RemoteCacheOsgiIT.initializationError
> [OK: 0, KO: 1, SKIP: 0] Test failed: RemoteCacheOsgiIT.initializationError
> org.ops4j.pax.exam.TestContainerException: java.lang.IllegalArgumentException: Could not resolve version. Do you have a dependency for org.infinispan/infinispan-remote in your maven project?
> at org.ops4j.pax.exam.spi.reactors.ReactorManager.prepareReactor(ReactorManager.java:195)
> at org.ops4j.pax.exam.junit.impl.ProbeRunner.<init>(ProbeRunner.java:78)
> at org.ops4j.pax.exam.junit.PaxExam.createDelegate(PaxExam.java:82)
> at org.ops4j.pax.exam.junit.PaxExam.<init>(PaxExam.java:73)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
> at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)
> at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
> at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
> at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
> at org.junit.runner.Computer.getRunner(Computer.java:40)
> at org.junit.runner.Computer$1.runnerForClass(Computer.java:31)
> at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
> at org.junit.runners.model.RunnerBuilder.runners(RunnerBuilder.java:101)
> at org.junit.runners.model.RunnerBuilder.runners(RunnerBuilder.java:87)
> at org.junit.runners.Suite.<init>(Suite.java:81)
> at org.junit.runner.Computer.getSuite(Computer.java:28)
> at org.junit.runner.Request.classes(Request.java:75)
> at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:126)
> at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeEager(JUnitCoreWrapper.java:107)
> at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:83)
> at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:75)
> at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:158)
> at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
> at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
> at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
> at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
> Caused by: java.lang.IllegalArgumentException: Could not resolve version. Do you have a dependency for org.infinispan/infinispan-remote in your maven project?
> at org.ops4j.pax.exam.MavenUtils.getArtifactVersion(MavenUtils.java:75)
> at org.ops4j.pax.exam.MavenUtils$1.getVersion(MavenUtils.java:109)
> at org.ops4j.pax.exam.options.MavenArtifactUrlReference.version(MavenArtifactUrlReference.java:86)
> at org.ops4j.pax.exam.options.MavenArtifactUrlReference.versionAsInProject(MavenArtifactUrlReference.java:90)
> at org.infinispan.server.test.client.hotrod.osgi.RemoteCacheOsgiIT.config(RemoteCacheOsgiIT.java:83)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.ops4j.pax.exam.spi.reactors.ReactorManager.addConfigurationsToReactor(ReactorManager.java:248)
> at org.ops4j.pax.exam.spi.reactors.ReactorManager.prepareReactor(ReactorManager.java:184)
> ... 28 more
> 07:31:08.257 [main] ERROR org.infinispan.commons.test.TestSuiteProgress - Test failed: RemoteCacheOsgiIT.initializationError
> org.ops4j.pax.exam.TestContainerException: java.lang.IllegalArgumentException: Could not resolve version. Do you have a dependency for org.infinispan/infinispan-remote in your maven project?
> at org.ops4j.pax.exam.spi.reactors.ReactorManager.prepareReactor(ReactorManager.java:195) ~[pax-exam-spi-4.11.0.jar:?]
> at org.ops4j.pax.exam.junit.impl.ProbeRunner.<init>(ProbeRunner.java:78) ~[pax-exam-junit4-4.11.0.jar:?]
> at org.ops4j.pax.exam.junit.PaxExam.createDelegate(PaxExam.java:82) ~[pax-exam-junit4-4.11.0.jar:?]
> at org.ops4j.pax.exam.junit.PaxExam.<init>(PaxExam.java:73) ~[pax-exam-junit4-4.11.0.jar:?]
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_191]
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_191]
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_191]
> at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_191]
> at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104) ~[junit-4.12.0.redhat-003.jar:4.12.0.redhat-003]
> at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86) ~[junit-4.12.0.redhat-003.jar:4.12.0.redhat-003]
> at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59) ~[junit-4.12.0.redhat-003.jar:4.12.0.redhat-003]
> at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26) ~[junit-4.12.0.redhat-003.jar:4.12.0.redhat-003]
> at org.junit.runner.Computer.getRunner(Computer.java:40) ~[junit-4.12.0.redhat-003.jar:4.12.0.redhat-003]
> at org.junit.runner.Computer$1.runnerForClass(Computer.java:31) ~[junit-4.12.0.redhat-003.jar:4.12.0.redhat-003]
> at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59) ~[junit-4.12.0.redhat-003.jar:4.12.0.redhat-003]
> at org.junit.runners.model.RunnerBuilder.runners(RunnerBuilder.java:101) ~[junit-4.12.0.redhat-003.jar:4.12.0.redhat-003]
> at org.junit.runners.model.RunnerBuilder.runners(RunnerBuilder.java:87) ~[junit-4.12.0.redhat-003.jar:4.12.0.redhat-003]
> at org.junit.runners.Suite.<init>(Suite.java:81) ~[junit-4.12.0.redhat-003.jar:4.12.0.redhat-003]
> at org.junit.runner.Computer.getSuite(Computer.java:28) ~[junit-4.12.0.redhat-003.jar:4.12.0.redhat-003]
> at org.junit.runner.Request.classes(Request.java:75) ~[junit-4.12.0.redhat-003.jar:4.12.0.redhat-003]
> at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:126) [surefire-junit47-3.0.0-M1.jar:3.0.0-M1]
> at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeEager(JUnitCoreWrapper.java:107) [surefire-junit47-3.0.0-M1.jar:3.0.0-M1]
> at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:83) [surefire-junit47-3.0.0-M1.jar:3.0.0-M1]
> at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:75) [surefire-junit47-3.0.0-M1.jar:3.0.0-M1]
> at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:158) [surefire-junit47-3.0.0-M1.jar:3.0.0-M1]
> at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384) [surefire-booter-3.0.0-M1.jar:3.0.0-M1]
> at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345) [surefire-booter-3.0.0-M1.jar:3.0.0-M1]
> at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126) [surefire-booter-3.0.0-M1.jar:3.0.0-M1]
> at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418) [surefire-booter-3.0.0-M1.jar:3.0.0-M1]
> Caused by: java.lang.IllegalArgumentException: Could not resolve version. Do you have a dependency for org.infinispan/infinispan-remote in your maven project?
> at org.ops4j.pax.exam.MavenUtils.getArtifactVersion(MavenUtils.java:75) ~[pax-exam-4.11.0.jar:?]
> at org.ops4j.pax.exam.MavenUtils$1.getVersion(MavenUtils.java:109) ~[pax-exam-4.11.0.jar:?]
> at org.ops4j.pax.exam.options.MavenArtifactUrlReference.version(MavenArtifactUrlReference.java:86) ~[pax-exam-4.11.0.jar:?]
> at org.ops4j.pax.exam.options.MavenArtifactUrlReference.versionAsInProject(MavenArtifactUrlReference.java:90) ~[pax-exam-4.11.0.jar:?]
> at org.infinispan.server.test.client.hotrod.osgi.RemoteCacheOsgiIT.config(RemoteCacheOsgiIT.java:83) ~[test-classes/:?]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_191]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_191]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_191]
> at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_191]
> at org.ops4j.pax.exam.spi.reactors.ReactorManager.addConfigurationsToReactor(ReactorManager.java:248) ~[pax-exam-spi-4.11.0.jar:?]
> at org.ops4j.pax.exam.spi.reactors.ReactorManager.prepareReactor(ReactorManager.java:184) ~[pax-exam-spi-4.11.0.jar:?]
> ... 28 more
> [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.037 s <<< FAILURE! - in org.infinispan.server.test.client.hotrod.osgi.RemoteCacheOsgiIT
> [ERROR] initializationError(org.infinispan.server.test.client.hotrod.osgi.RemoteCacheOsgiIT) Time elapsed: 0.008 s <<< ERROR!
> org.ops4j.pax.exam.TestContainerException: java.lang.IllegalArgumentException: Could not resolve version. Do you have a dependency for org.infinispan/infinispan-remote in your maven project?
> at org.infinispan.server.test.client.hotrod.osgi.RemoteCacheOsgiIT.config(RemoteCacheOsgiIT.java:83)
> {noformat}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 11 months
[JBoss JIRA] (ISPN-9978) Make sure Off Heap works properly with Java 9 access
by William Burns (Jira)
William Burns created ISPN-9978:
-----------------------------------
Summary: Make sure Off Heap works properly with Java 9 access
Key: ISPN-9978
URL: https://issues.jboss.org/browse/ISPN-9978
Project: Infinispan
Issue Type: Bug
Components: Off Heap
Reporter: William Burns
Assignee: William Burns
Fix For: 10.0.0.Beta1
Off Heap currently uses reflection to access Unsafe. We should make sure this uses proper mechanisms for Java9 and newer. We can take some ideas from io.netty.util.internal.PlatformDependent0 as a basis.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 11 months