免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1373 | 回复: 0
打印 上一主题 下一主题

oracle sqlplus执行没反应 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-12-22 08:53 |只看该作者 |倒序浏览

今天在一台机器上安装好了oracle执行sqlplus / as sysdba居然一直挂在里面,没反应了,
网上搜索了下,10.2.0.1在时间上有BUG,days>50或者days>24 和240+都有可能出现
[oracle@localhost ~]$ uptime
14:04:33 up 200 days, 16:27,  6 users,  load average: 0.16, 0.66, 0.71

这台机器已经运行200天了,因为是一台测试机,所以就直接重启了,以下是网上搜到的内容,oracle有补丁解决了这个问题

重启后再看
[oracle@localhost ~]$ uptime
14:18:05 up 11 min,  2 users,  load average: 0.05, 0.19, 0.18
[oracle@localhost ~]$
然后在sqlplus进去 ,问题解决了。
朋友解释说:
64位也会有这个问题。原因在于调用unix的时间函数的时候传了一个空值times(NULL) = -1825782405,然后自然就陷入了一个死循环。时间点具体是24.8的整数倍,通常是发生在198天或248天的时候。

下面是oracle的解释,只说了linux 32位平台,大家如何在其他平台遇到类似问题,可以发上来。

Applies to: SQL*Plus – Version: 10.2.0.1.0
Linux x86
SymptomsTrying to invoke SQL*Plus hangs when machine uptime reaches 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 0×01884599 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) = 0×41794000
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.

ChangesNew installation of Instant Client 10.2.0.1.0 on Linux platform. CauseThis is a known, unpublished bug.

Bug 4612267 OCI CLIENT IS IN AN INFINITE LOOP WHEN MACHINE UPTIME HITS 248 DAYS

SolutionSelect 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:

http://www.oracle.com/pls/db102/db102.show_toc?which=main&partno=b14250&maxlevel=2&section=&expand=3216

under “Patching Instant Client Shared Libraries on Linux or UNIX”.

2) Wait for Patchset 10.2.0.2 to be available.
According to Bug 4612267, this bug is fixed in version 11, and backported to 10.2.0.2 patchset.
This patchset is estimated to be available mid-Dec 2005; but this is subject to change.

References

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP