<div dir="ltr">Sanne, you really need to say more, I was hoping to see more information in the PR/JIRA but both descriptions are very terse :)<div><br></div><div>If I understand correctly, the problem is that you&#39;re keeping a reference to a cache value and modifying it without a put(), which could break marshalling for a concurrent put()?</div>

<div><br></div><div>Cheers</div><div>Dan</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Aug 5, 2014 at 5:02 PM, Sanne Grinovero <span dir="ltr">&lt;<a href="mailto:sanne@infinispan.org" target="_blank">sanne@infinispan.org</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I&#39;ve figured it out.<br>
I&#39;ll not explain it yet, it&#39;s such a nice puzzler :-P<br>
@Galder you were close: let me say JGroups is the only one not related.<br>
<div class="HOEnZb"><div class="h5"><br>
On 5 August 2014 14:01, Galder Zamarreño &lt;<a href="mailto:galder@redhat.com">galder@redhat.com</a>&gt; wrote:<br>
&gt;<br>
&gt; On 05 Aug 2014, at 01:33, Sanne Grinovero &lt;<a href="mailto:sanne@infinispan.org">sanne@infinispan.org</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; I&#39;m (rarely) seeing this exception in one of my stress tests.. any<br>
&gt;&gt; clue about what could be wrong?<br>
&gt;<br>
&gt; Hmmm, it smells like a concurrency issue, e.g. buffer mixup, in either jboss marshalling, jgroups or the externalizer layer in Infinispan.<br>
&gt;<br>
&gt;&gt; I reported a similar one approx a year ago, in that case it was a<br>
&gt;&gt; value type being unmarshalled as an instance of Class (was also never<br>
&gt;&gt; resolved).<br>
&gt;<br>
&gt; ^ Do you have a JIRA for it?<br>
&gt;<br>
&gt; Please definitely create one for this new CCE.<br>
&gt;<br>
&gt; Cheers,<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; 2014-08-05 00:22:29,521 WARN  [CommandAwareRpcDispatcher]<br>
&gt;&gt; (OOB-1,main-NodeD-22196) ISPN000220: Problems un-marshalling remote<br>
&gt;&gt; command from byte buffer<br>
&gt;&gt; java.lang.ClassCastException: java.lang.String cannot be cast to<br>
&gt;&gt; org.infinispan.metadata.Metadata<br>
&gt;&gt; at org.infinispan.commands.write.PutKeyValueCommand.setParameters(PutKeyValueCommand.java:114)<br>
&gt;&gt; at org.infinispan.commands.RemoteCommandsFactory.fromStream(RemoteCommandsFactory.java:138)<br>
&gt;&gt; at org.infinispan.marshall.exts.ReplicableCommandExternalizer.readObject(ReplicableCommandExternalizer.java:85)<br>
&gt;&gt; at org.infinispan.marshall.exts.ReplicableCommandExternalizer.readObject(ReplicableCommandExternalizer.java:1)<br>
&gt;&gt; at org.infinispan.marshall.core.ExternalizerTable$ExternalizerAdapter.readObject(ExternalizerTable.java:409)<br>
&gt;&gt; at org.infinispan.marshall.core.ExternalizerTable.readObject(ExternalizerTable.java:214)<br>
&gt;&gt; at org.infinispan.marshall.core.JBossMarshaller$ExternalizerTableProxy.readObject(JBossMarshaller.java:148)<br>
&gt;&gt; at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:351)<br>
&gt;&gt; at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)<br>
&gt;&gt; at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41)<br>
&gt;&gt; at org.infinispan.marshall.exts.ReplicableCommandExternalizer.readParameters(ReplicableCommandExternalizer.java:101)<br>
&gt;&gt; at org.infinispan.marshall.exts.CacheRpcCommandExternalizer.readObject(CacheRpcCommandExternalizer.java:153)<br>
&gt;&gt; at org.infinispan.marshall.exts.CacheRpcCommandExternalizer.readObject(CacheRpcCommandExternalizer.java:1)<br>
&gt;&gt; at org.infinispan.marshall.core.ExternalizerTable$ExternalizerAdapter.readObject(ExternalizerTable.java:409)<br>
&gt;&gt; at org.infinispan.marshall.core.ExternalizerTable.readObject(ExternalizerTable.java:214)<br>
&gt;&gt; at org.infinispan.marshall.core.JBossMarshaller$ExternalizerTableProxy.readObject(JBossMarshaller.java:148)<br>
&gt;&gt; at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:351)<br>
&gt;&gt; at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)<br>
&gt;&gt; at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41)<br>
&gt;&gt; at org.infinispan.commons.marshall.jboss.AbstractJBossMarshaller.objectFromObjectStream(AbstractJBossMarshaller.java:135)<br>
&gt;&gt; at org.infinispan.marshall.core.VersionAwareMarshaller.objectFromByteBuffer(VersionAwareMarshaller.java:101)<br>
&gt;&gt; at org.infinispan.commons.marshall.AbstractDelegatingMarshaller.objectFromByteBuffer(AbstractDelegatingMarshaller.java:80)<br>
&gt;&gt; at org.infinispan.remoting.transport.jgroups.MarshallerAdapter.objectFromBuffer(MarshallerAdapter.java:28)<br>
&gt;&gt; at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.handle(CommandAwareRpcDispatcher.java:204)<br>
&gt;&gt; at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:460)<br>
&gt;&gt; at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:377)<br>
&gt;&gt; at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:250)<br>
&gt;&gt; at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:674)<br>
&gt;&gt; at org.jgroups.JChannel.up(JChannel.java:733)<br>
&gt;&gt; at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:1030)<br>
&gt;&gt; at org.jgroups.protocols.RSVP.up(RSVP.java:190)<br>
&gt;&gt; at org.jgroups.protocols.FRAG2.up(FRAG2.java:165)<br>
&gt;&gt; at org.jgroups.protocols.FlowControl.up(FlowControl.java:390)<br>
&gt;&gt; at org.jgroups.protocols.tom.TOA.up(TOA.java:121)<br>
&gt;&gt; at org.jgroups.protocols.pbcast.GMS.up(GMS.java:1041)<br>
&gt;&gt; at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:234)<br>
&gt;&gt; at org.jgroups.protocols.UNICAST3.deliverMessage(UNICAST3.java:1034)<br>
&gt;&gt; at org.jgroups.protocols.UNICAST3.handleDataReceived(UNICAST3.java:752)<br>
&gt;&gt; at org.jgroups.protocols.UNICAST3.up(UNICAST3.java:399)<br>
&gt;&gt; at org.jgroups.protocols.pbcast.NAKACK2.up(NAKACK2.java:610)<br>
&gt;&gt; at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:297)<br>
&gt;&gt; at org.jgroups.protocols.Discovery.up(Discovery.java:245)<br>
&gt;&gt; at org.jgroups.protocols.TP.passMessageUp(TP.java:1551)<br>
&gt;&gt; at <a href="http://org.jgroups.protocols.TP" target="_blank">org.jgroups.protocols.TP</a>$MyHandler.run(TP.java:1770)<br>
&gt;&gt; at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)<br>
&gt;&gt; at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)<br>
&gt;&gt; at java.lang.Thread.run(Thread.java:745)<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; infinispan-dev mailing list<br>
&gt;&gt; <a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Galder Zamarreño<br>
&gt; <a href="mailto:galder@redhat.com">galder@redhat.com</a><br>
&gt; <a href="http://twitter.com/galderz" target="_blank">twitter.com/galderz</a><br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; infinispan-dev mailing list<br>
&gt; <a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
<br>
_______________________________________________<br>
infinispan-dev mailing list<br>
<a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a></div></div></blockquote></div><br></div>