recurseDecode cause java.lang.OutOfMemoryError: Java heap space

Help
Jannle
2014-06-13
2014-06-17
  • Jannle

    Jannle - 2014-06-13

    Hi Vikram,
    How are you doing?
    I have been seeing some exception when trying to query some specific hosts using JInterop, basically is seems like the decoder is trying to decode recursively and initiate large array instance, which finally leads to outofmemory error.
    See the following related stack trace:
    java.lang.OutOfMemoryError: Java heap space
    at java.lang.reflect.Array.newArray(Native Method)
    at java.lang.reflect.Array.newInstance(Array.java:70)
    at org.jinterop.dcom.core.JIArray.recurseDecode(JIArray.java:606)
    at org.jinterop.dcom.core.JIArray.decode(JIArray.java:593)
    at
    org.jinterop.dcom.core.JIMarshalUnMarshalHelper.deSerialize(JIMarshalUnMarshalHelper.java:271)
    at org.jinterop.dcom.core.JICallBuilder.readPacket(JICallBuilder.java:1021)
    at org.jinterop.dcom.core.JICallBuilder.read(JICallBuilder.java:966)
    at ndr.NdrObject.decode(NdrObject.java:36)

    Any help would be really appreciated.
    Thanks.
    Enlin

     
  • Jannle

    Jannle - 2014-06-16

    Vikram, any help would be really appreciated. thanks.

     
    • Vikram Roopchand

      Hi,

      Sorry we have been extremely busy in the past days. Did you try increasing
      the VM heap ? (min/max memory) ... Would you have an idea how big is the
      array really ?

      best regards,
      Vikram

      On Mon, Jun 16, 2014 at 8:19 PM, Jannle jannle@users.sf.net wrote:

      Vikram, any help would be really appreciated. thanks.

      recurseDecode cause java.lang.OutOfMemoryError: Java heap space
      https://sourceforge.net/p/j-interop/discussion/600730/thread/ec076887/?limit=25#f5dd


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/j-interop/discussion/600730/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

      --
      The Mind is a place of its own. It can make a heaven out of hell or a hell
      out of heaven. Attitude is everything. No matter how adverse conditions
      maybe, one has the capacity to turn things around by one's Determination,
      Perseverance and Hardwork.

      John Milton
      (Paradise Lost)

       
      • Jannle

        Jannle - 2014-06-16

        Hi Vikram,
        Thanks for getting back to me.
        Actually when this happens, the memory grows dramatically. Memory usage grew from 2GB to 10GB+ while it is happening. Although the GC will clean up the memory pretty soon, but the program still blew up during the process.

        Would you please give me some hints why this might happen?

        Thanks a lot indeed.
        Enlin

         
        • Vikram Roopchand

          Hi,

          I would need more information before forming a hypothesis. What is the data
          type of the array you are expecting back and would you happen to know the
          expected size? Also can you please dump the array part of the code here?

          Best regards,
          Vikram

          Hi Vikram,
          Thanks for getting back to me.
          Actually when this happens, the memory grows dramatically. Memory usage
          grew from 2GB to 10GB+ while it is happening. Although the GC will clean up
          the memory pretty soon, but the program still blew up during the process.

          Would you please give me some hints why this might happen?

          Thanks a lot indeed.
          Enlin


          recurseDecode cause java.lang.OutOfMemoryError: Java heap space
          https://sourceforge.net/p/j-interop/discussion/600730/thread/ec076887/?limit=25#f5dd/310e/dccd


          Sent from sourceforge.net because you indicated interest in
          https://sourceforge.net/p/j-interop/discussion/600730/

          To unsubscribe from further messages, please visit
          https://sourceforge.net/auth/subscriptions/

           

Log in to post a comment.