IBM Support

IX90156: OUTOFMEMORYERROR THROWN FROM CDRREADER.READBYTESFORSTRING

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

APAR status

  • Closed as program error.

Error description

  • Error Message: "java/lang/OutOfMemoryError" - "Java heap space"
    received
    .
    Stack Trace: 3XMTHREADINFO      "WebContainer : 25"
    J9VMThread:0x0000000083D81200, j9thread_t:0x00007F947293DAB0,
    java/lang/Thread:0x0000000010731838, state:R,
    prio=53XMJAVALTHREAD            (java/lang/Thread getId:0xD50,
    isDaemon:true)3XMTHREADINFO1            (native thread
    ID:0x7589, native priority:0x5, native
    policy:UNKNOWN)3XMTHREADINFO2            (native stack address
    range from:0x00007F9489C39000, to:0x00007F9489C7A000,
    size:0x41000)3XMTHREADINFO3           Java
    callstack:4XESTACKTRACE                at
    com/ibm/rmi/iiop/CDRReader.readBytesForString(CDRReader.java:239
    4(Compiled Code))4XESTACKTRACE                at
    com/ibm/rmi/iiop/CDRReader.readStringOrIndirection(CDRReader.jav
    a:496(Compiled Code))4XESTACKTRACE                at
    com/ibm/rmi/iiop/CDRReader.read_string(CDRReader.java:489(Compil
    ed Code))4XESTACKTRACE                at
    com/ibm/rmi/IOR.read(IOR.java:350(Compiled Code))4XESTACKTRACE
                 at
    com/ibm/rmi/iiop/CDRReader.read_Object(CDRReader.java:1129(Compi
    led Code))4XESTACKTRACE                at
    com/ibm/rmi/iiop/CDRReader.fast_read_abstract_interface(CDRReade
    r.java:1930(Compiled Code))4XESTACKTRACE                at
    com/ibm/rmi/iiop/CDRReader.fast_read_abstract_interface(CDRReade
    r.java:1918(Compiled Code))4XESTACKTRACE                at
    com/ibm/rmi/io/IIOPInputStream.readObjectDelegate(IIOPInputStrea
    m.java:392(Compiled Code))4XESTACKTRACE                at
    com/ibm/rmi/io/IIOPInputStream.readObjectOverride(IIOPInputStrea
    m.java:663(Compiled Code))4XESTACKTRACE                at
    java/io/ObjectInputStream.readObject(ObjectInputStream.java:347(
    Compiled Code))4XESTACKTRACE                at
    java/util/HashMap.readObject(HashMap.java:953(Compiled
    Code))4XESTACKTRACE                at
    sun/reflect/GeneratedMethodAccessor114.invoke(Bytecode
    PC:40(Compiled Code))4XESTACKTRACE                at
    sun/reflect/DelegatingMethodAccessorImpl.invoke(DelegatingMethod
    AccessorImpl.java:25(Compiled Code))4XESTACKTRACE
    at java/lang/reflect/Method.invoke(Method.java:600(Compiled
    Code))4XESTACKTRACE                at
    com/ibm/rmi/io/IIOPInputStream.invokeObjectReader(IIOPInputStrea
    m.java:1775(Compiled Code))
    .
    Under rare circumstance the same issue can formulate itself as a
    CORBA MARSHAL exception rather than OutOfMemoryError.
    

Local fix

  • From the stack trace, we can see that ORB tried to allocate a
    large string while trying to read a Hashmap
    -java/util/HashMap.readObject. Application code needs to be
    modified to ensure that they are thread-safe for
    serialization. Note that, similar errors can also be seen for
    other non thread-safe collections.
    

Problem summary

  • This problem is caused when an HashMap is modified (Values added
    or removed) while it is being marshalled. While marshalling ORB
    first writes the size of the HashMap to the stream and then the
    key-value pairs. When an hashmap is modified while it is being
    serialized the data written is inconsistent and ORB trips while
    trying to read the additional or missing key-value pair.This
    issue is also applicable to other collection objects which are
    not thread safe.
    

Problem conclusion

  • ORB cannot determine whether a collection object was modified
    while being marshalled, however we have added better error
    handling, Rather than trying to allocate huge strings which lead
    to OOM, ORB will discard such requests and log ffdc
    appropriately.This fix will only ensure that application doesnt
    terminates abruptly with OOM. Application code still needs to be
    changed to address the thread safety issue.
    .
    This APAR will be fixed in the following Java Releases:
       6 R1 SR8 FP3   (6.1.8.3)
       7    SR8 FP10  (7.0.8.10)
       7 R1 SR2 FP10  (7.1.2.10)
       6    SR16 FP3  (6.0.16.3)
    .
    Contact your IBM Product's Service Team for these Service
    Refreshes and Fix Packs.
    For those running stand-alone, information about the Service
    Refreshes and Fix Packs can be found at:
               https://www.ibm.com/developerworks/java/jdk/
    

Temporary fix

Comments

APAR Information

  • APAR number

    IX90156

  • Reported component name

    ORB

  • Reported component ID

    620700123

  • Reported release

    260

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2014-12-03

  • Closed date

    2014-12-03

  • Last modified date

    2014-12-03

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    ORB

  • Fixed component ID

    620700123

Applicable component levels

  • R260 PSY

       UP

  • R600 PSY

       UP



Document information

More support for: Runtimes for Java Technology
ORB

Software version: 260

Reference #: IX90156

Modified date: 03 December 2014