IBM Support

PH26967: OPENJPA'S CLASS TRANSFORMER NEEDS TO RESPECT APP CLASSLOADER CONCURRENCY

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

  • OpenJPA's class transformer was designed in a time when
    ClassLoader access was synchronized. Because it was assumed
    that
    if the ClassLoader caused another class to load while it was
    already enhancing a class, causing another triggering of the
    class transformer, it was assumed that that could only
    happen if
    OpenJPA was bundled as part of the application (loaded by
    the
    app classloader in an EE environment), and was safe to
    assume
    that this reentrant invocation would not be a request to
    enhance
    a persistent type, and thus return null (no enhancement
    needed).
    
    In recent releases of Liberty, the application ClassLoader
    was
    updated to allow multi-thread concurrent access as a
    performance
    improvement. Now, because the same ClassLoader (and thus
    same
    transformer), can be invoked concurrently by different
    threads,
    this assumption was no longer valid.
    

Local fix

  • N/A
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  Users of OpenJPA                            *
    ****************************************************************
    * PROBLEM DESCRIPTION: A recent performance improvement with   *
    *                      the Application Classloader allowing    *
    *                      concurrent access can cause OpenJPA to  *
    *                      miss enhancing entity types.            *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    OpenJPA's class transformer guards against reentrancy, which the
    design expected to only occur if an OpenJPA library class was
    first loaded while executing the enhance() method body.  This
    design was valid in older specifications of the JVM which
    disallowed concurrent access to a single ClassLoader.  When
    reentrancy was detected, the enhancement code was designed to
    immediately return without transforming the class (which is the
    appropriate behavior for an OpenJPA library type.). The design,
    which leveraged a simple boolean value, was insufficient for
    later JVM specifications that allowed for concurrent ClassLoader
    access.
    

Problem conclusion

  • The boolean sentinel value guarding against reentrancy has been
    made thread-aware, allowing different threads (called by the
    application ClassLoader through its concurrent access) to
    concurrently enter the enhancer without rejection, while still
    enforcing non-reentrancy (for the same established reasons) on
    the same thread.
    
    The fix for this APAR is currently targeted for inclusion in
    Commercial Liberty fix pack 20.0.0.9 Please refer to the
    Recommended Updates page for delivery information:
    http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH26967

  • Reported component name

    LIBERTY PROFILE

  • Reported component ID

    5724J0814

  • Reported release

    CD0

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2020-07-01

  • Closed date

    2020-07-28

  • Last modified date

    2020-11-02

  • 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

    LIBERTY PROFILE

  • Fixed component ID

    5724J0814

Applicable component levels

[{"Line of Business":{"code":"LOB45","label":"Automation"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"CD0"}]

Document Information

Modified date:
03 November 2020