联系:手机/微信(+86 17813235971) QQ(107644445)
标题:数据库open报ORA-07445 kglsget错误处理
作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]
有朋友反馈,数据库服务器断电之后,强制拉库无法open成功
Wed Apr 19 18:13:30 2023 ALTER DATABASE OPEN Beginning crash recovery of 1 threads parallel recovery started with 32 processes Started redo scan Completed redo scan read 35 KB redo, 20 data blocks need recovery Started redo application at Thread 1: logseq 4, block 3 Recovery of Online Redo Log: Thread 1 Group 1 Seq 4 Reading mem 0 Mem# 0: E:\APP\ADMINISTRATOR\ORADATA\ORCL\REDO01.LOG Completed redo application of 0.02MB Completed crash recovery at Thread 1: logseq 4, block 73, scn 157134992 20 data blocks read, 20 data blocks written, 35 redo k-bytes read Thread 1 advanced to log sequence 5 (thread open) Thread 1 opened at log sequence 5 Current log# 2 seq# 5 mem# 0: E:\APP\ADMINISTRATOR\ORADATA\ORCL\REDO02.LOG Successful open of redo thread 1 MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set SMON: enabling cache recovery Successfully onlined Undo Tablespace 2. Verifying file header compatibility for 11g tablespace encryption.. Verifying 11g file header compatibility for tablespace encryption completed SMON: enabling tx recovery Database Characterset is ZHS16GBK No Resource Manager plan active Starting background process QMNC Wed Apr 19 18:13:34 2023 QMNC started with pid=56, OS id=6380 Exception [type: ACCESS_VIOLATION, UNABLE_TO_READ] [ADDR:0x12] [PC:0x9068BE9, kglsget()+547] ERROR: Unable to normalize symbol name for the following short stack (at offset 199): dbgexProcessError()+193<-dbgeExecuteForError()+65<-dbgePostErrorKGE()+1726 <-dbkePostKGE_kgsf()+75<-kgeade()+560<-kgerev()+125<-kgerec5()+60<-sss_xcpt_EvalFilterEx()+1869 <-sss_xcpt_EvalFilter()+174<-.1.6_8+59<-00007FFB13102316<-00007FFB1311398D<-00007FFB130D93A7 <-00007FFB13112B1A<-kglsget()+547<-qcdolci()+80<-qcdoloi()+167<-qcdlgcd()+940<-kkdlgcd()+129 <-PGOSF158_kkmfbtcn()+17<-qcsIsColInFro()+474<-qcsRslvColWithinQbc()+304<-qcsStrongColRslv()+632 <-qcsRslvName()+212<-qcsridn()+104<-qcsraic()+736<-qcspqbDescendents()+485<-qcspqb()+154<-kkmdrv()+200 <-opiSem()+2560<-opiDeferredSem()+565<-opitca()+391<-PGOSF525_kksFullTypeCheck()+27<-rpiswu2()+2757 <-kksLoadChild()+9357<-kxsGetRuntimeLock()+2320<-kksfbc()+15225<-kkspsc0()+2117<-kksParseCursor()+181 <-opiosq0()+2538<-opiall0()+6705<-opikpr()+699<-opiodr()+1662<-rpidrus()+862<-rpidru()+154<-rpiswu2()+2757 <-kprball()+1610<-qmCheckIfXdbInstalled()+1059<-qm_open_db()+11<-kscnfy()+778 Errors in file e:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_ora_6036.trc (incident=113085): ORA-07445: 出现异常错误: 核心转储 [kglsget()+547] [ACCESS_VIOLATION] [ADDR:0x12] [PC:0x9068BE9] [UNABLE_TO_READ] [] Incident details in: e:\app\administrator\diag\rdbms\orcl\orcl\incident\incdir_113085\orcl_ora_6036_i113085.trc Wed Apr 19 18:13:36 2023 Trace dumping is performing id=[cdmp_20230419181336] Wed Apr 19 18:13:39 2023 PMON (ospid: 6624): terminating the instance due to error 397 Instance terminated by PMON, pid = 6624
查看trace文件
*** 2023-04-21 17:29:42.077 *** SESSION ID:(898.359) 2023-04-21 17:29:42.077 *** CLIENT ID:() 2023-04-21 17:29:42.077 *** SERVICE NAME:(SYS$USERS) 2023-04-21 17:29:42.077 *** MODULE NAME:(sqlplus.exe) 2023-04-21 17:29:42.077 *** ACTION NAME:() 2023-04-21 17:29:42.077 Dump continued from file: e:\app\administrator\diag\rdbms\orcl\orcl\trace\orcl_ora_9648.trc ORA-07445: 出现异常错误: 核心转储 [kglsget()+547] [ACCESS_VIOLATION] [ADDR:0x12] [PC:0x9138BE9] [UNABLE_TO_READ] [] ========= Dump for incident 444285 (ORA 7445 [kglsget()+547]) ======== ----- Beginning of Customized Incident Dump(s) ----- Exception [type: ACCESS_VIOLATION, UNABLE_TO_READ] [ADDR:0x12] [PC:0x9138BE9, kglsget()+547] Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production Process Id: 0x00000a8c Thread Id : 0x000025b0 Time : Fri Apr 21 17:29:42 Excp. Code: 0xc0000005 Excp. Type: ACCESS_VIO Flags: 0x00000000 ------------------- Registers ---------------------------- ip=0000000009138BE9 sp=00000000276FA470 rp=0000000A0BF280D0 r1=000000001089AFE0 r2=0000000000000000 r3=0000000000000101 r4=00000009BDFE40B0 r5=00000000276FA470 r6=0000000A0BF280D0 r7=00000000000005C0 r8=00000009B9DC4F48 r9=0000000A0BF280D0 r10=0000000000000200 r11=00000000276FA590 r12=00000009ED85F4C0 r13=000000000CB3C070 r14=0000000000000001 r15=0000000000000001 ------------------- End of Registers --------------------- *** 2023-04-21 17:29:42.077 dbkedDefDump(): Starting a non-incident diagnostic dump (flags=0x3, level=3, mask=0x0) ----- Current SQL Statement for this session (sql_id=gtf6tgc2ycgxx) ----- select count(*) from XDB.XDB$SCHEMA s where s.xmldata.schema_url = 'http://xmlns.oracle.com/xdb/XDBSchema.xsd' ----- Call Stack Trace ----- calling call entry argument values in hex location type point (? means dubious value) -------------------- -------- -------------------- ---------------------------- kglsget()+547 0000000000000000 009962700 00996270C 000000000 0276DCCA0 qcdolci()+80 CALL??? kglsget()+347 9C5F9E7D0 009138AE2 000000018 000000001 qcdoloi()+167 CALL??? qcdolci() 00000DC7E 008D52DEF 000000006 00CB5BEE8 qcdlgcd()+940 CALL??? qcdoloi() 000000000 000000000 000000000 000000000 kkdlgcd()+129 CALL??? qcdlgcd() 000000000 9B9DC6C78 000000000 01089AA20 __PGOSF158_kkmfbtcn CALL??? kkdlgcd() 01089AFE0 00CB5BEE8 000000000 ()+17 000000000 qcsIsColInFro()+474 CALL??? __PGOSF158_kkmfbtcn 000000001 9BDFE41E0 000000000 () 000000001 qcsRslvColWithinQbc CALL??? qcsIsColInFro() 900000000 01089AFE0 0276FCFC0 ()+304 742E204F1B71 qcsStrongColRslv()+ CALL??? qcsRslvColWithinQbc 000000010 27F00000000 632 ()+73 000000000 000000000 qcsRslvName()+212 CALL??? qcsStrongColRslv()+ 0276FA9E0 9C3F136C0 00764E4E0 516 0093A505B qcsridn()+104 CALL??? qcsRslvName() 101000000000000 000000000 000000000 0276FAE90 qcsraic()+736 CALL??? qcsridn() 0276FACB0 0276FACB0 000000000 000000001 qcspqbDescendents() CALL??? qcsraic() 0276FAE90 01089AFE0 00CB5D030 +485 00CB5CEE8 qcspqb()+154 CALL??? qcspqbDescendents() 00000002A 008D53029 01089AFE0 000000000 kkmdrv()+200 CALL??? qcspqb() 000000029 00895C700 0276FAF90 00895C700 opiSem()+2560 CALL??? kkmdrv() 00CB31730 0108B7820 000000001 9C3F13730 opiDeferredSem()+56 CALL??? opiSem() 0276FCFC0 A09FA3D68 00000006E 5 000000001 opitca()+391 CALL??? opiDeferredSem() 000000001 000000000 006F7AC18 000000000 __PGOSF525_kksFullT CALL??? opitca() 037615F10 9C3F138D0 0277000A0 ypeCheck()+27 00895C700 rpiswu2()+2757 CALL??? __PGOSF525_kksFullT 0276FEB98 000004018 0108A04E0 ypeCheck() 0108A0700 kksLoadChild()+9357 CALL??? rpiswu2() 9F86A81C8 000000000 9C5F9D1E4 000000002 kxsGetRuntimeLock() CALL??? kksLoadChild() 01089AFE0 A09FA39D8 0276FF400 +2320 A09FA39D8 kksfbc()+15225 CALL??? kxsGetRuntimeLock() 01089AFE0 037615F10 0276FF400 000000103 kkspsc0()+2117 CALL??? kksfbc() 037615F10 000000003 A00000108 0076D1C80 kksParseCursor()+18 CALL??? kkspsc0() 00CAD1DA8 0076D1C80 00000006F 1 000000003 opiosq0()+2538 CALL??? kksParseCursor() 00CACF990 000000000 00895C700 027700940 opiall0()+6705 CALL??? opiosq0() 000000003 00000000E 0277010C0 000000020 opikpr()+699 CALL??? opiall0() 000000065 000000022 0277018C8 000000000 opiodr()+1662 CALL??? opikpr() 000000065 90000001C 027703208 01089AA20 rpidrus()+862 CALL??? opiodr() 000000065 00000001C 027703208 000000000 rpidru()+154 CALL??? rpidrus() 0277027F8 000000000 000000000 000000000 rpiswu2()+2757 CALL??? rpidru() 027703030 000000000 000000000 000000000 kprball()+1610 CALL??? rpiswu2() 9F86A81C8 000000000 027702E50 000000002 qmCheckIfXdbInstall CALL??? kprball() 027703208 000000100 000000002 ed()+1059 00CAEC188 qm_open_db()+11 CALL??? qmCheckIfXdbInstall 000000000 000000000 000000000 ed() 00895C700 kscnfy()+778 CALL??? qm_open_db() 657FC5CD00000019 000000000 000000000 100000000 adbdrv()+45489 CALL??? kscnfy() 000000019 000000000 000000000 000000000 opiexe()+20842 CALL??? adbdrv() 000000023 000000003 A00000102 000000000 opiosq0()+5129 CALL??? opiexe()+16981 000000004 000000000 02770A8C0 009121AB3 kpooprx()+357 CALL??? opiosq0() 000000003 00000000E 02770AB90 0000000A4 kpoal8()+940 CALL??? kpooprx() 01089AFE0 0090CC0A8 01089AFE0 000000001 opiodr()+1662 CALL??? kpoal8() 00000005E 00000001C 02770E100 00ABBF224 ttcpip()+1325 CALL??? opiodr() 00000005E 00000001C 02770E100 4100200000000000 opitsk()+2040 CALL??? ttcpip() 0108B4D00 000000000 000000000 000000000 opiino()+1258 CALL??? opitsk() 00000001E 000000000 000000000 02770F9F8 opiodr()+1662 CALL??? opiino() 00000003C 000000004 02770FAB0 000000000 opidrv()+864 CALL??? opiodr() 00000003C 000000004 02770FAB0 615C3A6500000000 sou2o()+98 CALL??? opidrv()+150 00000003C 000000004 02770FAB0 000000000 opimai_real()+158 CALL??? sou2o() 064425745 000000000 000000000 02770FBA4 opimai()+191 CALL??? opimai_real() 7FFA241388C0 7FFA24138A49 000000000 00895C700 *** 2023-04-21 17:29:42.343 OracleThreadStart() CALL??? opimai() 000401452 000000002 0085DFE20 +724 0000025B0 00007FFA246713D2 CALL??? OracleThreadStart() 00FCAFF18 000000000 000000000 000000000 00007FFA26D403C4 CALL??? 00007FFA246713B0 7FFA246713B0 000000000 000000000 000000000 --------------------- Binary Stack Dump ---------------------
确定报错是在select count(*) from XDB.XDB$SCHEMA s where s.xmldata.schema_url = ‘http://xmlns.oracle.com/xdb/XDBSchema.xsd’这个sql语句中,对其数据库启动过程进行跟踪,没有发现该语句而是只有报错
EXEC #6:c=0,e=181,p=0,cr=0,cu=0,mis=0,r=0,dep=2,og=4,plh=3755742892,tim=22655713465 FETCH #6:c=0,e=12,p=0,cr=3,cu=0,mis=0,r=1,dep=2,og=4,plh=3755742892,tim=22655713503 CLOSE #6:c=0,e=6,dep=2,type=3,tim=22655713532 Exception [type: ACCESS_VIOLATION, UNABLE_TO_READ] [ADDR:0x12] [PC:0x9138BE9, kglsget()+547] dump file: e:\app\administrator\diag\rdbms\orcl\orcl\incident\incdir_452285\orcl_ora_9848_i452285.trc ORA-07445: 出现异常错误: 核心转储 [kglsget()+547] [ACCESS_VIOLATION] [ADDR:0x12] [PC:0x9138BE9] [UNABLE_TO_READ] []
证明ORA-07445 kglsget错误的语句没有到sql执行阶段,而是在解析阶段就开始报错.通过对oracle启动过程进行处理(因为该语句不是数据库启动个必须的语句),规避掉该sql执行,实现数据库正常open