IV40233: Deadlock prevention on BPEDB tables PROCESS_INSTANCE_B_T and SCOPE_INSTANCE_B_T

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • The APAR changes the way in which certain BPEDB information is
    retrieved. In particular it addresses deadlocks as seen in the
    following two stacks:
    
    1)
    
    [29/03/13 05:19:48:322] 000000e8 TraceBPE       X
    com.ibm.bpe.engine.BpelEngine.onMessage(BpelEngine.java:1564)com
    .microsoft.sqlserver.jdbc.SQLServerException: Transaction
    (Process ID 82) was deadlocked on lock resources with another
    process and has been chosen as the deadlock victim. Rerun the
    transaction.
    
    com.ibm.bpe.database.TomSQLException:
    com.microsoft.sqlserver.jdbc.SQLServerException: Transaction
    (Process ID 82) was deadlocked on lock resources with another
    process and has been chosen as the deadlock victim. Rerun the
    transaction.
     at
    com.ibm.bpe.database.ScopeInstanceB.selectDbByPIIDSTIDIsActiveEH
    IIDnullEnclosingFEIIDnull(ScopeInstanceB.java:2755)
     at com.ibm.bpe.database.Tom.getScopeInstanceB(Tom.java:12714)
     at
    com.ibm.bpe.engine.BpelActivityState.createActivityInstance(Bpel
    ActivityState.java:1613)
     at
    com.ibm.bpe.engine.BpelActivityKindComplexBegin.doActivate(BpelA
    ctivityKindComplexBegin.java:270)
     at
    com.ibm.bpe.engine.BpelActivityStateInactive.activateOrSkip(Bpel
    ActivityStateInactive.java:280)
     at
    com.ibm.bpe.engine.BpelEngineCore.continueControlLink(BpelEngine
    Core.java:291)
     at
    com.ibm.bpe.engine.BpelContinueLinkMessage3.execute(BpelContinue
    LinkMessage3.java:88)
     at
    com.ibm.bpe.engine.BpelEngine.onMessage(BpelEngine.java:1541)
    
    
    
    2)
    
    [29/03/13 05:21:22:734] 0000005c TraceBPE       X
    com.ibm.bpe.database.DbAccProcessInstanceB.openFetchByParentAIID
    (DbAccProcessInstanceB.java:1497)SELECT PIID, PTID, STATE,
    PENDING_REQUEST, CREATED, STARTED, COMPLETED, LAST_STATE_CHANGE,
    LAST_MODIFIED, NAME, PARENT_NAME, TOP_LEVEL_NAME,
    COMPENSATION_SPHERE_NAME, STARTER, DESCRIPTION, INPUT_SNID,
    INPUT_ATID, INPUT_VTID, OUTPUT_SNID, OUTPUT_ATID, OUTPUT_VTID,
    FAULT_NAME, TOP_LEVEL_PIID, PARENT_PIID, PARENT_AIID, TKIID,
    TERMIN_ON_REC, AWAITED_SUB_PROC, IS_CREATING, PREVIOUS_STATE,
    EXECUTING_ISOLATED_SCOPE, SCHEDULER_TASK_ID, RESUMES,
    PENDING_SKIP_REQUEST, IS_MIGRATED, UNHANDLED_EXCEPTION,
    CREATED_WITH_VERSION, WSID_1, WSID_1_HC, WSID_2, WSID_2_HC,
    VERSION_ID FROM BPC.PROCESS_INSTANCE_B_T  WITH (ROWLOCK) WHERE
    (PARENT_AIID = ?)
    [29/03/13 05:21:22:734] 0000005c clientinfoplu  >
    prepareStatementEntry
    
    com.ibm.ws.rsadapter.jdbc.WSJdbcConnection@38203820
                                     SELECT PIID, PTID, STATE,
    PENDING_REQUEST, CREATED, STARTED, COMPLETED, LAST_STATE_CHANGE,
    LAST_MODIFIED, NAME, PARENT_NAME, TOP_LEVEL_NAME,
    COMPENSATION_SPHERE_NAME, STARTER, DESCRIPTION, INPUT_SNID,
    INPUT_ATID, INPUT_VTID, OUTPUT_SNID, OUTPUT_ATID, OUTPUT_VTID,
    FAULT_NAME, TOP_LEVEL_PIID, PARENT_PIID, PARENT_AIID, TKIID,
    TERMIN_ON_REC, AWAITED_SUB_PROC, IS_CREATING, PREVIOUS_STATE,
    EXECUTING_ISOLATED_SCOPE, SCHEDULER_TASK_ID, RESUMES,
    PENDING_SKIP_REQUEST, IS_MIGRATED, UNHANDLED_EXCEPTION,
    CREATED_WITH_VERSION, WSID_1, WSID_1_HC, WSID_2, WSID_2_HC,
    VERSION_ID FROM BPC.PROCESS_INSTANCE_B_T  WITH (ROWLOCK) WHERE
    (PARENT_AIID = ?)
                                     TYPE FORWARD ONLY (1003)
                                     CONCUR READ ONLY (1007)
    [29/03/13 05:21:22:734] 0000005c clientinfoplu  <
    prepareStatementExit
    
    com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement@37173717
    [29/03/13 05:21:22:750] 0000005c TraceBPE       X
    com.ibm.bpe.database.DbAccProcessInstanceB.openFetchByParentAIID
    (DbAccProcessInstanceB.java:1501)set 1 =
    _AI:9004013d.b497bb58.44da573f.7d3c0e32
    [29/03/13 05:21:54:814] 0000005c TraceBPE       X
    com.ibm.bpe.engine.BpelEngine.onMessage(BpelEngine.java:1564)com
    .microsoft.sqlserver.jdbc.SQLServerException: Transaction
    (Process ID 124) was deadlocked on lock resources with another
    process and has been chosen as the deadlock victim. Rerun the
    transaction.
    
    com.ibm.bpe.database.TomSQLException:
    com.microsoft.sqlserver.jdbc.SQLServerException: Transaction
    (Process ID 124) was deadlocked on lock resources with another
    process and has been chosen as the deadlock victim. Rerun the
    transaction.
        at
    com.ibm.bpe.database.ProcessInstanceB.selectDbByParentAIID(Proce
    ssInstanceB.java:640)
        at
    com.ibm.bpe.database.Tom.getSubProcessInstanceB(Tom.java:11504)
        at
    com.ibm.bpe.engine.BpelEngineCore.processAsynchronousResponseMes
    sage(BpelEngineCore.java:1254)
        at
    com.ibm.bpe.engine.BpelAsynchronousResponseEngineMessage.execute
    (BpelAsynchronousResponseEngineMessage.java:86)
        at
    com.ibm.bpe.engine.BpelEngine.onMessage(BpelEngine.java:1536)
        at
    com.ibm.bpe.framework.GenericAPIServicesImpl$7.run(GenericAPISer
    vicesImpl.java:440)
        at
    com.ibm.bpe.framework.infrastructure.InfrastructureServicesSuppo
    rtBean.runInCScopeTxClassLoaderContextsWithException(Infrastruct
    ureServicesSupportBean.java:167)
        at
    com.ibm.bpe.framework.infrastructure.EJSLocalStatelessInfrastruc
    tureServicesSupportBea_70e9f9d4.runInCScopeTxClassLoaderContexts
    WithException(Unknown Source)
        at
    com.ibm.bpe.framework.infrastructure.InfrastructureServicesImpl.
    runInCScopeTxClassLoaderContextsWithException(InfrastructureServ
    icesImpl.java:350)
        at
    com.ibm.bpe.framework.infrastructure.InfrastructureServicesImpl$
    2.run(InfrastructureServicesImpl.java:251)
        at
    com.ibm.bpe.framework.sca.AbstractBPCImplementationHandler.handl
    eInvocationEnvironmentRequest(AbstractBPCImplementationHandler.j
    ava:197)
        at
    com.ibm.bpe.framework.sca.AbstractBPCImplementationHandler.proce
    ssMessage(AbstractBPCImplementationHandler.java:130)
        at
    com.ibm.ws.sca.internal.message.impl.MessageDispatcherImpl.proce
    ssMessageWithPCI(MessageDispatcherImpl.java:775)
        at
    com.ibm.ws.sca.internal.message.impl.MessageDispatcherImpl.proce
    ssMessage(MessageDispatcherImpl.java:1627)
        at
    com.ibm.ws.sca.internal.proxy.impl.ProxyInvocationHandlerImpl.in
    voke(ProxyInvocationHandlerImpl.java:783)
        at $Proxy46.processMessage(Unknown Source)
        at
    com.ibm.bpe.framework.sca.InvocationEnvironmentProviderImpl.runI
    nInvocationEnvironment(InvocationEnvironmentProviderImpl.java:15
    8)
        at
    com.ibm.bpe.framework.infrastructure.InfrastructureServicesImpl.
    runInScaCScopeTxClassLoaderContextsWithException(InfrastructureS
    ervicesImpl.java:257)
        at
    com.ibm.bpe.framework.GenericAPIServicesImpl.bpc_onMessage(Gener
    icAPIServicesImpl.java:427)
        at
    com.ibm.bpe.framework.EngineMessageExecutionWorkObject.processV6
    EngineMessage(EngineMessageExecutionWorkObject.java:300)
        at
    com.ibm.bpe.framework.EngineMessageExecutionWorkObject.run(Engin
    eMessageExecutionWorkObject.java:181)
        at
    com.ibm.ws.asynchbeans.J2EEContext$RunProxy.run(J2EEContext.java
    :268)
    

