您的位置:首页 > 数据库 > Oracle

Oracle(10.2.0.1)版本的的bug(4612267)

2012-06-08 11:02 459 查看
公司有一台oracle服务器, 报告说不能用了,无法连接,好像Oracle死了似的,根据他们的描述,以前遇到该问题就是重启一下就没事了,但每季度都有这么次情况。 我登上去想看看是什么情况,结果使用sqlplus,直接没有反应。查看日志,结果发现日志还是15天前更新的,数据文件也是15天前的,日啊,原来早在 半个月前就已经hang在那里了。在网上一查,说有可能是oracle的一个bug,查看版本,果然是10.2.0.1,遂运行top命令检查,发现和网 上说的占CPU100%一模一样,用vmstat命令检查,有20多个进程都在等待,查看服务器启动时间,应该是在差不多50天的时候开始hang住的。





bug描述:
#-------------------------------------------------------------------------
# Interim Patch for Base Bugs: 4612267
#-------------------------------------------------------------------------
#
# DATE: Wed Oct 5 10:17:13 2005
# -------------------------------
# Platform. Patch for : Linux x86
# Product Version # : 10.2.0.1
# Product Patched : ORACORE
#
# Bugs Fixed by this patch:
# -------------------------
# 4612267:OCI CLIENT IS IN AN INFINITE LOOP WHEN MACHINE UPTIME HITS 248 DAYS
#-------------------------------------------------------------------------

事实上只要Linux x86主机运行天数是是24.8的倍数都有可能引发该bug,因为time()函数值为null,造成无限死循环,从而耗尽cpu

到这里就确认就是Oracle的bug了,在网上查了,有三种解决方法:
1) 重启主机;
2) 打patch set,如升级到10.2.0.4;
3) 对该bug单独打临时patch 4612267。
重启不解决问题,升级时间太长,还是打补丁吧
在网上搜到了这个补丁,CSDN上有下载,p4612267_10201_LINUX32bit_198days.zip
由于无法sqlplus登入数据库,监听器也没法停止,与oracle的任何操作都不能操作,由于该服务器虽然为生产,但不常用,不怎么重要,于是直接重启服务器。
重启服务器后,试着启动oracle,没有问题,松一口气,关闭oracle开始打补丁:
$ mkdir $ORACLE_BASE/patches (建立目录:/home/oracle/product/10.2.0/patches/)
$ cd $ORACLE_BASE/patches (oracle安装目录:/home/oracle/product/10.2.0/patches/4612267)
上传补丁
$ unzip p4612267_10201_LINUX.zip
$ cd 4612267/
$ $ORACLE_HOME/OPatch/opatch apply(实例:/home/oracle/product/10.2.0/OPatch/opatch apply)
Invoking OPatch 10.2.0.1.0

Oracle interim Patch Installer version 10.2.0.1.0
Copyright (c) 2005, Oracle Corporation. All rights reserved..

Oracle Home : /u01/app/oracle/product/10.2.0/db_1
Central Inventory : /u01/app/oracle/oraInventory
from : /u01/app/oracle/product/10.2.0/db_1/oraInst.loc
OPatch version : 10.2.0.1.0
OUI version : 10.2.0.1.0
OUI location : /u01/app/oracle/product/10.2.0/db_1/oui
Log file location : /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch-2011_Dec_26_15-29-05-CST_Mon.log

ApplySession applying interim patch '4612267' to OH '/u01/app/oracle/product/10.2.0/db_1'
Invoking fuser to check for active processes.
Invoking fuser on "/u01/app/oracle/product/10.2.0/db_1/bin/oracle"

OPatch detected non-cluster Oracle Home from the inventory and will patch the local system only.

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/10.2.0/db_1')

Is the local system ready for patching?

Do you want to proceed? [y|n]
y
User Responded with: Y
Backing up files and inventory (not for auto-rollback) for the Oracle Home
Backing up files affected by the patch '4612267' for restore. This might take a while...
Backing up files affected by the patch '4612267' for rollback. This might take a while...

Patching component oracle.oracore.rsf, 10.2.0.1.0...
Updating archive file "/u01/app/oracle/product/10.2.0/db_1/lib/libcore10.a" with "lib/libcore10.a/sltrg.o"

Patching component oracle.rdbms, 10.2.0.1.0...
Updating archive file "/u01/app/oracle/product/10.2.0/db_1/lib/libcore10.a" with "lib/libcore10.a/sltrg.o"
Running make for target client_sharedlib
Running make for target client_sharedlib
Running make for target ioracle
ApplySession adding interim patch '4612267' to inventory

The local system has been patched and can be restarted.

OPatch succeeded.
验证补丁是否安装
[oracle@anti 4612267]$ $ORACLE_HOME/OPatch/opatch lsinventory(实例:/home/oracle/product/10.2.0/OPatch/opatch lsinventory)
Invoking OPatch 10.2.0.1.0

Oracle interim Patch Installer version 10.2.0.1.0
Copyright (c) 2005, Oracle Corporation. All rights reserved..

Oracle Home : /u01/app/oracle/product/10.2.0/db_1
Central Inventory : /u01/app/oracle/oraInventory
from : /u01/app/oracle/product/10.2.0/db_1/oraInst.loc
OPatch version : 10.2.0.1.0
OUI version : 10.2.0.1.0
OUI location : /u01/app/oracle/product/10.2.0/db_1/oui
Log file location : /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch-2011_Dec_26_15-31-35-CST_Mon.log

Lsinventory
Output file location :
/u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory-2011_Dec_26_15-31-35-CST_Mon.txt

--------------------------------------------------------------------------------
Installed Top-level Products (1):

Oracle Database 10g 10.2.0.1.0
There are 1 products installed in this Oracle Home.

Interim patches (1) :

Patch 4612267 : applied on Mon Dec 26 15:30:09 CST 2011
Created on 5 Oct 2005, 13:48:00 hrs US/Pacific
Bugs fixed:
4612267

--------------------------------------------------------------------------------

OPatch succeeded.

为了保险起见,又重启了服务器,启动oracle,监听器,正常。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: