ORA-600:[ktsapsblk-2] During Stats Collection Through DBMS_SCHEDULER (Doc ID 2083223.1)

Last updated on DECEMBER 16, 2015

Applies to:

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

Symptoms

Alert log reports an ORA-600 [ktsapsblk-2] during autotask stats collection through DBMS_SCHEDULER like:

Errors in file /orascl11g/oracle/diag/rdbms/scel/SCEL/trace/SCEL_j001_20943.trc (incident=3623477):
ORA-00600: internal error code, arguments: [ktsapsblk-2], [], [], [], [], [], [], [], [], [], [], []
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 289
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 3027
ORA-06512: at "SYS.DBMS_STATS", line 30973
Incident details in: /orascl11g/oracle/diag/rdbms/scel/SCEL/incident/incdir_3623477/SCEL_j001_20943_i3623477.trc


The incident trace file show characteristics like:

** 2015-07-14 22:00:42.957
*** SESSION ID:(13567.61639) 2015-07-14 22:00:42.957
*** CLIENT ID:() 2015-07-14 22:00:42.957
*** SERVICE NAME:(SYS$USERS) 2015-07-14 22:00:42.957
*** MODULE NAME:(DBMS_SCHEDULER) 2015-07-14 22:00:42.957
*** ACTION NAME:(ORA$AT_OS_OPT_SY_63438) 2015-07-14 22:00:42.957

Dump continued from file: /orascl11g/oracle/diag/rdbms/scel/SCEL/trace/SCEL_j001_20943.trc
ORA-00600: internal error code, arguments: [ktsapsblk-2], [], [], [], [], [], [], [], [], [], [], []

========= Dump for incident 3623475 (ORA 600 [ktsapsblk-2]) ========

*** 2015-07-14 22:00:42.960
dbkedDefDump(): Starting incident default dumps (flags=0x2, level=3, mask=0x0)
----- Current SQL Statement for this session (sql_id=53c2k4c43zcfx) -----
MERGE /*+ dynamic_sampling(ST 4) dynamic_sampling_est_cdn(ST) */ INTO STATS_TARGET$ ST USING (SELECT STALENESS, OSIZE, OBJ#, TYPE#, AFLAGS, STATUS, SID, SERIAL#, PART#, BO# FROM ( SELECT /*+ no_expand dynamic_sampling(4) dynamic_sampling_est_cdn */ DECODE(BITAND(T.FLAGS,16), 16, ROUND( LOG(0.01, NVL( LEAST( 100, GREATEST( 0.01, (DECODE(BITAND(M.FLAGS, 1), 1, GREATEST(T.ROWCNT, M.INSERTS), LEAST((M.INSERTS + M.DELETES + M.UPDATES), GREATEST(T.ROWCNT, (T.ROWCNT + M.INSERTS - GREATEST(NEW.STALENESS,-0.5) + ROUND(BITAND(ST.FLAGS,7)*0.15,1) ELSE NEW.STALENESS END, ST.OSIZE = NEW.OSIZE * DECODE(BITAND(ST.FLAGS,7), 0, 1, 2), ST.FLAGS = ST.FLAGS - BITAND(ST.FLAGS, 32+64+128) + NEW.AFLAGS, ST.STATUS = 0, ST.TYPE# = NEW.TYPE#, ST.PART# = NEW.PART#, ST.BO# = NEW.BO#, ST.SID = NEW.SID, ST.SERIAL# = NEW.SERIAL# WHEN NOT MATCHED THEN INSERT (ST.STALENESS, ST.OSIZE, ST.OBJ#, ST.TYPE#, ST.FLAGS, ST.STATUS, ST.SID, ST.SERIAL#, ST.PART#, ST.BO#) VALUES (NEW.STALENESS, NEW.OSIZE, NEW.OBJ#, NEW.TYPE#, NEW.AFLAGS, NEW.STATUS, :B5 , :B4 , NEW.PART#, NEW.BO#)
Error from uwx_step() is -3
Stack is not Unwindable
----- PL/SQL Stack -----
----- PL/SQL Call Stack -----
object line object
handle number name
c00000b1bf3bbc08 171 package body SYS.DBMS_SPACE_ADMIN
c00000bd122893d0 278 package body SYS.DBMS_STATS_INTERNAL
c00000bd122893d0 0 package body SYS.DBMS_STATS_INTERNAL
c00000bd477dddf0 0 package body SYS.DBMS_STATS

----- Call Stack Trace -----
$cold_ktsapsblk <- spefcifa <- spefmccallstd <- pextproc <- peftrusted <- psdexsp <- rpiswu2 <- psdextp <- pefccal <- pefcal <- pevm_FCAL <- DBMS_SPACE_ADMIN <- Line <- pevm_NCAL <- pen_XCAL_i <- DBMS_STATS_INTERNAL <- pevm_NCAL <- pevm_TOP_NCAL <- penrun

... $cold_ktsapsblk spefcifa spefmccallstd pextproc peftrusted psdexsp rpiswu2 psdextp pefccal pefcal pevm_FCAL DBMS_SPACE_ADMIN pevm_NCAL pen_XCAL_i DBMS_STATS_INTERNAL pevm_NCAL pevm_TOP_NCAL penrun plsql_run ...

 

NOTE:
The call stack function 'ktsapsblk' may be presented as 'ktsapsblk' or '$cold_ktsapsblk'

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms