IBM Support

IV78631: CRASH IN LIBC GETENV DURING JIT COMPILATION

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 crashes with a GPF during JIT compilation
    and the javacore shows that the crash happened in getenv.
    .
    Stack Trace: Many different stacks are possible within the JIT
    compiler, but the top entry is always libc getenv:
    4XENATIVESTACK               getenv+0xe9 (0x00007FD617FE9F19
    <OSB>libc.so.6+0x34f19<CSB>)
    .
    Note: This APAR does not fix a problem. It only reduces the
    chances of hitting a problem caused by external native code
    executing within the java process (i.e. JNI).
    

Local fix

Problem summary

  • The problem is caused by native methods adding to the
    environment variables in a multi-threaded application (Java
    applications are always multi-threaded). The libc getenv and
    putenv functions are not thread safe so while a putenv call is
    running a concurrent call to getenv is likely to encounter
    inconsistent data and fail. The JIT is one of several components
    that reads environment variables, but since it does so more
    often than most it is frequently the point of failure reported
    when this sort of crash occurs.
    

Problem conclusion

  • A new option has been provided to prevent the JIT from
    attempting to read environment variables:
    -XX:doNotProcessJitEnvVars
    This will prevent JIT calls to getenv which might otherwise be
    impacted by concurrent putenv calls.
    Note that the use of this option can not completely guarantee
    crashes in getenv will no longer occur as other parts of the JVM
    and application code may still be using getenv, but it should
    greatly reduce the frequency of crashes. By using this option
    the JIT will no longer respond to any debugging environment
    variables.
    .
    This APAR will be fixed in the following Java Releases:
       6    SR16 FP20 (6.0.16.20)
       6 R1 SR8 FP20  (6.1.8.20)
       7 R1 SR3 FP30  (7.1.3.30)
       7    SR9 FP30  (7.0.9.30)
       8    SR2 FP10  (8.0.2.10)
    .
    Contact your IBM Product's Service Team for these Service
    Refreshes and Fix Packs.
    For those running stand-alone, information about the available
    Service Refreshes and Fix Packs can be found at:
               https://www.ibm.com/developerworks/java/jdk/
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV78631

  • Reported component name

    JIT

  • Reported component ID

    620700124

  • Reported release

    600

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2015-11-05

  • Closed date

    2015-12-01

  • Last modified date

    2015-12-01

  • 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

  • R600 PSY

       UP

  • R260 PSY

       UP

  • R130 PSY

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSC9HBA","label":"Just In Time (JIT) Compiler"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"6.0","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
01 December 2015