[JBoss JIRA] (ISPN-6359) DistTopKeyTest.testPut random failures
by Dan Berindei (JIRA)
[ https://issues.jboss.org/browse/ISPN-6359?page=com.atlassian.jira.plugin.... ]
Dan Berindei updated ISPN-6359:
-------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
> DistTopKeyTest.testPut random failures
> ---------------------------------------
>
> Key: ISPN-6359
> URL: https://issues.jboss.org/browse/ISPN-6359
> Project: Infinispan
> Issue Type: Bug
> Components: Core
> Affects Versions: 8.2.0.Final
> Reporter: Dan Berindei
> Assignee: Pedro Ruivo
> Fix For: 9.0.0.Alpha1
>
>
> {noformat}
> java.lang.AssertionError: Wrong number of contented keys expected [0] but found [1]
> at org.testng.Assert.fail(Assert.java:94)
> at org.testng.Assert.failNotEquals(Assert.java:494)
> at org.testng.Assert.assertEquals(Assert.java:123)
> at org.testng.Assert.assertEquals(Assert.java:265)
> at org.infinispan.stats.BaseClusterTopKeyTest.assertTopKeyLockContented(BaseClusterTopKeyTest.java:282)
> at org.infinispan.stats.BaseClusterTopKeyTest.assertLockInformation(BaseClusterTopKeyTest.java:293)
> at org.infinispan.stats.BaseClusterTopKeyTest.testPut(BaseClusterTopKeyTest.java:75)
> {noformat}
> Example failure in CI: http://ci.infinispan.org/viewLog.html?buildId=37214&buildTypeId=bt9&tab=b...
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 6 months
[JBoss JIRA] (ISPN-6407) java.io.UTFDataFormatException while putting to cache using cacheManager.getCache() over javascript
by Anna Manukyan (JIRA)
[ https://issues.jboss.org/browse/ISPN-6407?page=com.atlassian.jira.plugin.... ]
Anna Manukyan updated ISPN-6407:
--------------------------------
Description:
The following exception is thrown while execution the following javascript in local mode:
{code}
// mode=local,language=javascript,datatype='text/plain; charset=utf-8'
cacheManager.getCache().put("a", "a");
cacheManager.getCache().get("a")
18:00:24,666 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (HotRodServerWorker-7-128) ISPN000136: Error executing command PutKeyValueCommand, writing keys [test-cacheManager.js]: java.io.UTFDataFormatException: Invalid byte
at org.jboss.marshalling.UTFUtils.readUTFBytes(UTFUtils.java:162)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:285)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41)
at org.infinispan.commons.marshall.jboss.AbstractJBossMarshaller.objectFromObjectStream(AbstractJBossMarshaller.java:134)
at org.infinispan.commons.marshall.jboss.AbstractJBossMarshaller.objectFromByteBuffer(AbstractJBossMarshaller.java:112)
at org.infinispan.commons.marshall.AbstractMarshaller.objectFromByteBuffer(AbstractMarshaller.java:82)
at org.infinispan.server.hotrod.HotRodTypeConverter.unmarshall(HotRodTypeConverter.scala:38)
at org.infinispan.server.hotrod.HotRodTypeConverter.boxValue(HotRodTypeConverter.scala:22)
at org.infinispan.interceptors.compat.BaseTypeConverterInterceptor.visitPutKeyValueCommand(BaseTypeConverterInterceptor.java:86)
at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:78)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:99)
at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:110)
at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:79)
at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:43)
at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:78)
at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:335)
at org.infinispan.cache.impl.CacheImpl.executeCommandAndCommitIfNeeded(CacheImpl.java:1658)
at org.infinispan.cache.impl.CacheImpl.putInternal(CacheImpl.java:1107)
at org.infinispan.cache.impl.CacheImpl.put(CacheImpl.java:1097)
at org.infinispan.cache.impl.DecoratedCache.put(DecoratedCache.java:540)
at org.infinispan.cache.impl.AbstractDelegatingAdvancedCache.put(AbstractDelegatingAdvancedCache.java:229)
at org.infinispan.server.hotrod.CacheDecodeContext.put(CacheDecodeContext.scala:211)
at org.infinispan.server.hotrod.HotRodDecoder.org$infinispan$server$hotrod$HotRodDecoder$$decodeValue(HotRodDecoder.scala:145)
at org.infinispan.server.hotrod.HotRodDecoder$$anonfun$decode$1.apply$mcV$sp(HotRodDecoder.scala:55)
at org.infinispan.server.hotrod.HotRodDecoder.wrapSecurity(HotRodDecoder.scala:224)
at org.infinispan.server.hotrod.HotRodDecoder.decode(HotRodDecoder.scala:50)
at io.netty.handler.codec.ReplayingDecoder.callDecode(ReplayingDecoder.java:370)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:168)
at org.infinispan.server.hotrod.HotRodDecoder.org$infinispan$server$core$transport$StatsChannelHandler$$super$channelRead(HotRodDecoder.scala:32)
at org.infinispan.server.core.transport.StatsChannelHandler$class.channelRead(StatsChannelHandler.scala:32)
at org.infinispan.server.hotrod.HotRodDecoder.channelRead(HotRodDecoder.scala:32)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:130)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
at java.lang.Thread.run(Thread.java:745)
{code}
If the javascript is changed to be:
{code}
// mode=local,language=javascript,datatype='text/plain; charset=utf-8'
cache.put("a", "a");
cache.get("a")
{code}
then everything works fine.
The test verifying this use case is:
{code}
it('can execute a script remotely to get node address from cacheManager', function(done) {
Promise.all([client, readFile('spec/utils/test-cacheManager.js')])
.then(function(vals) {
var c = vals[0];
return c.addScript('test-cacheManager.js', vals[1].toString())
.then(function() { return c; } );
})
.then(t.assert(t.exec('test-cacheManager.js'),
t.toBe('a')))
.catch(failed(done)).finally(done);
});
{code}
UPDATE:
The exception is thrown not only in case of cacheManager usage. It is also thrown while using marshaller, or adding a simple line in the executed script like:
var a = null;
was:
The following exception is thrown while execution the following javascript in local mode:
{code}
// mode=local,language=javascript,datatype='text/plain; charset=utf-8'
cacheManager.getCache().put("a", "a");
cacheManager.getCache().get("a")
18:00:24,666 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (HotRodServerWorker-7-128) ISPN000136: Error executing command PutKeyValueCommand, writing keys [test-cacheManager.js]: java.io.UTFDataFormatException: Invalid byte
at org.jboss.marshalling.UTFUtils.readUTFBytes(UTFUtils.java:162)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:285)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41)
at org.infinispan.commons.marshall.jboss.AbstractJBossMarshaller.objectFromObjectStream(AbstractJBossMarshaller.java:134)
at org.infinispan.commons.marshall.jboss.AbstractJBossMarshaller.objectFromByteBuffer(AbstractJBossMarshaller.java:112)
at org.infinispan.commons.marshall.AbstractMarshaller.objectFromByteBuffer(AbstractMarshaller.java:82)
at org.infinispan.server.hotrod.HotRodTypeConverter.unmarshall(HotRodTypeConverter.scala:38)
at org.infinispan.server.hotrod.HotRodTypeConverter.boxValue(HotRodTypeConverter.scala:22)
at org.infinispan.interceptors.compat.BaseTypeConverterInterceptor.visitPutKeyValueCommand(BaseTypeConverterInterceptor.java:86)
at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:78)
at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:99)
at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:110)
at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:79)
at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:43)
at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:78)
at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:335)
at org.infinispan.cache.impl.CacheImpl.executeCommandAndCommitIfNeeded(CacheImpl.java:1658)
at org.infinispan.cache.impl.CacheImpl.putInternal(CacheImpl.java:1107)
at org.infinispan.cache.impl.CacheImpl.put(CacheImpl.java:1097)
at org.infinispan.cache.impl.DecoratedCache.put(DecoratedCache.java:540)
at org.infinispan.cache.impl.AbstractDelegatingAdvancedCache.put(AbstractDelegatingAdvancedCache.java:229)
at org.infinispan.server.hotrod.CacheDecodeContext.put(CacheDecodeContext.scala:211)
at org.infinispan.server.hotrod.HotRodDecoder.org$infinispan$server$hotrod$HotRodDecoder$$decodeValue(HotRodDecoder.scala:145)
at org.infinispan.server.hotrod.HotRodDecoder$$anonfun$decode$1.apply$mcV$sp(HotRodDecoder.scala:55)
at org.infinispan.server.hotrod.HotRodDecoder.wrapSecurity(HotRodDecoder.scala:224)
at org.infinispan.server.hotrod.HotRodDecoder.decode(HotRodDecoder.scala:50)
at io.netty.handler.codec.ReplayingDecoder.callDecode(ReplayingDecoder.java:370)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:168)
at org.infinispan.server.hotrod.HotRodDecoder.org$infinispan$server$core$transport$StatsChannelHandler$$super$channelRead(HotRodDecoder.scala:32)
at org.infinispan.server.core.transport.StatsChannelHandler$class.channelRead(StatsChannelHandler.scala:32)
at org.infinispan.server.hotrod.HotRodDecoder.channelRead(HotRodDecoder.scala:32)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:130)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
at java.lang.Thread.run(Thread.java:745)
{code}
If the javascript is changed to be:
{code}
// mode=local,language=javascript,datatype='text/plain; charset=utf-8'
cache.put("a", "a");
cache.get("a")
{code}
then everything works fine.
The test verifying this use case is:
{code}
it('can execute a script remotely to get node address from cacheManager', function(done) {
Promise.all([client, readFile('spec/utils/test-cacheManager.js')])
.then(function(vals) {
var c = vals[0];
return c.addScript('test-cacheManager.js', vals[1].toString())
.then(function() { return c; } );
})
.then(t.assert(t.exec('test-cacheManager.js'),
t.toBe('a')))
.catch(failed(done)).finally(done);
});
{code}
> java.io.UTFDataFormatException while putting to cache using cacheManager.getCache() over javascript
> ---------------------------------------------------------------------------------------------------
>
> Key: ISPN-6407
> URL: https://issues.jboss.org/browse/ISPN-6407
> Project: Infinispan
> Issue Type: Bug
> Components: Remote Protocols
> Reporter: Anna Manukyan
> Assignee: Galder Zamarreño
>
> The following exception is thrown while execution the following javascript in local mode:
> {code}
> // mode=local,language=javascript,datatype='text/plain; charset=utf-8'
> cacheManager.getCache().put("a", "a");
> cacheManager.getCache().get("a")
> 18:00:24,666 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (HotRodServerWorker-7-128) ISPN000136: Error executing command PutKeyValueCommand, writing keys [test-cacheManager.js]: java.io.UTFDataFormatException: Invalid byte
> at org.jboss.marshalling.UTFUtils.readUTFBytes(UTFUtils.java:162)
> at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:285)
> at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
> at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41)
> at org.infinispan.commons.marshall.jboss.AbstractJBossMarshaller.objectFromObjectStream(AbstractJBossMarshaller.java:134)
> at org.infinispan.commons.marshall.jboss.AbstractJBossMarshaller.objectFromByteBuffer(AbstractJBossMarshaller.java:112)
> at org.infinispan.commons.marshall.AbstractMarshaller.objectFromByteBuffer(AbstractMarshaller.java:82)
> at org.infinispan.server.hotrod.HotRodTypeConverter.unmarshall(HotRodTypeConverter.scala:38)
> at org.infinispan.server.hotrod.HotRodTypeConverter.boxValue(HotRodTypeConverter.scala:22)
> at org.infinispan.interceptors.compat.BaseTypeConverterInterceptor.visitPutKeyValueCommand(BaseTypeConverterInterceptor.java:86)
> at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:78)
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:99)
> at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:110)
> at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:79)
> at org.infinispan.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:43)
> at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:78)
> at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:335)
> at org.infinispan.cache.impl.CacheImpl.executeCommandAndCommitIfNeeded(CacheImpl.java:1658)
> at org.infinispan.cache.impl.CacheImpl.putInternal(CacheImpl.java:1107)
> at org.infinispan.cache.impl.CacheImpl.put(CacheImpl.java:1097)
> at org.infinispan.cache.impl.DecoratedCache.put(DecoratedCache.java:540)
> at org.infinispan.cache.impl.AbstractDelegatingAdvancedCache.put(AbstractDelegatingAdvancedCache.java:229)
> at org.infinispan.server.hotrod.CacheDecodeContext.put(CacheDecodeContext.scala:211)
> at org.infinispan.server.hotrod.HotRodDecoder.org$infinispan$server$hotrod$HotRodDecoder$$decodeValue(HotRodDecoder.scala:145)
> at org.infinispan.server.hotrod.HotRodDecoder$$anonfun$decode$1.apply$mcV$sp(HotRodDecoder.scala:55)
> at org.infinispan.server.hotrod.HotRodDecoder.wrapSecurity(HotRodDecoder.scala:224)
> at org.infinispan.server.hotrod.HotRodDecoder.decode(HotRodDecoder.scala:50)
> at io.netty.handler.codec.ReplayingDecoder.callDecode(ReplayingDecoder.java:370)
> at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:168)
> at org.infinispan.server.hotrod.HotRodDecoder.org$infinispan$server$core$transport$StatsChannelHandler$$super$channelRead(HotRodDecoder.scala:32)
> at org.infinispan.server.core.transport.StatsChannelHandler$class.channelRead(StatsChannelHandler.scala:32)
> at org.infinispan.server.hotrod.HotRodDecoder.channelRead(HotRodDecoder.scala:32)
> at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
> at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
> at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846)
> at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:130)
> at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
> at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
> at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
> at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
> at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
> at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
> at java.lang.Thread.run(Thread.java:745)
> {code}
> If the javascript is changed to be:
> {code}
> // mode=local,language=javascript,datatype='text/plain; charset=utf-8'
> cache.put("a", "a");
> cache.get("a")
> {code}
> then everything works fine.
> The test verifying this use case is:
> {code}
> it('can execute a script remotely to get node address from cacheManager', function(done) {
> Promise.all([client, readFile('spec/utils/test-cacheManager.js')])
> .then(function(vals) {
> var c = vals[0];
> return c.addScript('test-cacheManager.js', vals[1].toString())
> .then(function() { return c; } );
> })
> .then(t.assert(t.exec('test-cacheManager.js'),
> t.toBe('a')))
> .catch(failed(done)).finally(done);
> });
> {code}
> UPDATE:
> The exception is thrown not only in case of cacheManager usage. It is also thrown while using marshaller, or adding a simple line in the executed script like:
> var a = null;
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 6 months
[JBoss JIRA] (ISPN-6441) Parameters are not passed to JavaScript over js-client in case of mode=distributed
by Anna Manukyan (JIRA)
[ https://issues.jboss.org/browse/ISPN-6441?page=com.atlassian.jira.plugin.... ]
Anna Manukyan commented on ISPN-6441:
-------------------------------------
Maybe related to ISPN-6300. Couldn't test with cacheManager as in case of javascript modification, the server gives the error described in ISPN-6407.
> Parameters are not passed to JavaScript over js-client in case of mode=distributed
> ----------------------------------------------------------------------------------
>
> Key: ISPN-6441
> URL: https://issues.jboss.org/browse/ISPN-6441
> Project: Infinispan
> Issue Type: Bug
> Components: Remote Protocols
> Reporter: Anna Manukyan
> Assignee: Galder Zamarreño
>
> When trying to execute a javascript on a cluster with "mode=distributed", the client gives the following error:
> {code}
> java.util.concurrent.ExecutionException: org.infinispan.remoting.RemoteException: ISPN000217: Received exception from node1, see cause for remote stack trace
> org.infinispan.remoting.RemoteException: ISPN000217: Received exception from node1, see cause for remote stack trace
> org.infinispan.commons.marshall.NotSerializableException: jdk.nashorn.api.scripting.ScriptObjectMirror
> an exception which occurred:
> in field ecmaError
> in field cause
> in field cause
> in object org.infinispan.commons.CacheException@2800248d
> in object org.infinispan.remoting.responses.ExceptionResponse@552fdef2
> Stacktrace:
> undefined
> {code}
> The script which is needed to be executed on server is:
> {code}
> // mode=distributed,language=javascript,parameters=[k, v],datatype='text/plain; charset=utf-8'
> cache.put(k, v);
> cache.get(k);
> {code}
> The test code running the script is:
> {code}
> it('can execute a script remotely to store and retrieve data in distributed mode', function(done) {
> Promise.all([client, readFile('spec/utils/typed-put-get-dist.js')])
> .then(function(vals) {
> var c = vals[0];
> return c.addScript('typed-put-get-dist.js', vals[1].toString())
> .then(function() { return c; } );
> })
> .then(t.assert(t.exec('typed-put-get-dist.js', {k: 'typed-key', v: 'typed-value'}),
> t.toContain(['typed-value', 'typed-value', 'typed-value'])))
> .catch(t.failed(done)).finally(done);
> });
> {code}
> The exception which is thrown on the server is:
> {code}
> 19:50:42,927 WARN [org.infinispan.remoting.inboundhandler.NonTotalOrderPerCacheInboundInvocationHandler] (remote-thread--p2-t5) ISPN000071: Caught exception when handling command DistributedExecuteCommand [cache=Cache 'default'@node1, keys=[], callable=org.infinispan.scripting.impl.DistributedScript@2b11e2b8]: org.infinispan.commons.CacheException: ISPN026003: Script execution error
> at org.infinispan.scripting.impl.ScriptingManagerImpl.execute(ScriptingManagerImpl.java:206)
> at org.infinispan.scripting.impl.DistributedScript.call(DistributedScript.java:30)
> at org.infinispan.commands.read.DistributedExecuteCommand.perform(DistributedExecuteCommand.java:107)
> at org.infinispan.remoting.inboundhandler.BasePerCacheInboundInvocationHandler.invokePerform(BasePerCacheInboundInvocationHandler.java:92)
> at org.infinispan.remoting.inboundhandler.BaseBlockingRunnable.run(BaseBlockingRunnable.java:34)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: javax.script.ScriptException: ReferenceError: "k" is not defined in <eval> at line number 2
> at jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:467)
> at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:423)
> at jdk.nashorn.api.scripting.NashornScriptEngine.access$300(NashornScriptEngine.java:73)
> at jdk.nashorn.api.scripting.NashornScriptEngine$3.eval(NashornScriptEngine.java:511)
> at javax.script.CompiledScript.eval(CompiledScript.java:92)
> at org.infinispan.scripting.impl.ScriptingManagerImpl.execute(ScriptingManagerImpl.java:198)
> ... 7 more
> Caused by: <eval>:2 ReferenceError: "k" is not defined
> at jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:57)
> at jdk.nashorn.internal.runtime.ECMAErrors.referenceError(ECMAErrors.java:319)
> at jdk.nashorn.internal.runtime.ECMAErrors.referenceError(ECMAErrors.java:291)
> at jdk.nashorn.internal.objects.Global.__noSuchProperty__(Global.java:1432)
> at jdk.nashorn.internal.scripts.Script$\^eval\_.:program(<eval>:2)
> at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:640)
> at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:228)
> at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
> at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:418)
> ... 11 more
> {code}
> By the way, the test is run on the cluster consisting of 3 nodes. The default cache is used, which is:
> {code}
> <distributed-cache name="default" mode="SYNC" segments="20" owners="2" remote-timeout="30000" start="EAGER">
> <locking acquire-timeout="30000" concurrency-level="1000" striping="false"/>
> <transaction mode="NONE"/>
> </distributed-cache>
> {code}
> As the "mode" attribute is set to "distributed" in the script, it should run on all nodes. But the exception is thrown only on 2 of them (I guess due to owners is set to 2) . Not sure if this is a bug, so decided to mention it here.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 6 months
[JBoss JIRA] (ISPN-6441) Parameters are not passed to JavaScript over js-client in case of mode=distributed
by Anna Manukyan (JIRA)
Anna Manukyan created ISPN-6441:
-----------------------------------
Summary: Parameters are not passed to JavaScript over js-client in case of mode=distributed
Key: ISPN-6441
URL: https://issues.jboss.org/browse/ISPN-6441
Project: Infinispan
Issue Type: Bug
Components: Remote Protocols
Reporter: Anna Manukyan
Assignee: Galder Zamarreño
When trying to execute a javascript on a cluster with "mode=distributed", the client gives the following error:
{code}
java.util.concurrent.ExecutionException: org.infinispan.remoting.RemoteException: ISPN000217: Received exception from node1, see cause for remote stack trace
org.infinispan.remoting.RemoteException: ISPN000217: Received exception from node1, see cause for remote stack trace
org.infinispan.commons.marshall.NotSerializableException: jdk.nashorn.api.scripting.ScriptObjectMirror
an exception which occurred:
in field ecmaError
in field cause
in field cause
in object org.infinispan.commons.CacheException@2800248d
in object org.infinispan.remoting.responses.ExceptionResponse@552fdef2
Stacktrace:
undefined
{code}
The script which is needed to be executed on server is:
{code}
// mode=distributed,language=javascript,parameters=[k, v],datatype='text/plain; charset=utf-8'
cache.put(k, v);
cache.get(k);
{code}
The test code running the script is:
{code}
it('can execute a script remotely to store and retrieve data in distributed mode', function(done) {
Promise.all([client, readFile('spec/utils/typed-put-get-dist.js')])
.then(function(vals) {
var c = vals[0];
return c.addScript('typed-put-get-dist.js', vals[1].toString())
.then(function() { return c; } );
})
.then(t.assert(t.exec('typed-put-get-dist.js', {k: 'typed-key', v: 'typed-value'}),
t.toContain(['typed-value', 'typed-value', 'typed-value'])))
.catch(t.failed(done)).finally(done);
});
{code}
The exception which is thrown on the server is:
{code}
19:50:42,927 WARN [org.infinispan.remoting.inboundhandler.NonTotalOrderPerCacheInboundInvocationHandler] (remote-thread--p2-t5) ISPN000071: Caught exception when handling command DistributedExecuteCommand [cache=Cache 'default'@node1, keys=[], callable=org.infinispan.scripting.impl.DistributedScript@2b11e2b8]: org.infinispan.commons.CacheException: ISPN026003: Script execution error
at org.infinispan.scripting.impl.ScriptingManagerImpl.execute(ScriptingManagerImpl.java:206)
at org.infinispan.scripting.impl.DistributedScript.call(DistributedScript.java:30)
at org.infinispan.commands.read.DistributedExecuteCommand.perform(DistributedExecuteCommand.java:107)
at org.infinispan.remoting.inboundhandler.BasePerCacheInboundInvocationHandler.invokePerform(BasePerCacheInboundInvocationHandler.java:92)
at org.infinispan.remoting.inboundhandler.BaseBlockingRunnable.run(BaseBlockingRunnable.java:34)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.script.ScriptException: ReferenceError: "k" is not defined in <eval> at line number 2
at jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:467)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:423)
at jdk.nashorn.api.scripting.NashornScriptEngine.access$300(NashornScriptEngine.java:73)
at jdk.nashorn.api.scripting.NashornScriptEngine$3.eval(NashornScriptEngine.java:511)
at javax.script.CompiledScript.eval(CompiledScript.java:92)
at org.infinispan.scripting.impl.ScriptingManagerImpl.execute(ScriptingManagerImpl.java:198)
... 7 more
Caused by: <eval>:2 ReferenceError: "k" is not defined
at jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:57)
at jdk.nashorn.internal.runtime.ECMAErrors.referenceError(ECMAErrors.java:319)
at jdk.nashorn.internal.runtime.ECMAErrors.referenceError(ECMAErrors.java:291)
at jdk.nashorn.internal.objects.Global.__noSuchProperty__(Global.java:1432)
at jdk.nashorn.internal.scripts.Script$\^eval\_.:program(<eval>:2)
at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:640)
at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:228)
at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:418)
... 11 more
{code}
By the way, the test is run on the cluster consisting of 3 nodes. The default cache is used, which is:
{code}
<distributed-cache name="default" mode="SYNC" segments="20" owners="2" remote-timeout="30000" start="EAGER">
<locking acquire-timeout="30000" concurrency-level="1000" striping="false"/>
<transaction mode="NONE"/>
</distributed-cache>
{code}
As the "mode" attribute is set to "distributed" in the script, it should run on all nodes. But the exception is thrown only on 2 of them (I guess due to owners is set to 2) . Not sure if this is a bug, so decided to mention it here.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 6 months
[JBoss JIRA] (ISPN-6359) DistTopKeyTest.testPut random failures
by Pedro Ruivo (JIRA)
[ https://issues.jboss.org/browse/ISPN-6359?page=com.atlassian.jira.plugin.... ]
Pedro Ruivo commented on ISPN-6359:
-----------------------------------
I was able to reproduce it locally with trace logs. the problem occurs because the {{TxCompletionNotificationCommand}} is sent async and when the put happens, the key may be locked originating the contention :) Working in a fix...
> DistTopKeyTest.testPut random failures
> ---------------------------------------
>
> Key: ISPN-6359
> URL: https://issues.jboss.org/browse/ISPN-6359
> Project: Infinispan
> Issue Type: Bug
> Components: Core
> Affects Versions: 8.2.0.Final
> Reporter: Dan Berindei
> Assignee: Pedro Ruivo
> Fix For: 9.0.0.Alpha1
>
>
> {noformat}
> java.lang.AssertionError: Wrong number of contented keys expected [0] but found [1]
> at org.testng.Assert.fail(Assert.java:94)
> at org.testng.Assert.failNotEquals(Assert.java:494)
> at org.testng.Assert.assertEquals(Assert.java:123)
> at org.testng.Assert.assertEquals(Assert.java:265)
> at org.infinispan.stats.BaseClusterTopKeyTest.assertTopKeyLockContented(BaseClusterTopKeyTest.java:282)
> at org.infinispan.stats.BaseClusterTopKeyTest.assertLockInformation(BaseClusterTopKeyTest.java:293)
> at org.infinispan.stats.BaseClusterTopKeyTest.testPut(BaseClusterTopKeyTest.java:75)
> {noformat}
> Example failure in CI: http://ci.infinispan.org/viewLog.html?buildId=37214&buildTypeId=bt9&tab=b...
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 6 months
[JBoss JIRA] (ISPN-6437) InfinispanLock.LockPlaceHolder sometimes doesn't invoke its listeners
by Pedro Ruivo (JIRA)
[ https://issues.jboss.org/browse/ISPN-6437?page=com.atlassian.jira.plugin.... ]
Pedro Ruivo commented on ISPN-6437:
-----------------------------------
I've re-double-check the code and I don't see how it is possible to check the {{LockState}} without the {{compareAndSet}}. Needs more investigation
> InfinispanLock.LockPlaceHolder sometimes doesn't invoke its listeners
> ---------------------------------------------------------------------
>
> Key: ISPN-6437
> URL: https://issues.jboss.org/browse/ISPN-6437
> Project: Infinispan
> Issue Type: Bug
> Components: Core, Test Suite - Core
> Affects Versions: 8.2.0.Final
> Reporter: Dan Berindei
> Assignee: Pedro Ruivo
> Labels: testsuite_stability
> Fix For: 9.0.0.Alpha1
>
> Attachments: LocalTopKeyTest.log.gz
>
>
> When {{InfinispanLock.LockPlaceHolder.lock()}} times out in the {{await()}} call, it doesn't CAS the state and it doesn't run the listeners.
> Listeners are used by the extended statistics module, and missed invocations cause random failures in {{LocalTopKeyTest}}:
> {noformat}
> 17:44:50,412 TRACE (testng-LocalTopKeyTest:[___defaultcache]) [DefaultLockManager] Lock key=key for owner=GlobalTransaction:<null>:34:local. timeout=100 (MILLISECONDS)
> 17:44:50,412 TRACE (testng-LocalTopKeyTest:[___defaultcache]) [InfinispanLock] Acquire lock for GlobalTransaction:<null>:34:local. Timeout=100 (MILLISECONDS)
> 17:44:50,412 TRACE (testng-LocalTopKeyTest:[___defaultcache]) [InfinispanLock] Created a new one: LockPlaceHolder{lockState=WAITING, owner=GlobalTransaction:<null>:34:local}
> 17:44:50,412 TRACE (testng-LocalTopKeyTest:[___defaultcache]) [InfinispanLock] Try acquire. Next in queue=LockPlaceHolder{lockState=WAITING, owner=GlobalTransaction:<null>:34:local}. Current=LockPlaceHolder{lockState=ACQUIRED, owner=GlobalTransaction:<null>:33:local}
> 17:44:50,412 TRACE (testng-LocalTopKeyTest:[___defaultcache]) [InfinispanLock] Unable to acquire. Lock is held.
> 17:44:50,515 ERROR (testng-LocalTopKeyTest:[___defaultcache]) [InvocationContextInterceptor] ISPN000136: Error executing command VersionedPrepareCommand, writing keys [key]
> org.infinispan.util.concurrent.TimeoutException: ISPN000299: Unable to acquire lock after 100 milliseconds for key key and requestor GlobalTransaction:<null>:34:local. Lock is held by GlobalTransaction:<null>:33:local
> at org.infinispan.util.concurrent.locks.impl.DefaultLockManager$KeyAwareExtendedLockPromise.lock(DefaultLockManager.java:236) ~[infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.interceptors.locking.AbstractLockingInterceptor.lockAllAndRecord(AbstractLockingInterceptor.java:200) ~[infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.checkPendingAndLockAllKeys(AbstractTxLockingInterceptor.java:200) ~[infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.lockAllOrRegisterBackupLock(AbstractTxLockingInterceptor.java:166) ~[infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.interceptors.locking.OptimisticLockingInterceptor.visitPrepareCommand(OptimisticLockingInterceptor.java:70) ~[infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:176) ~[infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:99) ~[infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.interceptors.TxInterceptor.invokeNextInterceptorAndVerifyTransaction(TxInterceptor.java:153) ~[infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.interceptors.TxInterceptor.visitPrepareCommand(TxInterceptor.java:140) ~[infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:176) ~[infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:99) ~[infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.stats.topK.LocalTopKeyTest$PrepareCommandBlocker.visitPrepareCommand(LocalTopKeyTest.java:229) ~[test-classes/:?]
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:176) ~[infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:99) ~[infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.stats.topK.CacheUsageInterceptor.visitPrepareCommand(CacheUsageInterceptor.java:78) ~[classes/:?]
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:176) ~[infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:99) ~[infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:113) ~[infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:112) ~[infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:176) ~[infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:99) ~[infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:110) [infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:79) [infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:112) [infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:176) [infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:335) [infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.transaction.impl.TransactionCoordinator.prepare(TransactionCoordinator.java:121) [infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.transaction.impl.TransactionCoordinator.prepare(TransactionCoordinator.java:104) [infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.transaction.xa.TransactionXaAdapter.commit(TransactionXaAdapter.java:111) [infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord.topLevelOnePhaseCommit(XAResourceRecord.java:698) [narayana-jta-5.0.4.Final.jar:5.0.4.Final (revision: b4060)]
> at com.arjuna.ats.arjuna.coordinator.BasicAction.onePhaseCommit(BasicAction.java:2364) [narayana-jta-5.0.4.Final.jar:5.0.4.Final (revision: b4060)]
> at com.arjuna.ats.arjuna.coordinator.BasicAction.End(BasicAction.java:1518) [narayana-jta-5.0.4.Final.jar:5.0.4.Final (revision: b4060)]
> at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:96) [narayana-jta-5.0.4.Final.jar:5.0.4.Final (revision: b4060)]
> at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162) [narayana-jta-5.0.4.Final.jar:5.0.4.Final (revision: b4060)]
> at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1200) [narayana-jta-5.0.4.Final.jar:5.0.4.Final (revision: b4060)]
> at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126) [narayana-jta-5.0.4.Final.jar:5.0.4.Final (revision: b4060)]
> at org.infinispan.cache.impl.CacheImpl.tryCommit(CacheImpl.java:1679) [infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.cache.impl.CacheImpl.executeCommandAndCommitIfNeeded(CacheImpl.java:1636) [infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.cache.impl.CacheImpl.putInternal(CacheImpl.java:1163) [infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.cache.impl.CacheImpl.put(CacheImpl.java:1153) [infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.cache.impl.CacheImpl.put(CacheImpl.java:1699) [infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.cache.impl.CacheImpl.put(CacheImpl.java:241) [infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.stats.topK.LocalTopKeyTest.testLockFailed(LocalTopKeyTest.java:84) [test-classes/:?]
> 17:44:50,581 ERROR (testng-LocalTopKeyTest:[]) [UnitTestTestNGListener] Test testLockFailed(org.infinispan.stats.topK.LocalTopKeyTest) failed.
> java.lang.AssertionError: Wrong number of locked keys expected [2] but found [1]
> at org.testng.Assert.fail(Assert.java:94) ~[testng-6.8.8.jar:?]
> at org.testng.Assert.failNotEquals(Assert.java:494) ~[testng-6.8.8.jar:?]
> at org.testng.Assert.assertEquals(Assert.java:123) ~[testng-6.8.8.jar:?]
> at org.testng.Assert.assertEquals(Assert.java:265) ~[testng-6.8.8.jar:?]
> at org.infinispan.stats.topK.LocalTopKeyTest.assertTopKeyLocked(LocalTopKeyTest.java:188) ~[test-classes/:?]
> at org.infinispan.stats.topK.LocalTopKeyTest.assertLockInformation(LocalTopKeyTest.java:204) ~[test-classes/:?]
> at org.infinispan.stats.topK.LocalTopKeyTest.testLockFailed(LocalTopKeyTest.java:96) ~[test-classes/:?]
> {noformat}
> {{Log.unableToAcquireLock}} doesn't log the cause exception, but it seems unlikely that the timeout came from somewhere else.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 6 months
[JBoss JIRA] (ISPN-6437) InfinispanLock.LockPlaceHolder sometimes doesn't invoke its listeners
by Pedro Ruivo (JIRA)
[ https://issues.jboss.org/browse/ISPN-6437?page=com.atlassian.jira.plugin.... ]
Pedro Ruivo updated ISPN-6437:
------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request: https://github.com/infinispan/infinispan/pull/4185
> InfinispanLock.LockPlaceHolder sometimes doesn't invoke its listeners
> ---------------------------------------------------------------------
>
> Key: ISPN-6437
> URL: https://issues.jboss.org/browse/ISPN-6437
> Project: Infinispan
> Issue Type: Bug
> Components: Core, Test Suite - Core
> Affects Versions: 8.2.0.Final
> Reporter: Dan Berindei
> Assignee: Pedro Ruivo
> Labels: testsuite_stability
> Fix For: 9.0.0.Alpha1
>
> Attachments: LocalTopKeyTest.log.gz
>
>
> When {{InfinispanLock.LockPlaceHolder.lock()}} times out in the {{await()}} call, it doesn't CAS the state and it doesn't run the listeners.
> Listeners are used by the extended statistics module, and missed invocations cause random failures in {{LocalTopKeyTest}}:
> {noformat}
> 17:44:50,412 TRACE (testng-LocalTopKeyTest:[___defaultcache]) [DefaultLockManager] Lock key=key for owner=GlobalTransaction:<null>:34:local. timeout=100 (MILLISECONDS)
> 17:44:50,412 TRACE (testng-LocalTopKeyTest:[___defaultcache]) [InfinispanLock] Acquire lock for GlobalTransaction:<null>:34:local. Timeout=100 (MILLISECONDS)
> 17:44:50,412 TRACE (testng-LocalTopKeyTest:[___defaultcache]) [InfinispanLock] Created a new one: LockPlaceHolder{lockState=WAITING, owner=GlobalTransaction:<null>:34:local}
> 17:44:50,412 TRACE (testng-LocalTopKeyTest:[___defaultcache]) [InfinispanLock] Try acquire. Next in queue=LockPlaceHolder{lockState=WAITING, owner=GlobalTransaction:<null>:34:local}. Current=LockPlaceHolder{lockState=ACQUIRED, owner=GlobalTransaction:<null>:33:local}
> 17:44:50,412 TRACE (testng-LocalTopKeyTest:[___defaultcache]) [InfinispanLock] Unable to acquire. Lock is held.
> 17:44:50,515 ERROR (testng-LocalTopKeyTest:[___defaultcache]) [InvocationContextInterceptor] ISPN000136: Error executing command VersionedPrepareCommand, writing keys [key]
> org.infinispan.util.concurrent.TimeoutException: ISPN000299: Unable to acquire lock after 100 milliseconds for key key and requestor GlobalTransaction:<null>:34:local. Lock is held by GlobalTransaction:<null>:33:local
> at org.infinispan.util.concurrent.locks.impl.DefaultLockManager$KeyAwareExtendedLockPromise.lock(DefaultLockManager.java:236) ~[infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.interceptors.locking.AbstractLockingInterceptor.lockAllAndRecord(AbstractLockingInterceptor.java:200) ~[infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.checkPendingAndLockAllKeys(AbstractTxLockingInterceptor.java:200) ~[infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.lockAllOrRegisterBackupLock(AbstractTxLockingInterceptor.java:166) ~[infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.interceptors.locking.OptimisticLockingInterceptor.visitPrepareCommand(OptimisticLockingInterceptor.java:70) ~[infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:176) ~[infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:99) ~[infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.interceptors.TxInterceptor.invokeNextInterceptorAndVerifyTransaction(TxInterceptor.java:153) ~[infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.interceptors.TxInterceptor.visitPrepareCommand(TxInterceptor.java:140) ~[infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:176) ~[infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:99) ~[infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.stats.topK.LocalTopKeyTest$PrepareCommandBlocker.visitPrepareCommand(LocalTopKeyTest.java:229) ~[test-classes/:?]
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:176) ~[infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:99) ~[infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.stats.topK.CacheUsageInterceptor.visitPrepareCommand(CacheUsageInterceptor.java:78) ~[classes/:?]
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:176) ~[infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:99) ~[infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:113) ~[infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:112) ~[infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:176) ~[infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:99) ~[infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:110) [infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:79) [infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:112) [infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:176) [infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:335) [infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.transaction.impl.TransactionCoordinator.prepare(TransactionCoordinator.java:121) [infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.transaction.impl.TransactionCoordinator.prepare(TransactionCoordinator.java:104) [infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.transaction.xa.TransactionXaAdapter.commit(TransactionXaAdapter.java:111) [infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord.topLevelOnePhaseCommit(XAResourceRecord.java:698) [narayana-jta-5.0.4.Final.jar:5.0.4.Final (revision: b4060)]
> at com.arjuna.ats.arjuna.coordinator.BasicAction.onePhaseCommit(BasicAction.java:2364) [narayana-jta-5.0.4.Final.jar:5.0.4.Final (revision: b4060)]
> at com.arjuna.ats.arjuna.coordinator.BasicAction.End(BasicAction.java:1518) [narayana-jta-5.0.4.Final.jar:5.0.4.Final (revision: b4060)]
> at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:96) [narayana-jta-5.0.4.Final.jar:5.0.4.Final (revision: b4060)]
> at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162) [narayana-jta-5.0.4.Final.jar:5.0.4.Final (revision: b4060)]
> at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1200) [narayana-jta-5.0.4.Final.jar:5.0.4.Final (revision: b4060)]
> at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126) [narayana-jta-5.0.4.Final.jar:5.0.4.Final (revision: b4060)]
> at org.infinispan.cache.impl.CacheImpl.tryCommit(CacheImpl.java:1679) [infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.cache.impl.CacheImpl.executeCommandAndCommitIfNeeded(CacheImpl.java:1636) [infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.cache.impl.CacheImpl.putInternal(CacheImpl.java:1163) [infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.cache.impl.CacheImpl.put(CacheImpl.java:1153) [infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.cache.impl.CacheImpl.put(CacheImpl.java:1699) [infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.cache.impl.CacheImpl.put(CacheImpl.java:241) [infinispan-core-9.0.0-SNAPSHOT.jar:9.0.0-SNAPSHOT]
> at org.infinispan.stats.topK.LocalTopKeyTest.testLockFailed(LocalTopKeyTest.java:84) [test-classes/:?]
> 17:44:50,581 ERROR (testng-LocalTopKeyTest:[]) [UnitTestTestNGListener] Test testLockFailed(org.infinispan.stats.topK.LocalTopKeyTest) failed.
> java.lang.AssertionError: Wrong number of locked keys expected [2] but found [1]
> at org.testng.Assert.fail(Assert.java:94) ~[testng-6.8.8.jar:?]
> at org.testng.Assert.failNotEquals(Assert.java:494) ~[testng-6.8.8.jar:?]
> at org.testng.Assert.assertEquals(Assert.java:123) ~[testng-6.8.8.jar:?]
> at org.testng.Assert.assertEquals(Assert.java:265) ~[testng-6.8.8.jar:?]
> at org.infinispan.stats.topK.LocalTopKeyTest.assertTopKeyLocked(LocalTopKeyTest.java:188) ~[test-classes/:?]
> at org.infinispan.stats.topK.LocalTopKeyTest.assertLockInformation(LocalTopKeyTest.java:204) ~[test-classes/:?]
> at org.infinispan.stats.topK.LocalTopKeyTest.testLockFailed(LocalTopKeyTest.java:96) ~[test-classes/:?]
> {noformat}
> {{Log.unableToAcquireLock}} doesn't log the cause exception, but it seems unlikely that the timeout came from somewhere else.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 6 months