IBM Support

IC81011: Hang on tranEntry latch in sqlpm_write_appl_locks during lock snapshot

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • In a Federated environment that utilizes two-phase commits, the
    instance can hang with a LOCK snapshot waiting on a tranEntry
    latch. The lock snapshot's callstack looks like this:
    sqlpm_write_appl_locks
    sqm_snap_appl_locks
    sqm_snap_db_locks
    sqlmonssagnt
    sqlmonssbackend
    sqlesrvr
    
    The lock snapshot is waiting for the tranEntry latch and holding
    the dblatch, m_appServLatch and masterAppLatch.
    
    At the same time a federated server has been defined to use
    two-phase commit and a federated agent is attempting to
    establish an XA transaction by calling sqlqg_FMP_FedStart. The
    agent's stack looks like this:
    msgrcv
    sqlorqueInternal
    sqlorque2
    sqloTQMRequestMLN
    sqlccipcconnr
    sqlccconnr
    sqljcCommConnect
    sqljcCmnMgrInit
    sqljrCreateTransport
    sqljrAssociateTransport
    sqljrInternalConnect
    sqljrFindBestAddressAndConnect
    sqljrDrdaArAuthenticate
    sqlexAppAuthenticate
    sqljrDrdaArConnect
    sqleUCdrdaARinit
    sqleUCappConnect
    sqlxaConnect
    DRDA_Connection::xa_open
    FencedServer::connect
    FencedServer::connect_current_user
    sqlqgConnect
    sqlqg_FMP_FedStart <-------------------
    sqlqgRouter
    sqlqg_fedstp_hook
    sqlqgDyload
    sqlriFedInvokerTrusted
    sqlriFedInvokeInvoker
    sqlqg_Call_FMP_Thread
    sqlqgFedStart
    sqlqgOpen
    sqlri_djx_rta
    sqlriNljnPiped
    sqlriSectInvoke
    sqlrr_process_execute_request
    sqlrr_execute
    sqljs_ddm_excsqlstt
    sqljsParseRdbAccessed
    sqljsParse
    sqljsSqlam
    :
    
    The Federated agent is holding the tranEntry latch when it calls
    sqlqgConnect to establish the XA connection and is waiting for
    an agent to be provided by the IPC connection manager.
    
    
    The IPC connection manager is hung waiting for the
    m_appServerLatch being held by the snapshot agent.
    SQLO_SLATCH_CAS::getConflictComplex
    SQLO_SLATCH_CAS::getConflict
    sqlo_latch
    sqeAppServices::CreateAppl
    sqeAgentServices::RequestAgent
    sqlccipcconnmgr_child
    sqloEDUEntry
    

Local fix

  • This hang can be avoided if the federated transaction does not
    require two phase commit. Two phase commit can be disabled as
    follows:
    
    alter server <server name> options (set DB2_TWO_PHASE_COMMIT
    'N')
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Anybody using federated transaction two phase commit         *
    * transaction and LOCK snapshots                               *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to Version 9.7 Fix Pack 6                            *
    ****************************************************************
    

Problem conclusion

  • Problem was first fixed in Version 9.7 Fix Pack 6
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC81011

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    970

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2012-01-25

  • Closed date

    2012-05-09

  • Last modified date

    2012-05-09

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

    IC80583

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

    IC83256 IC96023

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • R970 PSN

       UP



Document information

More support for: DB2 for Linux, UNIX and Windows

Software version: 9.7

Reference #: IC81011

Modified date: 09 May 2012