Local fix

  • no local fix or workaround yet
    

Problem summary

  • Stack 1:Two transactions are holding a read lock on the same
    ScopeInstance_B_T entry.
    The deadlock appears because both transactions request an update
    lock on this ScopeInstance_B_T entry.
    
    Stack 2 and 3: Two transactions that are are querying the
    ProcessInstance_B_T table via
    different foreign keys. Due to the index locking of the
    underlying database system the queries
    block each other.
    

Problem conclusion

  • The problem could be fixed by avoiding the SQL queries that were
    causing the deadlocks.
    
    iFix available on top of V700 FP5
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV40233

  • Reported component name

    BUS PRC CHOREOG

  • Reported component ID

    5655FLW11

  • Reported release

    700

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-04-22

  • Closed date

    2013-07-04

  • Last modified date

    2013-07-16

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

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

    JR46852 JR46857 JR46858 PM93094

Fix information

  • Fixed component name

    BUS PRC CHOREOG

  • Fixed component ID

    5655FLW11

Applicable component levels

  • R700 PSY

       UP



Rate this page:

(0 users)Average rating

Document information


More support for:

WebSphere Process Server
Business Process Choreographer

Software version:

7.0

Reference #:

IV40233

Modified date:

2013-07-16

Translate my page

Machine Translation

Content navigation