"Cursor: Pin S Wait On X" Contention Mutex Sleep Reason Primarily (文档 ID 1268724.1)

In this Document

  Symptoms
  Changes
  Cause
  Solution
  References

This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review.

APPLIES TO:

Oracle Server - Enterprise Edition - Version 10.2.0.4 and later
Information in this document applies to any platform.

SYMPTOMS

  • Sessions waiting on latch:library cache and cursor pin S wait on X mutexes
  • Application changes were made prior to the issue. Application changes involve changes to NLS_LENGTH_SEMANTICS although this is unlikely to be apparent initially, for example, whilst the length of PLSQL datatypes is fixed at compile time, anonymous PLSQL blocks have their variables defined at run time .
  • Database is not hung just contending as more and more sessions start waiting for the "cursor: pin S wait on X" event.
  • main mutex sleeps by volume were :

    kkslce [KKSCHLPIN2] and kksfbc [KKSPRTLOC1]

    using:

    select * from X$MUTEX_SLEEP ;

    Mutex Type    Location            Sleeps   Wait Time (ms)
    ------------- ------------------- -------- --------------
    Cursor Pin    kkslce [KKSCHLPIN2] 14384475 2132356683
    ....
  • The cursor with all the versions is a pseudo cursor:

    select sql_id, count(*) 
    from v$sql_shared_cursor
    group by sql_id
    having count(*) > 10
    order by 2;


    SQL_ID COUNT(*)
    ------------- ----------
    4gd6b1r53yt88 15122 


    SQL> select distinct sql_text from v$open_cursor where sql_id = '4gd6b1r53yt88'

    SQL_TEXT
    ------------------------------------------------------------
    table_1_ff_14f_0_0_0
  • Main reasons for the mismatch are: AUTH_CHECK_MISMATCH and LANGUAGE_MISMATCH using:

    Note:438755.1 Formated V$SQL_SHARED_CURSOR Report by SQLID or Hash Value (Doc ID 438755.1) 
    Note:296377.1 Handling and resolving unshared cursors/large version_counts

CHANGES

Application changes were made prior to the issue

CAUSE

The cause of the problem is:

Bug 7648406 CHILD CURSOR IS NOT SHARED IF NLS_LENGTH_SEMANTICS=CHAR


Symptoms also match : 

Note:758674.1 Library Cache: Mutex X " On Koka Cursors (LOBs) Non-Shared : (Doc ID 758674.1)

SOLUTION

Solutions/Workarounds may include:

  • Apply a patch for : Bug 7648406 CHILD CURSOR IS NOT SHARED IF NLS_LENGTH_SEMANTICS=CHAR.  This bug is fixed in 10.2.0.5 Patchset
  • Set NLS_LENGTH_SEMANTICS=BYTE globally or in a logon trigger etc

REFERENCES

@  BUG:7441165 - FOR: SOLARIS/HP ONLY: PREVENT PREEMPTION WHILE HOLDING A MUTEX
BUG:7648406 - CHILD CURSOR IS NOT SHARED IF SET NLS_LENGTH_SEMANTICS=CHAR.
NOTE:296377.1 - Troubleshooting: High Version Count Issues
NOTE:438755.1 - High SQL Version Counts - Script to determine reason(s)
NOTE:758674.1 - " Library Cache: Mutex X " On Koka Cursors (LOBs) Non-Shared :
NOTE:786507.1 - How to Determine the Blocking Session for Event: 'cursor: pin S wait on X'
 
 

相关内容

   
 
 

产品

   
 
  • Oracle Database Products > Oracle Database > Oracle Database > Oracle Database - Enterprise Edition > RDBMS > Database Level Performance Issues (not SQL Tuning)
 

关键字

   
 
CONTENTION; CURSOR PIN S WAIT ON X; HANGING; V$SQL_SHARED_CURSOR

你可能感兴趣的:("Cursor: Pin S Wait On X" Contention Mutex Sleep Reason Primarily (文档 ID 1268724.1))