IBM Support

PI45575: HASHMAPS ARE NOT THREAD-SAVED IN ORG.APACHE.OPENJPA.DATACACHE.DATACACHEMANAGERIMPL

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • HashMap which are used in the
    org.apache.openjpa.datacache.DataCacheManagerImpl are not thread
    safe. So multiple threads can add and get information from the
    _cacheable at the same time.
    
    This may lead to exceptions like:
    
    [7/22/15 8:45:07:146 CEST] 00000054 TimeoutManage I   WTRN0124I:
    When the timeout occurred the thread with which the transaction
    is, or was most recently, associated was Thread[WebContainer :
    7,5,main]. The stack trace of this thread when the timeout
    occurred was:
    
    java.util.HashMap.findNonNullKeyEntry(HashMap.java:605)
    java.util.HashMap.getEntry(HashMap.java:589)
    java.util.HashMap.get(HashMap.java:575)
    org.apache.openjpa.datacache.DataCacheManagerImpl.isCachable(Dat
    aCacheManagerImpl.java:145)
    org.apache.openjpa.datacache.DataCacheManagerImpl.selectCache(Da
    taCacheManagerImpl.java:128)
    org.apache.openjpa.datacache.DataCacheStoreManager.initialize(Da
    taCacheStoreManager.java:358)
    org.apache.openjpa.kernel.DelegatingStoreManager.initialize(Dele
    gatingStoreManager.java:112)
    org.apache.openjpa.kernel.ROPStoreManager.initialize(ROPStoreMan
    ager.java:57)
    org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:
    1051)
    org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:1009)
    org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:931)
    org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreMa
    nager.java:1033)
    com.ibm.ws.persistence.jdbc.kernel.WsJpaJDBCStoreManager.load(Ws
    JpaJDBCStoreManager.java:143)
    org.apache.openjpa.jdbc.sql.AbstractResult.load(AbstractResult.j
    ava:280)
    ......
    

Local fix

  • n/a
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server V8.5.5 who make use of the OpenJPA   *
    *                  DataCache.                                  *
    ****************************************************************
    * PROBLEM DESCRIPTION: The OpenJPA DataCacheManagerImpl        *
    *                      class (DataCache) can cause an          *
    *                      infinite loop when checking if          *
    *                      classes are cachable.                   *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    When the OpenJPA DataCache is used, and under heavy load (many
    threads) there exists the change that some threads might
    become hung when the DataCache is accessed. An example of a
    hung thread might look like this:
    INFO "ClientConnection - 9" prio=10 tid=0x00007f33d400e000
    nid=0x8d9 runnable [0x00007f32db1ef000]
    INFO java.lang.Thread.State: RUNNABLE
    INFO at java.util.HashMap.getEntry(Unknown Source)
    INFO at java.util.HashMap.get(Unknown Source)
    INFO at
    org.apache.openjpa.datacache.DataCacheManagerImpl.isCachable(Dat
    aCacheManagerImpl.java:145)
    INFO at
    org.apache.openjpa.datacache.DataCacheManagerImpl.selectCache(Da
    taCacheManagerImpl.java:128)
    INFO at
    org.apache.openjpa.datacache.DataCacheStoreManager.initialize(Da
    taCacheStoreManager.java:358)
    INFO at
    org.apache.openjpa.kernel.DelegatingStoreManager.initialize(Dele
    gatingStoreManager.java:112)
    INFO at
    org.apache.openjpa.kernel.ROPStoreManager.initialize(ROPStoreMan
    ager.java:57)
    INFO at
    org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:
    1027)
    INFO at
    org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:985)
    INFO at
    org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:907)
    The hung thread(s) occur because a HashMap used by DataCache
    is not thread safe.
    

Problem conclusion

  • With this fix, code has been added to OpenJPA to ensure the
    HashMap used by the OpenJPA DataCache is properly synchronized
    (made thread safe).
    
    The fix for this APAR is currently targeted for
    inclusion in Service Level (Fix Pack) 8.5.5.8 of WebSphere
    Application Server version 8.5.5.
    
    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

    PI45575

  • Reported component name

    WEBS APP SERV N

  • Reported component ID

    5724H8800

  • Reported release

    850

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2015-07-24

  • Closed date

    2015-10-19

  • Last modified date

    2015-10-19

  • 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

    WEBS APP SERV N

  • Fixed component ID

    5724H8800

Applicable component levels

  • R850 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.5","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
28 April 2022