8 Replies Latest reply on Jul 21, 2011 1:32 PM by Galder Zamarreño

    Strange data being passed to readExternal by unmarshaller

    Raman Gupta Newbie

      I have an Externalizable object that is being cached using Infinispan 4.2.1.FINAL, in async replication mode across two instances. The layout is as follows:

       

      instance 1: cluster name AAA

      instance 2: cluster name BBB

      instance 3: cluster name CCC

      instance 4: cluster name AAA, BBB, CCC

       

      i.e. instance 4 serves as a replicated cache for instance 1, 2, and 3 and is a member of all 3 infinispan clusters.

       

      At some point shortly after system startup, on instance 4 my Externalizable Object's readExternal method is called, but with data that is either corrupted or that belongs to a different type of Object. The (invalid) data passed to my Object's readExternal method by Infinispan starts with:

       

      0x 00 00 00 01 44 00 00 00 24 00 00 4E

       

      The data actually causes an OOME to be thrown by readExternal because of a very large array allocation caused by the invalid data from ObjectInput. The full stack at the point the OOME is thrown (captured via OnOutOfMemoryError and jstack) is here:

       

      https://gist.github.com/1010811

       

      This is with Infinispan 4.2.1.FINAL and Jboss Marshalling 1.2.3.GA and Jgroups 2.12.0.FINAL.

       

      I am tracing through the stack trying to determine why my application code is receiving this corrupted data from Infinispan but so far have not had any success. Any tips would be greatly appreciated.