首页 » ORACLE 9i-23c » Wait Event: buffer deadlock

Wait Event: buffer deadlock

When I was analyzing a database performance case what many session hang in 11.2.0.4 RAC Aactive dataguard, I saw a large number of foreground sessions waiting for this event (buffer deadlock) and buffer busy wait. what is the buffer deadlock? just Here is a short record.

Oracle Documents

buffer deadlock

Oracle does not really wait on this event; the foreground only yields the CPU. Thus, the chances of catching this event are very low. This is not an application induced deadlock, but an assumed deadlock by the cache layer. The cache layer cannot get a buffer in a certain mode within a certain amount of time.

Wait Time: 0 seconds. The foreground process only yields the CPU and will usually be placed at the end of the CPU run queue.

Buffer deadlocks in the care of P1 buffer provides the address of data block requested block.

SQL> @sed deadlock
Show wait event descriptions matching %deadlock%..

EVENT# EVENT_NAME                                              WAIT_CLASS           PARAMETER1                PARAMETER2                PARAMETER3                ENQUEUE_NAME                   REQ_REASON                       REQ_DESCRIPTION
------ ------------------------------------------------------- -------------------- ------------------------- ------------------------- ------------------------- ------------------------------ -------------------------------- ----------------------------------------------------------------------------------------------------
  787 buffer deadlock                                         Other                dba                       class*10+mode             flag

SQL> @dec 3571369274

                                DEC                  HEX
----------------------------------- --------------------
                  3571369274.000000             D4DEC53A

SQL> @dba D4DEC53A

    RFILE#     BLOCK# BIGFILE_BLOCK# DUMP_CMD
---------- ---------- -------------- ---------------------------------------------------------------------------------------------------------------------
       851    2016570     3571369274 -- alter system dump datafile 851 block 2016570

Buffer Deadlock is very typical wait event and not so much seen in database. But when you are encountering with this mysterious wait then you would see the effect of wait and performance bottleneck of the server. Lack of resources at CPU level, buffer deadlock can be appearing. , Characteristics of Buffer deadlock is something same as buffer busy wait, This event does not appear too repeatedly v$system_event and v$session_wait points of view, and when it does, it happens very quickly and can be difficult to detect. However, since the ratio of buffer busy wait event has been explained here.

A form of enqueue locking is used to protect cached database blocks. For each buffer in the database buffer cache, there is a buffer header. The buffer headers constitute a fixed array in the permanent memory part of the shared pool. These buffer headers act as the resource structures for buffer locks. Sessions manipulate buffer headers, and thus buffers, via dynamically allocated structures known as buffer handles. The buffer handles act as the lock structures for buffer locks.

Buffer locks are taken only in shared and exclusive modes. The buffer headers implement a two-way linked list of the buffer handles for sessions that are using the buffer, and another for the buffer handles of sessions waiting for the buffer.

If a buffer lock deadlock is suspected, the session that timed out trying to acquire a buffer lock releases the buffer locks that it is holding on other buffers, and immediately enqueues them again, thereby falling to the end of the queue of waiting sessions. It also posts the first process that was waiting for a lock on each of the buffers concerned, and then yields the CPU. Although yielding the CPU does not really constitute a wait, a buffer deadlock wait is recorded and the exchange deadlocks statistic is incremented.

Know issue

Bug 27138798  – HIGH BUFFER DEADLOCK WAITS AFTER APPLYING 12.1.0.2.170814 DBBP
Bug 21893830 ORA-600 [kcbgtcr_13] / ‘gc cr failure’ , ‘cr request retry’ and ‘buffer deadlock’ on ADG – Superseded
Bug 14195003 Deadlock with “gc current request” and “gc buffer busy” is possible on RAC and wait forever
Bug 17695685 Hang in Active Dataguard Database with RAC

Reference <Oracle Internals: An Introduction>

Related Posts:

打赏

对不起,这篇文章暂时关闭评论。