分类: Oracle
2011-03-29 16:10:15
SQL*Plus 10.2.0.1 Hangs, When System Uptime Is Long Period of Time [ID 338461.1] | |||||
修改时间 23-FEB-2011 类型 PROBLEM 状态 PUBLISHED |
In this Document
Trying to invoke SQL*Plus hangs when machine uptime has been for a long period of time. There have been cases where problem occurs when uptime reaches 60 days and others as long as 248 days.
Database connection is not relevant as the 'sqlplus' executable itself hangs with or without connection information. It hangs regardless of what parameters are passed in. For example:
sqlplus -V
However, the hang does not reproduce with Instant Client version 10.1.0.4
Generating a stack trace using gdb debugger shows:
#0 0x0048a0dd in times () from /lib/tls/libc.so.6
#1 0x01884599 in sltrgatime64 () from ./libclntsh.so.10.1
#2 0x0137d70f in kghinp () from ./libclntsh.so.10.1
#3 0x00f86b47 in kpuinit0 () from ./libclntsh.so.10.1
#4 0x00f85e7a in kpuenvcr () from ./libclntsh.so.10.1
#5 0x01051b5e in OCIEnvCreate () from ./libclntsh.so.10.1
#6 0x0099787e in afidrv () from ./libsqlplus.so
#7 0x009702b9 in safimTerminate () from ./libsqlplus.so
#8 0x0098c246 in afidrv () from ./libsqlplus.so
#9 0x080486f6 in main ()
Running STRACE tool shows:
$ strace /oracle/home/bin/sqlplus -V 2>&1 |less
......
old_mmap(NULL, 385024, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x41794000
gettimeofday({1122996561, 411035}, NULL) = 0
access("/usr/local/UD/conf/sqlnet.ora", F_OK) = -1 ENOENT (No such file or directory)
access("/usr/local/UD/lib/oracle/network/admin/sqlnet.ora", F_OK) = -1 ENOENT (No such file or directory)
access("/usr/local/UD/conf/sqlnet.ora", F_OK) = -1 ENOENT (No such file or directory)
access("/usr/local/UD/lib/oracle/network/admin/sqlnet.ora", F_OK) = -1 ENOENT (No such file or directory)
fcntl64(-1218313656, F_SETFD, FD_CLOEXEC) = -1 EBADF (Bad file descriptor)
times(NULL) = -1825782405
times(NULL) = -1825782405
times(NULL) = -1825782405
times(NULL) = -1825782405
times(NULL) = -1825782405
times(NULL) = -1825782405
times(NULL) = -1825782405
It is looping on the times() function.
In addition to sqlplus, it has been reported that the netca and dbca tools also hang.
This is a known, unpublished bug.
Bug 4612267 OCI CLIENT IS IN AN INFINITE LOOP WHEN MACHINE UPTIME HITS 248 DAYS
Select one of the following two solutions:
1) Apply one-off patch available for 10.2.0.1.
a. Download one-off patch off Metalink:
Patch 4612267
Description OCI CLIENT IS IN AN INFINITE LOOP WHEN MACHINE UPTIME HITS 248 DAYS
Product CORE
Release Oracle 10.2.0.1
b. To apply patch on Instant Client install, please follow instructions documented in the OCI manual.
You can find this in:
under "Patching Instant Client Shared Libraries on Linux or UNIX".
2) Apply Patchset 10.2.0.2 or higher.
According to unpublished Bug 4612267, this bug is fixed in version 11, and backported to 10.2.0.2 patchset.
solution
oracle@hostname:~/patch> unzip p4612267_10201_LINUX.zip
Archive: p4612267_10201_LINUX.zip
creating: 4612267/
creating: 4612267/files/
creating: 4612267/files/lib/
creating: 4612267/files/lib/libcore10.a/
inflating: 4612267/files/lib/libcore10.a/sltrg.o
creating: 4612267/etc/
creating: 4612267/etc/config/
inflating: 4612267/etc/config/inventory
inflating: 4612267/etc/config/actions
creating: 4612267/etc/xml/
inflating: 4612267/etc/xml/GenericActions.xml
inflating: 4612267/etc/xml/ShiphomeDirectoryStructure.xml
inflating: 4612267/README.txt
oracle@hostname:~/patch> ls
4612267 p4612267_10201_LINUX.zip
oracle@hostname:~/patch> cd 4612267/
oracle@hostname:~/patch/4612267> ls
README.txt etc files
oracle@hostname:~/patch/4612267> 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 : /home/oracle/app/oracle/product/10.2.0
Central Inventory : /home/oracle/app/oracle/oraInventory
from : /home/oracle/app/oracle/product/10.2.0/oraInst.loc
OPatch version : 10.2.0.1.0
OUI version : 10.2.0.1.0
OUI location : /home/oracle/app/oracle/product/10.2.0/oui
Log file location : /home/oracle/app/oracle/product/10.2.0/cfgtoollogs/opatch/opatch-2011_Mar_29_16-55-41-CST_Tue.log
ApplySession applying interim patch '4612267' to OH '/home/oracle/app/oracle/product/10.2.0'
Invoking fuser to check for active processes.
OPatch finds following executables active:
/home/oracle/app/oracle/product/10.2.0/bin/oracle
Before you proceed, stop all active processes. Press
Do you want to proceed? [y|n]
y
User Responded with: Y
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 = '/home/oracle/app/oracle/product/10.2.0')
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 "/home/oracle/app/oracle/product/10.2.0/lib/libcore10.a" with "lib/libcore10.a/sltrg.o"
Patching component oracle.rdbms, 10.2.0.1.0...
Updating archive file "/home/oracle/app/oracle/product/10.2.0/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@hostname:~/patch/4612267> sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Mar 29 16:56:15 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> exit
oracle@hostname:~/patch/4612267> ps -ef |grep ora_
oracle 6828 6504 0 16:56 pts/5 00:00:00 grep ora_
oracle@hostname:~/patch/4612267>
chinaunix网友2011-06-05 01:44:29
大连法律咨询在线 http://www.fabowang.com 大连律师在线咨询 http://www.fabowang.com 大连法律顾问网 http://www.fabowang.com 大连律师咨询 http://www.fabowang.com