作者 阿九【转载时请务必以超链接形式标明文章原始出处和作者信息】
今天(2012-11-19)在检查数据库等待事件的时候发现一个异常的等待会话 kksfbc child completion
通过查询 v$session_wait可以看到等待会话的相关信息
SID | SEQ# | EVENT | P1TEXT | P1 | P1RAW | P2TEXT | P2 | P2RAW | P3TEXT | P3 | P3RAW | WAIT_CLASS_ID | WAIT_CLASS# | WAIT_CLASS | WAIT_TIME | SECONDS_IN_WAIT | STATE |
961 | 28176 | kksfbc child completion | 0 | 00 | 0 | 00 | 0 | 00 | 1893977003 | 0 | Other | 5 | 883531 | WAITED KNOWN TIME |
根据SID在视图v$session和v$process中查到该会话的进程号,
通过操作系统topas命令看到该进程占用大量CPU,而v$session中显示的该会话登录时间是 2012-11-05,
该会话显示的SQL_ADDRESS列的值在v$sqlarea视图中也找不到相关的SQL语句,警告日志未发现异常记录,
同时使用oradebug工具dump processstate 10 查看生成的追踪文件,在追踪文件中找到一个相关会话的SQL信息
LIBRARY OBJECT HANDLE: handle=7000005bc547610 mtx=7000005bc547740(0) cdp=0 name=select t2.invoicesortname from tb_inv_invoicewininfo t1, tc_inv_invoicesort t2 where t1.invoiceno = '26101110262906902684' and t1.invoicesortcode = t2.invoicesortcode |
网上有人说这是oracle的bug,在metalink上查到该bug的描述(bug id:6795880.8):
Description
This fix has been superseded by bug:8575528. A session may go into an infinite spin just after a wait for 'kksfbc child completion'. The spin occurs with a stack including kksSearchChildList -> kkshgnc where kksSearchChildList loops forever. This problem can also lead to internal error such as any of ORA-600 [kksSearchChildList1], ORA-600 [kksSearchChildList2] ORA-600 [kksSearchChildList3], ORA-600 [kkshgnc-nextchild] Or Trace dumps on kksSearchChildList4 . Note: This fix is disabled by default in 10g. To enable this fix you must explicitly set the following parameter for instance startup: "_cursor_features_enabled" = 10
这个bug所影响的版本为:
Bug 6795880 Session spins / OERI after 'kksfbc child completion' wait - supercededThis note gives a brief overview of bug 6795880.
The content was last updated on: 05-APR-2011
Click here for details of each of the sections below.
Affects:
Product (Component) Oracle Server (Rdbms) Range of versions believed to be affected Versions BELOW 11.2 Versions confirmed as being affected Platforms affected Generic (all / most platforms affected)
最后使用操作系统命令 Kill -9 和数据库命令 alter system kill session命令将其杀死。