Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4180353

Object Serialization throws internal error during deserializing a large array

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P2 P2
    • None
    • 1.1.7
    • core-libs
    • None

      Apparently, Object Serialization throws an internal error when trying
      to deserialize a large array. The size at which this error is thrown
      increases with an increase in the max size of the heap the JVM is
      started with.

      The program traced below merely writes out on an ObjectOutputStream
      (built atop a socket) an object which happens to be an int[] of size
      controlled by the command line parameter; the process on the other
      side attempts to read it in. There is no difficulty in achieving this
      for arrays of size upto 1M. At 1.5M and above I start getting some
      internal error being thrown.
       
      denali.research.att.com% java Matrix.smi.examples.PingClient 1000000

      Starting client...
      Should print [I@1dce09ae.
      Started rmi at 904381264139.
      Stopped rmi at 904381279091.
      Result: true
      ...done

      denali.research.att.com% java Matrix.smi.examples.PingClient 2000000

      Starting client...
      Should print [I@1dce09ae.
      Started rmi at 904381657297.
      java.lang.NullPointerException
      at java.io.ObjectInputStream.inputArray(ObjectInputStream.java)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java)
      at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java)
      at java.io.ObjectInputStream.inputObject(ObjectInputStream.java)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java)
      at Matrix.smi.ObjectStreamReader.read(ObjectStreamReader.java:44)
      at Matrix.smi.Connection.read(Connection.java:93)
      at Matrix.smi.Session.read(Session.java:302)
      at Matrix.smi.Session$1.run(Session.java:95)
      ^C

      denali.research.att.com% denali.research.att.com% java

      Matrix.smi.examples.PingClient 1500000
      Starting client...
      Should print [I@1dce09ae.
      Started rmi at 904381699373.
      java.lang.NullPointerException
      at java.io.ObjectInputStream.inputArray(ObjectInputStream.java)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java)
      at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java)
      at java.io.ObjectInputStream.inputObject(ObjectInputStream.java)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java)
      at Matrix.smi.ObjectStreamReader.read(ObjectStreamReader.java:44)
      at Matrix.smi.Connection.read(Connection.java:93)
      at Matrix.smi.Session.read(Session.java:302)
      at Matrix.smi.Session$1.run(Session.java:95)
      ^C

      denali.research.att.com% denali.research.att.com%

            jfialli Joe Fialli
            mthakore Mayank Thakore (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: