ORA-600(unable to load XDB library)错误

AIX上的9206数据库出现这个错误。
在alert文件中发现大量的类似错误:

Mon DEC 19 16:43:13 2011
Errors IN file /oracle9/app/admin/db/udump/db1_ora_15400980.trc:
ORA-00600: internal error code, arguments: [unable TO LOAD XDB library], [], [], [], [], [], [], []

检查对应的TRACE文件,发现是在删除PERFSTAT用户:

/oracle9/app/admin/db/udump/db1_ora_15400980.trc
Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
WITH the Partitioning OPTION
JServer Release 9.2.0.6.0 - Production
ORACLE_HOME = /oracle9/app/product/9.2.0
System name:	AIX
Node name:	db_1
Release:	1
Version:	6
Machine:	00F64FF34C00
Instance name: db1
Redo thread mounted BY this instance: 1
Oracle process NUMBER: 79
Unix process pid: 15400980, image: oracle@db_1 (TNS V1-V3)
*** SESSION ID:(29.33289) 2011-12-19 16:43:13.766
Dynamic link error: 	0509-022 Cannot LOAD module /oracle9/app/product/9.2.0/lib32/libxdb.so.
	0509-103   The module has an invalid magic NUMBER.
*** 2011-12-19 16:43:13.774
ksedmp: internal OR fatal error
ORA-00600: internal error code, arguments: [unable TO LOAD XDB library], [], [], [], [], [], [], []
CURRENT SQL statement FOR this SESSION:
DROP USER perfstat cascade
----- Call Stack Trace -----
calling              CALL     entry                argument VALUES IN hex      
location             TYPE     point                (? means dubious VALUE)     
-------------------- -------- -------------------- ----------------------------
ksedmp+0148          bl       ksedst               10257BA84 ?
ksfdmp+0018          bl       01FD2604             
kgerinv+00e8         bl       _ptrgl               
kgeasnmierr+004c     bl       kgerinv              000000000 ? 000000000 ?
                                                   1000C5328 ? 1025C36B8 ?
                                                   11031DDC8 ?
sqmtbGetSharedData+  bl       kgeasnmierr          1100062F8 ? 110342E48 ?
0088                                               1025C36C0 ? 000000000 ?
                                                   00000007D ? 00000007D ?
                                                   968DBE1E7339340 ? 000000040 ?
qmtLoadSharedData+0  bl       sqmtbGetSharedData   FFFFFFFFFFFA658 ? 000000000 ?
074                                                000000000 ? 1103453C0 ?
                                                   FFFFFFFFFFF4590 ? 1025C2B78 ?
                                                   000000002 ? 110163730 ?
qmtbInit+00b8        bl       qmtLoadSharedData    110345238 ?
qmtInit+01f8         bl       qmtbInit             7000000BA25FF10 ?
qm_init_sga_pass1+0  bl       qmtInit              1100062F8 ?
13c                                                
qm_init_uga+0138     bl       qm_init_sga_pass1    
qmtsDropUser+0130    bl       qm_init_uga          
kzdukl+25d4          bl       qmtsDropUser         11031D636 ? 8000000000008 ?
                                                   24B0000024B ?
kzudrp+023c          bl       kzdukl               11031D4C8 ?
opiexe+2800          bl       kzudrp               3500000035 ?
opiosq0+0ae0         bl       opiexe               410320340 ? FFFFFFFFFFFC378 ?
                                                   FFFFFFFFFFFA658 ?
kpooprx+0174         bl       opiosq0              000000004 ? 000000002 ?
                                                   000000000 ? 000000001 ?
kpoal8+033c          bl       kpooprx              FFFFFFFFFFFC5E4 ?
                                                   FFFFFFFFFFFC378 ?
                                                   1A0000001A ? 100000001 ?
                                                   000000000 ? 24000000000024 ?
                                                   080000000 ? 000007FFF ?
opiodr+08e8          bl       _ptrgl               
ttcpip+0c54          bl       _ptrgl               
opitsk+0c28          bl       ttcpip               11000D210 ? 000000000 ?
                                                   000000000 ? 000000000 ?
                                                   000000000 ? 000000000 ?
                                                   000000000 ? 000000000 ?
opiino+0798          bl       opitsk               000000000 ? 000000000 ?
opiodr+08e8          bl       _ptrgl               
opidrv+032c          bl       opiodr               3C77616974 ? 4101C7438 ?
                                                   FFFFFFFFFFFF6C0 ? 000000001 ?
sou2o+0028           bl       opidrv               3C00000005 ? 44043C000 ?
                                                   FFFFFFFFFFFF6C0 ?
main+0138            bl       01FD2328             
__start+0098         bl       main                 000000000 ? 000000000 ?
--------------------- Binary Stack Dump ---------------------

显然导致这个ORA-600错误的主要原因是Dynamic link error,在详细TRACE文件中也体现了这一点。
查询MOS发现这是AIX上环境变量设置不当所致,详情可以参考文档While Running catupgrd.sql On AIX: ORA-00600 [unable to load XDB library] [ID 759401.1]。虽然当前并不是在执行升级操作,但是导致问题的原因是相同的。
由于环境变量LIBPATH中,64位的library路径应该在32位之前,而当前环境中的配置是相反的,这就造成了Oracle需要读取对应的library时,出现动态连接错误。
解决方法就是改变当前错误的配置,首先关闭数据库,然后unset LIBPATH和LD_LIBRARY_PATH,重新设置export LIBPATH=$ORACLE_HOME/lib:$ORACLE_HOME/lib32,然后重启数据库,重新执行报错的命令或脚本即可。

This entry was posted in BUG and tagged , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *