标题: SELF DEADLOCK PROCESS WAITS ON ''Cursor: Pin S Wait On X'' with SQL_TRACE ena... [打印本页] 作者: 刘泽宇 时间: 2023-7-23 15:02 标题: SELF DEADLOCK PROCESS WAITS ON ''Cursor: Pin S Wait On X'' with SQL_TRACE ena... SYMPTOMS
System hangs intermittently.
Problem is resolved by killing blocking process
Blocking process is waiting for an eXclusive cursor pin mutex and is holding a Share:
waiting for 'cursor: pin S wait on X'
Process holds and requests the same mutex within the same session
e.g.: (extract from Systemstate / Processtate of process in question)
Wait section shows a wait in progress for 'cursor: pin S wait on X'
waiting for 'cursor: pin S wait on X' blocking sess=0x(nil) seq=55457
wait_time=0 seconds since wait started=0
idn=a116531d, value=6100000000, where|sleeps=20023f5fe
The mutex identifier is : idn=a116531d
So, searching for 'a116531d' in the rest of the process trace finds:
So the single process holds both oper EXCL and oper GET_SHRD on the same mutex.
Top of the stack for this process is the following:
semtimedop sskgpwwait skgpwwait kslwaitns kskthbwt kslwait
kksLockWait kgxWait kgxSharedExamine kxsGetRuntimeLock kksfbc kxstcls
kksCloseCursor opicca opiclo opicls opiodr rpidrus
skgmstack rpidru rpiswu2 rpidrv psddr0 psdcls
CAUSE
It is possible that SQL_TRACE is the cause of the problem.
From Bug:5653007 The stack contains routines that are specific to tracing. (kxstcls)
SOLUTION
1. Disable SQL_TRACE
or
2. If you must keep SQL_TRACE enabled, suggest applying patch 5485914. You will need to check for available backport for your platform.