IBM Support

IJ50878: JAVA JIT: SEGV IN ARRAY COPY FOR STRINGBUFFER OR STRINGBUILDER ON POWER OR AARCH64

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: A SIG_SEGV is received when executing an
    array-copy in StringBuffer.append().
    .
    Stack Trace: {libj9jit29.so}{__codeForShortArrayCopy}
    {libj9jit29.so}{__arrayCopy}
    {libj9jit29.so}{__arrayCopy_dp}
    {java/lang/StringBuffer.append} JIT
    {org/apache/log4j/helpers/PatternParser$LiteralPatternConverter.
    format} JIT
    {org/apache/log4j/WriterAppender.subAppend} JIT
    {org/apache/log4j/Category.forcedLog} JIT
    The StringBuffer.append() is likely going to be on the stack and
    arrayCopy() JIT helper routines will be at the top of the stack.
    .
    This problem can only occur on systems where the architecture
    employs weak memory coherency. This mean POWER or AArch64. The
    issue can not occur on x86 or IBM-Z for example. The problem is
    extremely intermittent since the timing window is very small and
    it can only occur when new objects are exposed to more then one
    thread without some barrier like synchronization or the use of
    volatile fields.
    

Local fix

  • The problem can be avoided by preventing the JIT from compiling
    the StringBuffer/StringBuilder methods. This will have some
    affect on performance but the extent of that effect depends on
    how important the performance of StringBuffer/StringBuilder
    methods are to the overall performance of the application.
    -Xjit:exclude={*/StringBuffer.*<PIPE>*/StringBuilder.*},dontInli
    ne={*/StringBuffer.*<PIPE>*/StringBuilder.*}
    

Problem summary

  • The JIT compiler is removing NULL-CHECKS from
    StringBuffer/StringBuilder methods which can in rare cases
    result in a crash if the java application is exposing new object
    instances to other threads without using something to enforce
    store ordering on systems with weak memory coherency.
    

Problem conclusion

Temporary fix

Comments

APAR Information

  • APAR number

    IJ50878

  • Reported component name

    JIT

  • Reported component ID

    620700124

  • Reported release

    130

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2024-04-16

  • Closed date

    2024-04-16

  • Last modified date

    2024-04-16

  • 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

    JIT

  • Fixed component ID

    620700124

Applicable component levels

[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SSNVBF","label":"Runtimes for Java Technology"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"130","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
17 April 2024