"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'

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值