[JBoss JIRA] (ISPN-4334) MapReduceTaskLifecycleService shouldn't keep the list of found lifecycle implementations
by Jakub Markos (JIRA)
Jakub Markos created ISPN-4334:
----------------------------------
Summary: MapReduceTaskLifecycleService shouldn't keep the list of found lifecycle implementations
Key: ISPN-4334
URL: https://issues.jboss.org/browse/ISPN-4334
Project: Infinispan
Issue Type: Feature Request
Components: Distributed Execution and Map/Reduce, Remote Querying
Reporter: Jakub Markos
Assignee: Dan Berindei
The issue is that this class https://github.com/infinispan/infinispan/blob/master/core/src/main/java/o... searches for the lifecycle classes using current threads classloader, and then caches the result, so the returned list of implementations depends only on the 1st thread creating the singleton instance of the service.
You can replicate the bug from this branch:
https://github.com/jmarkos/infinispan/tree/queries
running
{code}
mvn clean verify -Dmaven.test.failure.ignore=true -DfailIfNoTests=false -U -Psuite.others -Dtest=RemoteQueryKeySetTest,ManualIndexingTest
{code}
from the server/integration/testsuite directory, results in an exception:
{code}javax.management.MBeanException
at org.infinispan.jmx.ResourceDMBean.invoke(ResourceDMBean.java:271)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:791)
at org.jboss.as.jmx.PluggableMBeanServerImpl$TcclMBeanServer.invoke(PluggableMBeanServerImpl.java:527)
at org.jboss.as.jmx.PluggableMBeanServerImpl.invoke(PluggableMBeanServerImpl.java:263)
at org.jboss.remotingjmx.protocol.v2.ServerProxy$InvokeHandler.handle(ServerProxy.java:915)
at org.jboss.remotingjmx.protocol.v2.ServerCommon$MessageReciever$1.run(ServerCommon.java:152)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.infinispan.jmx.ResourceDMBean.invoke(ResourceDMBean.java:269)
... 9 more
Caused by: org.infinispan.commons.CacheException: java.util.concurrent.ExecutionException: java.lang.NullPointerException
at org.infinispan.distexec.mapreduce.MapReduceTask.executeHelper(MapReduceTask.java:517)
at org.infinispan.distexec.mapreduce.MapReduceTask.execute(MapReduceTask.java:427)
at org.infinispan.query.impl.massindex.MapReduceMassIndexer.start(MapReduceMassIndexer.java:25)
... 14 more
Caused by: java.util.concurrent.ExecutionException: java.lang.NullPointerException
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)
at java.util.concurrent.FutureTask.get(FutureTask.java:111)
at org.infinispan.distexec.mapreduce.MapReduceTask$TaskPart.get(MapReduceTask.java:1059)
at org.infinispan.distexec.mapreduce.MapReduceTask.executeMapPhaseWithLocalReduction(MapReduceTask.java:677)
at org.infinispan.distexec.mapreduce.MapReduceTask.executeHelper(MapReduceTask.java:510)
... 16 more
Caused by: java.lang.NullPointerException
at org.infinispan.query.impl.massindex.IndexingMapper.map(IndexingMapper.java:38)
at org.infinispan.distexec.mapreduce.MapReduceManagerImpl$2.apply(MapReduceManagerImpl.java:207)
at org.infinispan.distexec.mapreduce.MapReduceManagerImpl$2.apply(MapReduceManagerImpl.java:202)
at org.infinispan.container.DefaultDataContainer$1.apply(DefaultDataContainer.java:393)
at org.infinispan.container.DefaultDataContainer$1.apply(DefaultDataContainer.java:389)
at org.infinispan.commons.util.concurrent.jdk8backported.ConcurrentParallelHashMapV8$1.apply(ConcurrentParallelHashMapV8.java:48)
at org.infinispan.commons.util.concurrent.jdk8backported.EquivalentConcurrentHashMapV8$ForEachMappingTask.compute(EquivalentConcurrentHashMapV8.java:4894)
at org.infinispan.commons.util.concurrent.jdk8backported.CountedCompleter.exec(CountedCompleter.java:681)
at org.infinispan.commons.util.concurrent.jdk8backported.ForkJoinTask.doExec(ForkJoinTask.java:264)
at org.infinispan.commons.util.concurrent.jdk8backported.ForkJoinTask.doInvoke(ForkJoinTask.java:360)
at org.infinispan.commons.util.concurrent.jdk8backported.ForkJoinTask.invoke(ForkJoinTask.java:692)
at org.infinispan.commons.util.concurrent.jdk8backported.EquivalentConcurrentHashMapV8.forEach(EquivalentConcurrentHashMapV8.java:3592)
at org.infinispan.commons.util.concurrent.jdk8backported.ConcurrentParallelHashMapV8.forEach(ConcurrentParallelHashMapV8.java:44)
at org.infinispan.container.DefaultDataContainer.executeTask(DefaultDataContainer.java:389)
at org.infinispan.distexec.mapreduce.MapReduceManagerImpl.map(MapReduceManagerImpl.java:202)
at org.infinispan.distexec.mapreduce.MapReduceManagerImpl.mapAndCombineForLocalReduction(MapReduceManagerImpl.java:87)
at org.infinispan.distexec.mapreduce.MapReduceTask$MapTaskPart.invokeMapCombineLocallyForLocalReduction(MapReduceTask.java:1173)
at org.infinispan.distexec.mapreduce.MapReduceTask$MapTaskPart.access$300(MapReduceTask.java:1112)
at org.infinispan.distexec.mapreduce.MapReduceTask$MapTaskPart$2.call(MapReduceTask.java:1144)
at org.infinispan.distexec.mapreduce.MapReduceTask$MapTaskPart$2.call(MapReduceTask.java:1140)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
{code}
If you instead use -Dtest=RemoteQueryKeySetTest,ManualIndexingggggggggggggTest (to change the order of the execution, junit probably orders it by length), it passes, because MapReduceTaskLifecycleService is created from a thread which classloader sees the query module and therefore can load this class
https://github.com/infinispan/infinispan/blob/master/query/src/main/java/... which properly initializes IndexingMapper and avoids the NPE.
Thanks to Adrian Nistor for his help.
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
9 years, 11 months
[JBoss JIRA] (ISPN-1764) Remove threadLocal in org.infinispan.context.AbstractInvocationContextContainer
by Dan Berindei (JIRA)
[ https://issues.jboss.org/browse/ISPN-1764?page=com.atlassian.jira.plugin.... ]
Dan Berindei resolved ISPN-1764.
--------------------------------
Fix Version/s: 7.0.0.Alpha1
6.0.1.Final
Resolution: Done
The {{AbstractInvocationContextContainer}} class has been removed with the ISPN-3777 fix. A thread-local is still used in {{InvocationContextContainerImpl}}, but only if a classloader was specified with {{AdvancedCache.with(ClassLoader)}}.
> Remove threadLocal in org.infinispan.context.AbstractInvocationContextContainer
> -------------------------------------------------------------------------------
>
> Key: ISPN-1764
> URL: https://issues.jboss.org/browse/ISPN-1764
> Project: Infinispan
> Issue Type: Enhancement
> Components: Core
> Reporter: Sanne Grinovero
> Assignee: Dan Berindei
> Fix For: 7.0.0.Alpha1, 6.0.1.Final
>
>
> The javadocs in org.infinispan.context.AbstractInvocationContextContainer mention:
> {quote}// See ISPN-1397. There is no real need to store the InvocationContext in a thread local at all, since it is passed
> // as a parameter to any component that requires it - except for two components at the moment that require reading
> // the InvocationContext from a thread local. These two are the ClusterCacheLoader and the JBossMarshaller. The
> // former can be fixed once the CacheStore SPI is changed to accept an InvocationContext (see ISPN-1416) and the
> // latter can be fixed once the CacheManager architecture is changed to be associated with a ClassLoader per
> // CacheManager (see ISPN-1413), after which this thread local can be removed and the getInvocationContext() method
> // can also be removed.
> {quote}
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
9 years, 11 months
[JBoss JIRA] (ISPN-3707) I tried to access mbeans on a remotely running Jboss AS7 infinispan server using the jconsole.bat from the infinispan Jboss AS7 installation and i am gettign the following error:
by Joseph Alex (JIRA)
[ https://issues.jboss.org/browse/ISPN-3707?page=com.atlassian.jira.plugin.... ]
Joseph Alex commented on ISPN-3707:
-----------------------------------
Same failure occurs even when connecting to a local ISPN server. However, we can connect using JDK provided JVisualVM and view mbeans. Version used : infinispan-server-6.0.2.Final
> I tried to access mbeans on a remotely running Jboss AS7 infinispan server using the jconsole.bat from the infinispan Jboss AS7 installation and i am gettign the following error:
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: ISPN-3707
> URL: https://issues.jboss.org/browse/ISPN-3707
> Project: Infinispan
> Issue Type: Bug
> Components: Server
> Affects Versions: 6.0.0.CR1
> Reporter: Pra remo
> Assignee: Mircea Markus
> Labels: jboss
> Fix For: 7.0.0.Beta1
>
>
> I tried to access mbeans on a remotely running Jboss AS7 infinispan server using the jconsole.bat from the infinispan Jboss AS7 installation and i am gettign the following error:
> xception in thread "VMPanel.connect" java.lang.NoClassDefFoundError: org/jboss/logging/Logger
> at org.jboss.remotingjmx.RemotingConnectorProvider.<clinit>(RemotingConnectorProvider.java:42)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:247)
> at com.sun.jmx.remote.util.Service$LazyIterator.next(Service.java:270)
> at javax.management.remote.JMXConnectorFactory.getConnectorAsService(JMXConnectorFactory.java:425)
> at javax.management.remote.JMXConnectorFactory.newJMXConnector(JMXConnectorFactory.java:310)
> at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:247)
> at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:207)
> at sun.tools.jconsole.ProxyClient.tryConnect(ProxyClient.java:336)
> at sun.tools.jconsole.ProxyClient.connect(ProxyClient.java:296)
> at sun.tools.jconsole.VMPanel$2.run(VMPanel.java:280)
> Caused by: java.lang.ClassNotFoundException: org.jboss.logging.Logger
> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
> ... 11 more
> I used both url's : service:jmx:remoting-jmx://:9999 service:jmx:remoting-jmx://:4447
> C:\Developer\JDK\Java\jdk1.6.0_34\lib\jconsole.jar;C:\Developer\JDK\Java\jdk1.6.0_34\lib\tools.jar;C:\Users\<user>\Downloads\infinispan-server-6.0.0.CR1-bin\infini
> span-server-6.0.0.CR1\jboss-modules.jar;C:\Users\<user>\Downloads\infinispan-server-6.0.0.CR1-bin\infinispan-server-6.0.0.CR1\modules\system\layers\base\org\jboss\
> remoting-jmx\main\remoting-jmx-1.1.0.Final.jar;C:\Users\<user>\Downloads\infinispan-server-6.0.0.CR1-bin\infinispan-server-6.0.0.CR1\modules\system\layers\base\org
> \jboss\staxmapper\main\staxmapper-1.1.0.Final.jar;C:\Users\<user>\Downloads\infinispan-server-6.0.0.CR1-bin\infinispan-server-6.0.0.CR1\modules\system\layers\base\
> org\jboss\as\protocol\main\jboss-as-protocol-7.2.0.Final.jar;C:\Users\<user>\Downloads\infinispan-server-6.0.0.CR1-bin\infinispan-server-6.0.0.CR1\modules\system\l
> ayers\base\org\jboss\dmr\main\jboss-dmr-1.1.6.Final.jar;C:\Users\<user>\Downloads\infinispan-server-6.0.0.CR1-bin\infinispan-server-6.0.0.CR1\modules\system\layers
> \base\org\jboss\as\controller-client\main\jboss-as-controller-client-7.2.0.Final.jar;C:\Users\<user>\Downloads\infinispan-server-6.0.0.CR1-bin\infinispan-server-6.
> 0.0.CR1\modules\system\layers\base\org\jboss\threads\main\jboss-threads-2.1.0.Fin
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
9 years, 11 months