ORA-00600: internal error code, arguments: [kdBlkCheckError]

 

ORA-00600: internal error code, arguments: [kdBlkCheckError]

Table of Contents

1 現象

在數據庫宕機前出現ORA-00600錯誤。 日誌內容以下:sql

ORA-01595: error freeing extent (4) of rollback segment (31))
ORA-00607: Internal error occurred while making a change to a data block
ORA-00600: internal error code, arguments: [kdBlkCheckError], [3], [3], [18018], [], [], [], [], [], [], [], []
Corrupt Block Found
         TSN = 2, TSNAME = UNDOTBS1
         RFN = 3, BLK = 3, RDBA = 12582915
         OBJN = 2, OBJD = -1, OBJECT = , SUBOBJECT =
         SEGMENT OWNER = , SEGMENT TYPE =
Wed Aug 02 10:00:05 2017
Dumping diagnostic data in directory=[cdmp_20170802100005], requested by (instance=1, osid=24055 (SMON)), summary=[incident=48868].
Errors in file /oracle/app/oracle/diag/rdbms/aiboss/aiboss/trace/aiboss_smon_24055.trc  (incident=61108):
ORA-00600: internal error code, arguments: [kdBlkCheckError], [3], [3], [18018], [], [], [], [], [], [], [], []
Incident details in: /oracle/app/oracle/diag/rdbms/aiboss/aiboss/incident/incdir_61108/aiboss_smon_24055_i61108.trc
Wed Aug 02 10:00:11 2017
PMON (ospid: 24025): terminating the instance due to error 474
System state dump requested by (instance=1, osid=24025 (PMON)), summary=[abnormal instance termination].
System State dumped to trace file /oracle/app/oracle/diag/rdbms/aiboss/aiboss/trace/aiboss_diag_24035.trc
Instance terminated by PMON, pid = 24025
Wed Aug 02 10:40:19 2017

2 分析

  • 錯誤分析 ORA-01595,ORA-00607,ORA-00600錯誤出現後,10:00:05秒Oracle開啓記錄此錯誤的相關信息,隨後 Oracle PMON進行由SMON於沒法清理資源,沒法保證數據一致性而中止實例。 ORA-01595錯誤提的是數據庫smon 進行清理回滾段的extent. 說明undo表空間出現問題。
  • BUG 確認

從宕機前的日誌記錄來看,數據庫遇到的是oracle BUG 12349316. 依據爲:數據庫

freeing extent (4) of rollback segment (31))                         =====> 與oracle BUG 12349316引起的條件一致,都是在清理extent時引起BUG.
[kdBlkCheckError], [ 3], [ 3], [ 18018]                              =====> 與oracle BUG 12349316 中600錯誤返回參數一致,都帶有18018.
trace 日誌(aiboss_smon_24055_i61108.trc)中發現 delete extent 函數    =====> FRAME [ 32] (ktusp_delextent()+76 -> ktsxr_delete())

3 故障處理

主要的處理思路是先跳過有問題的undo段,而後重建undo表空間oracle

  • 修改參數文件 數據庫啓動時,查找參數文件的順序是spfile<ORACLE_SID>.ora –> init<ORACLE_SID>.ora –> init.ora. 所以Oracle 數據庫傾向於使用spfile啓動數據庫。通常環境中也都使用spfile. 如何確認數據庫使用的是spfile 仍是pfile,使用 " show parameter spfile " 命令便可查看。app

    當數據庫使用的是spfile參數文件時,因爲spfile是 二進制 文件,咱們不便於直接修改,所以須要先建立出一個pfile 文本文件。ide

    create pfile='/tmp/pfile.ora' from spfile;
    此命令的執行不須要啓動數據庫,進入sqlplus環境便可。
    在參數文件中加入如下內容:
    undo_management = MANUAL             # UNDO 段管理方式改成manual
    # 其餘可添加內容:
    *.fast_start_parallel_rollback=high  # 以4*cpu 個數開啓回滾進程,可是實際上不會真的開始這麼多。
    *._allow_resetlogs_corruption = true # 若是數據庫須要恢復,且undo與redo不一致,部分redo 沒法恢復時須要此參數,容許resetlogs
  • 啓動數據庫函數

    startup mount pfile='/tmp/pfile.ora';
    alter database open;

    若是數據庫須要recovery,則執行如下命令:spa

    recover database until cancel;
    alter database open resetlogs;
  • offline存在活動事務的的undo塊日誌

    select segment_name,status,tablespace_name
    from dba_rollback_segs
    where status not in ('ONLINE', 'OFFLINE') ;
    
    SEGMENT_NAME                   STATUS           TABLESPACE_NAME
    ------------------------------ ---------------- ------------------------------
    _SYSSMU3_4004931649$           NEEDS RECOVERY   UNDOTBS1
    _SYSSMU4_1126976075$           NEEDS RECOVERY   UNDOTBS1
    _SYSSMU5_4011504098$           NEEDS RECOVERY   UNDOTBS1

    將以上內容添加至剛建立的/tmp/pfile.ora中:code

    _CORRUPTED_ROLLBACK_SEGMENTS = ('_SYSSMU3_4004931649$','_SYSSMU4_1126976075$','_SYSSMU5_4011504098$')

    "_corrupted_rollback_segments" 做用是不使用這幾個回滾段。orm

  • 重啓數據庫

    startup force pfile='/tmp/pfile.ora';
  • 從新建立undo 表空間

    alter tablespace undotbs1 offline ;
    drop tablespace undotbs1 including contents and datafiles;
    create undo tablespace undotbs1 datafile '/data0/aiboss/undotbs1.dbf' size 30G autoextend off;
    alter system set undo_tablespace='UNDOTBS1';
  • 重啓數據庫 重啓數據庫前,須要修改/tmp/pfile.ora 參數文件,將如下參數去除:

    undo_management=manual
    _allow_resetlogs_corruption=true
    fast_start_parallel_rollback=high

    重啓:

    startup force pfile='/tmp/pfile.ora';
    create spfile from pfile='/tmp/pfile.ora';
    startup force;

Author: halberd.lee

Created: 2019-06-20 Thu 10:38

Validate

相關文章
相關標籤/搜索