WAITEVENT: “row cache lock“ Reference Note (Doc ID 34609.1)

"row cache lock" Reference Note

This is a reference note for the wait event "row cache lock" which includes the following subsections:

See Note:61998.1 for an introduction to Wait Events.

Definition:

  • Versions: 7.3 - 12.1
    Documentation: 12.1 11.2 11.1 10.2 10.1
     
  • This event is used to wait for a lock on a data dictionary cache specified by "cache id" (P1).

    If running Real Application Clusters (RAC) then LCK0 is signalled to get the row cache lock for the foreground waiting on this event. The LCK0 process will get the lock asynchronously. In exclusive mode the foreground process will try to get the lock.

Individual Waits:

  Parameters:
  • P1 = cache - ID of the dictionary cache
  • P2 = mode - Mode held
  • P3 = request - Mode requested
  • cache - ID of the dictionary cache
    Row cache lock we are waiting for. Note that the actual CACHE# values differ between Oracle versions. The cache can be found using this select - "PARAMETER" is the cache name:
    SELECT DISTINCT cache#, type, parameter 
      FROM v$rowcache     
     WHERE cache# = &P1
    
    With the release of 11g, v$rowcache may not report all valid cache# values.
    
    If the query above does not return any rows, you can also query:
    
    SELECT DISTINCT cache#, cache_name
      FROM v$rowcache_parent
     WHERE cache# = &P1
    
    ;

    In a RAC environment the row cache locks use global enqueues of type "Q[A-Z]" with the lock id being the hashed object name.

  • mode - Mode held
    The mode the lock is currently held in:
      KQRMNULL 0   null mode - not locked
      KQRMS    3   share mode
      KQRMX    5   exclusive mode
      KQRMFAIL 10  fail to acquire instance lock
  • request - Mode requested
    The mode the lock is requested in:
      KQRMNULL 0   null mode - not locked
      KQRMS    3   share mode
      KQRMX    5   exclusive mode
      KQRMFAIL 10  fail to acquire instance lock

  Wait Time:
In exclusive mode any process other than PMON will timeout after 8 hours (10000 waits of 3 seconds)

In RAC the foreground will wait 60 seconds for the LCK0 to get the lock, the foreground will wait in infinite loop until the lock has been granted (LCK0 will notify foreground).

In either case PMON will wait for only 5 seconds.

If a session times out when waiting for a row cache lock then it will report this to the alert log and tracefile with a message like:

WAITED TOO LONG FOR A ROW CACHE ENQUEUE LOCK

  Finding Blockers:
Holders and requesters can be seen in view X$KQRFP for parent objects, and X$KQRFS for subordinates.
eg: The following select will show all holders of parent row cache objects so can be used to help find the blocking session.
SELECT * FROM x$kqrfp WHERE kqrfpmod!=0;
(KQRFPSES is the address of the holding session V$SESSION.SADDR)

Systemwide Waits:

It is important to determine which cache is being waited for. The V$ROWCACHE view gives an overview of which caches are being used most, but the waits may not necessarily be on the most used cache. The V$ACTIVE_SESSION_HISTORY view can be used to get an idea of which cache ids (P1) are involved in waits.
  • If the issue is general across various caches (different cache ids) then the shared pool may need increasing in size to allow more dictionary information to be cached
  • If the issue is focused on a specific cache id then options typically depend on the cache involved - see the Troubleshooting section below.

Reducing Waits / Wait times:

Options to reduce waits depends on the specific cache that has the contention. See the documents in the Troubleshooting section below for advice on various caches.

Troubleshooting

See the following documents for help troubleshooting issues relating to "row cache lock" waits
Document:1476670.1 Resolving Issues Where 'Row Cache Lock' Waits are Occurring
Document:278316.1 Troubleshooting "WAITED TOO LONG FOR A ROW CACHE ENQUEUE LOCK!"

Known Issues / Bugs:

You can restrict the list below to issues likely to affect one of the following versions by clicking the relevant button:
                                                            
 
 
NBProbBugFixedDescription
III2679841112.1.0.2.220118, 12.2.0.1.DBRU:191015, 12.2.0.1.DBRU:200114, 18.8, 19.1the utlrp.sql hangs on row cache lock in ebs environment
II1782849912.1.0.1.4, 12.1.0.2, 12.2.0.1Opening PDB hangs waiting for row cache lock on open UPGRADE
-1692134012.1.0.1.1, 12.1.0.2, 12.2.0.1Non-CDB to PDB plugin hangs
II1388477412.1.0.2, 12.2.0.1Deadlock from concurrent select/ALTER SUMMARY and ALTER TABLE if query_rewrite_enabled set to true/force - superseded
II1699495212.1.0.1Unable to unschedule propagation due to CJQ self-deadlock / hang
II1411797611.2.0.3.BP14, 11.2.0.4, 12.1.0.1Database hangs when executing multiple MV DDL's in parallel
III1349639511.2.0.4, 12.1.0.1Hang / deadlock involving ACCOUNT_STATUS object for concurrent LOGON and ALTER USER
II3494471319.21RAC Database Hang And Crash With ORA-600[KCLWRT_9]
II3274050619.19row cache lock contention with DROP ROLE command and concurrent operations
I3447102919.18Row Cache Lock/Mutex Contention While Adding User To DB VAULT Realm Causes Huge And Service Failures
III3292054719.16High 'row cache lock' waits started in 19.11
I3145733419.15In-memory population request waiting on row cache lock
II3179246519.10Hang on RAC Waiting on Row Cache Lock
III3093198119.10Open Reset Logs Hangs With 'row cache lock' and 'cursor: pin s wait for x' Waits
-3130457319.10Provision Multitenant Database jobs killed due to 'rdbms ipc message'<='row cache lock'<='enq: FD - Marker generation'
III3048958212.2.0.1.DBRU:210420, 18.14, 18.18, 19.10, 20.1Row Cache Lock Blocker/Deadlock Detection Does Not Work in RAC
I2962615412.2.0.1.DBRU:200114, 18.9, 19.5, 20.1Poor Performance On Tablespace DDL Operations With Row Cache And Library Cache Wait Events
III2783456912.2.0.1.DBRU:191015, 12.2.0.1.DBRU:200114, 18.18, 18.8, 19.1Hang In RAC CDB Showing 'row cache lock' And 'reliable message' Wait Events
II2731469712.1.0.2.200414, 12.2.0.1.DBRU:200414, 18.10, 18.18, 19.1RAC: Slight Performance Overhead in case of Atomics and IMC
II2590611712.1.0.2.220118, 12.2.0.1.DBRU:180717, 18.1Wait for 'row cache lock' when creating an mview concurrently with another mview creation
III2665875912.1.0.2.180417, 12.2.0.1, 12.2.0.1.DBRU:171121, 18.1deadlock while executing utlrp.sql under Edition-Based-redefition enabled
II2658116718.1Deadlock On Row Cache Lock By 2 Sessions Connecting From Different RAC Instance
III2308414212.2.0.1deadlock while executing utlrp.sql under Edition-Based-redefition enabled
III2115314212.2.0.1Row cache lock self deadlock accessing seed PDB
III2109782712.2.0.1"ORA-04021: timeout occurred while waiting to lock object" Error in RAC While Creating Tables
II2109143112.1.0.2.160419, 12.1.0.2.DBBP13, 12.2.0.1row cache lock during trigger creation using editions
III1990747312.2.0.1GEN0 process causing database hang
III1585003111.2.0.4, 12.1.0.2, 12.2.0.1Rare instance hang: deadlock between 'row cache lock' and 'cursor: pin S wait for X'
II1386946712.1.0.2, 12.2.0.1Many waits for 'row cache lock' in RAC while creating many tables with constraints
II1362251511.2.0.4, 12.1.0.2, 12.2.0.1library cache <-> row cache deadlock / hang when altering constraint with MV involved - superseded
II1397951911.2.0.3.BP11, 11.2.0.4, 12.1.0.1Locks On DC_USERS Kept Too Long
II1391622811.2.0.4, 12.1.0.1Enabling/disabling constraints makes DML timeout in RAC - superseded
II1350286011.2.0.4, 12.1.0.1"row cache lock" contention on SYS_PLSQL_xx objects using PIPELINED functions
I1338797811.2.0.4, 12.1.0.1Sessions running TRUNCATE causing a deadlock, even if the constraints are disabled
-1295374311.2.0.3.BP13, 11.2.0.4, 12.1.0.1Parallel CTAS of table with a Securefile is slower than parallel IAS / PIDL
I1288905411.2.0.2.BP16, 11.2.0.3.BP05, 11.2.0.4, 12.1.0.1AWR snapshot hangs on dc_objects row_cache_lock held by ctas job
DII1279286211.2.0.4, 12.1.0.1Performance of INSERT using binary xml is very slow due to "row cache lock" in RAC environment - superseded
II1235102711.2.0.4, 12.1.0.1Redefinition causing deadlock between "row cache lock" and "library cache lock"
II1169336511.2.0.3, 12.1.0.1Concurrent Drop table and Select on Reference constraint table hangs (deadlock)
I1038275411.2.0.2.BP17, 11.2.0.3, 12.1.0.1Poor performance/ rowcache contention in 11g with partitioning due to invalidation of objects
IIII1020450511.2.0.3, 12.1.0.1SGA autotune can cause row cache misses, library cache reloads and parsing
II1012621911.2.0.1.BP08, 11.2.0.2.BP02, 11.2.0.3, 12.1.0.1Undetected deadlock 'library cache lock'/'row cache lock' with concurrent DDLs on partition tables.
II995255411.2.0.2.8, 11.2.0.2.BP18, 11.2.0.3, 12.1.0.1Undetected deadlock 'library cache lock'/'row cache lock' with a session modifying a constraint
II986604511.2.0.3, 12.1.0.1Long wait on 'wait for master scn' in LCK causing long row cache lock waits
III977660811.2.0.2, 12.1.0.1Hang from concurrent login to same account with a wrong password
II927897911.2.0.2, 12.1.0.1Instance hang / ORA-4021 with OPTIMIZER_USE_PENDING_STATISTICS = true
II826877511.1.0.7.4, 11.2.0.1.2, 11.2.0.1.BP07, 11.2.0.2, 12.1.0.1High US enqueue contention during a login storm or session failover
IIII771533911.2.0.1Logon failures causes "row cache lock" waits - Allow disable of logon delay
-836467611.1.0.7.2, 11.2.0.1row cache lock waits from background space preallocation
III752917410.2.0.5, 11.1.0.7.3, 11.2.0.1Deadlock / hang between SMON and foreground process
II741690111.1.0.7.1, 11.2.0.1Deadlock between QC and PQ slaves when CELL_PARTITION_LARGE_EXTENTS = ALWAYS
II731316610.2.0.5, 11.2.0.1Startup hang with self deadlock on dc_rollback_segments
II687099410.2.0.5, 11.1.0.7.3, 11.2.0.1High US enqueue / rowcache lock while trying to online a NEW undo segment
III602706810.2.0.5, 11.2.0.1Contention on ORA_TQ_BASE$ sequence
I575676910.2.0.4.1, 10.2.0.5, 11.1.0.7, 11.2.0.1Deadlock between Create MVIEW and DML
III614342010.2.0.5, 11.1.0.6Deadlock involving "ROW CACHE LOCK" on dc_users AND "CURSOR: PIN S WAIT ON X"
I605117710.2.0.4.1, 10.2.0.5, 11.1.0.6Hang / deadlock between coalesce and DBMS_STATS.gather_table_stats
III600491610.2.0.5, 11.1.0.6Hang involving row cache enqueues in RAC (ORA-4021)
-598302010.2.0.4, 11.1.0.6MMON deadlock with user session executing ALTER USER
II588311210.2.0.4, 11.1.0.6False deadlock in RAC
II513874110.2.0.4, 11.1.0.6High waits on 'row cache lock' when using materialized views on RAC
II460497211.1.0.6Deadlock on dc_users by Concurrent Grant/Revoke
-457938110.1.0.5, 10.2.0.2, 11.1.0.6Deadlock on DC_USERS in RAC (ORA-4020)
-44460119.2.0.8, 10.1.0.5, 10.2.0.2, 11.1.0.6Hang with row cache lock deadlock from concurrent ALTER USER / TRUNCATE
II439086810.1.0.5, 10.2.0.3, 11.1.0.6Contention on DC_SEGMENTS due to small cache size on SYS.AUDSES$
-43132469.2.0.8, 10.1.0.5, 10.2.0.2, 11.1.0.6PLSQL execution can hold dc_users row cache lock leading to hang / deadlocks
I415315010.2.0.2, 11.1.0.6, 9.2.0.8Deadlock on dc_rollback_segments from concurrent parallel load and undo segment creation
-42757339.2.0.8, 10.1.0.5, 10.2.0.1Deadlock between library cache lock and row cache lock from concurrent rename partition
I564119810.2.0.1Some waits may be longer than needed ("row cache lock") in RAC
-413700010.1.0.5, 10.2.0.1Concurrent SPLIT PARTITION can deadlock / hang
-36272639.2.0.6, 10.1.0.4, 10.2.0.1Deadlock / hang during RAC instance startup
II342472110.1.0.3, 10.2.0.1, 9.2.0.6Hang/deadlock from ALTER INDEX REBUILD on partition with concurrent SQL
-26152719.2.0.6, 10.1.0.2Deadlock from concurrent GRANT and logon
  • '*' indicates that an alert exists for that issue.
  • '+' indicates a particularly notable issue / bug.
  • See Note:1944526.1 for details of other symbols used

Related:

Document:1628089.1 AWR Report Interpretation Checklist for Diagnosing Database Performance Issues
Document:1359094.1 How to Use AWR Reports to Diagnose Database Performance Issues
Document:1274511.1 General SQL_TRACE / 10046 trace Gathering Examples
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值