IBM Support

IV50065: UNSYNCHRONIZED CONCURRENT ACCESSES TO ARRAYLIST CAUSES JVM CRASH

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: The JVM raises a GPF or crashes during object
    allocation or garbage collection, if multiple threads have tried
    to use an ArrayList object without synchronization. Post-mortem
    analysis reveals that the value in the object's "size" field and
    the actual length of the underlying array have become
    inconsistent, which can cause heap corruption.
    .
    Stack Trace: Native call stack:
        MM_ParallelScavenger::scavengeRememberedSetList+0x98
        MM_ParallelScavenger::workThreadGarbageCollect+0x38
        MM_Dispatcher::run+0x35
        MM_ParallelScavenger::scavenge+0x6e
        MM_Scavenger::masterThreadGarbageCollect+0xc7
        MM_Scavenger::internalGarbageCollect+0x71d
        MM_ParallelScavenger::internalGarbageCollect+0x1f
        MM_Collector::garbageCollect+0x214
        MM_MemorySubSpaceSemiSpace::allocationRequestFailed+0x133
        MM_MemorySubSpaceGeneric::allocateTLH+0x58
        MM_TLHAllocationInterface::refresh+0x27c
        MM_TLHAllocationInterface::allocateFromTLH+0xab
        MM_TLHAllocationInterface::allocateObject+0xfe
        MM_MixedObjectAllocationModel::allocateMixedObject+0xb4
        J9AllocateObject+0xd5
        jitNewObject+0xb1b
    .
    

Local fix

  • This problem can be avoided with the
    -Xjit:exclude={java/util/ArrayList.*},dontInline={java/util/Arra
    yList.*} option. The program should then throw an exception
    instead of quietly corrupting the heap. It is the developer's
    responsibility to ensure that ArrayList accesses are
    synchronized, according to the API. Note that the workaround may
    cause a noticeable performance degradation.
    

Problem summary

  • The problem is caused when an ArrayList object is modified by
    multiple threads at the same time. This will normally cause an
    ArrayIndexOutOfBoundsException but the JIT compiler is
    incorrectly removing the exception check.
    

Problem conclusion

  • This defect will be fixed in:
    7.0.0 SR6
    6.0.1 SR7
    6.0.0 SR15
    .
    The JIT compiler has been updated to generate bounds check for
    ArrayList methods correctly. A new
    -Xjit:disableRecognizedMethods option has been introduced to
    suppress similar optimizations.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV50065

  • Reported component name

    JIT

  • Reported component ID

    620700124

  • Reported release

    260

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-09-26

  • Closed date

    2013-09-26

  • Last modified date

    2013-10-17

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

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

    PI09153

Fix information

  • Fixed component name

    JIT

  • Fixed component ID

    620700124

Applicable component levels

  • R260 PSY

       UP

  • R600 PSY

       UP



Document information

More support for: Runtimes for Java Technology
Just In Time (JIT) Compiler

Software version: 260

Reference #: IV50065

Modified date: 17 October 2013