查看: 4365|回复: 14

[性能调整] database and os was hang with ORA-240 ERROR

[复制链接]
求职 : 数据库管理员
论坛徽章:
1
ITPUB社区千里马徽章
日期:2013-08-22 09:58:03
跳转到指定楼层
1#
发表于 2012-11-6 09:02 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
Environment  AIX 6.1 TWO node racoracle 10.2.0.4
Symptom
  用户反映无法打开MES程序,连接到2号节点查看,发现sqlplus /as sysdba
回车后卡死,cancel不掉?重新开一个连接,到root账户下 crsctl check crs 命令也卡死,lsnrctl status 命令卡死,OS命令正常。
1号节点正常。
Alterlog有如下报错
Sat Nov  3 16:37:32 2012
Thread 2 advanced to log sequence 55778 (LGWR switch)
  Current log# 8 seq# 55778 mem# 0: +SFC3DB_DATA/sfc3db/onlinelog/group_8.304.722515055
  Current log# 8 seq# 55778 mem# 1: +SFC3DB_ARCH/sfc3db/onlinelog/group_8.264.722515055
Sat Nov  3 16:40:19 2012
Errors in file /apps/oracle/admin/sfc3db/bdump/sfc3db2_arc0_1843352.trc:
ORA-00240: control file enqueue held for more than 120 seconds
Sat Nov  3 16:42:29 2012
Errors in file /apps/oracle/admin/sfc3db/bdump/sfc3db2_arc1_565424.trc:
ORA-00240: control file enqueue held for more than 120 seconds
Sat Nov  3 16:47:00 2012
kkjcre1p: unable to spawn jobq slave process
Sat Nov  3 16:47:00 2012
Sat Nov  3 17:04:22 2012
ksvsubmit: Process(O001) creation failed
系统应该是无法分配新的进程了,所以这些命令都卡死,  但是当时OS free的内存还有10G,也远没有达到最大进程数。
我最后的解决办法是直接reboot OS,重启后OK 各位大神有遇到过这种情况的吗?需要什么LOG 我发上来。
如下是trc文件
sfc3rac2:/apps/oracle/admin/sfc3db/bdump$ cat /apps/oracle/admin/sfc3db/bdump/sfc3db2_cjq0_5861420.trc
Dump file /apps/oracle/admin/sfc3db/bdump/sfc3db2_cjq0_5861420.trc
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
ORACLE_HOME = /apps/oracle/product/10.2.0
System name:    AIX
Node name:      sfc3rac2
Release:        1
Version:        6
Machine:        00C8B9724C00
Instance name: sfc3db2
Redo thread mounted by this instance: 2
Oracle process number: 15
Unix process pid: 5861420, image: oracle@sfc3rac2 (CJQ0)
*** 2012-11-03 06:00:41.427
*** SERVICE NAMESYS$BACKGROUND) 2012-11-03 06:00:41.419
*** SESSION ID2192.1) 2012-11-03 06:00:41.419
GATHER_STATS_JOB: Stopped by Scheduler.
Consider increasing the maintenance window duration if this happens frequently.
The following objects/segments were not analyzed due to timeout:
*** 2012-11-03 16:31:39.479
Waited for process J000 to initialize for 60 seconds
*** 2012-11-03 16:31:39.479
Dumping diagnostic information for J000:
OS pid = 917522
loadavg : 3.77 3.49 3.60
swap info: free_mem = 9427.14M rsv = 64.00M
           alloc = 241.15M avail = 16384.00M swap_free = 16142.85M
       F S      UID     PID    PPID   C PRI NI ADDR    SZ    WCHAN    STIME    TTY  TIME CMD
1040005 A   oracle  917522       1   0  60 20 1ad230590 89196          16:30:38      -  0:00 [oracle]
skgpgpstack: read() for cmd /bin/sh -c '/usr/bin/procstack 917522 2>&1' timed out after 60 seconds
*** 2012-11-03 16:33:40.701
*** 2012-11-03 16:33:50.907
Waited for process J000 to initialize for 70 seconds
*** 2012-11-03 16:33:50.907
Dumping diagnostic information for J000:
OS pid = 917522
loadavg : 2.86 3.25 3.49
swap info: free_mem = 9348.35M rsv = 64.00M
           alloc = 241.11M avail = 16384.00M swap_free = 16142.89M
       F S      UID     PID    PPID   C PRI NI ADDR    SZ    WCHAN    STIME    TTY  TIME CMD
1040005 A   oracle  917522       1   0  60 20 1ad230590 89196          16:30:38      -  0:00 [oracle]
skgpgpstack: read() for cmd /bin/sh -c '/usr/bin/procstack 917522 2>&1' timed out after 60 seconds
*** 2012-11-03 16:35:52.258
*** 2012-11-03 16:36:02.459
Waited for process J000 to initialize for 80 seconds
*** 2012-11-03 16:36:02.459
Dumping diagnostic information for J000:
OS pid = 917522
loadavg : 2.74 3.00 3.36
swap info: free_mem = 9385.39M rsv = 64.00M
           alloc = 241.10M avail = 16384.00M swap_free = 16142.90M
       F S      UID     PID    PPID   C PRI NI ADDR    SZ    WCHAN    STIME    TTY  TIME CMD
1040005 A   oracle  917522       1   0  60 20 1ad230590 89196          16:30:38      -  0:00 [oracle]
skgpgpstack: read() for cmd /bin/sh -c '/usr/bin/procstack 917522 2>&1' timed out after 60 seconds
*** 2012-11-03 16:38:03.960
*** 2012-11-03 16:38:14.165
Waited for process J000 to initialize for 90 seconds
*** 2012-11-03 16:38:14.165
Dumping diagnostic information for J000:
OS pid = 917522
loadavg : 2.56 2.96 3.30
swap info: free_mem = 9440.27M rsv = 64.00M
           alloc = 241.00M avail = 16384.00M swap_free = 16143.00M
       F S      UID     PID    PPID   C PRI NI ADDR    SZ    WCHAN    STIME    TTY  TIME CMD
1040005 A   oracle  917522       1   0  60 20 1ad230590 89196          16:30:38      -  0:00 [oracle]
skgpgpstack: read() for cmd /bin/sh -c '/usr/bin/procstack 917522 2>&1' timed out after 60 seconds
*** 2012-11-03 16:40:16.175
*** 2012-11-03 16:40:26.384
Waited for process J000 to initialize for 100 seconds
*** 2012-11-03 16:40:26.384
Dumping diagnostic information for J000:
OS pid = 917522
loadavg : 2.82 2.90 3.23
swap info: free_mem = 9488.88M rsv = 64.00M
           alloc = 240.96M avail = 16384.00M swap_free = 16143.04M
       F S      UID     PID    PPID   C PRI NI ADDR    SZ    WCHAN    STIME    TTY  TIME CMD
1040005 A   oracle  917522       1   0  60 20 1ad230590 89196          16:30:38      -  0:00 [oracle]
skgpgpstack: read() for cmd /bin/sh -c '/usr/bin/procstack 917522 2>&1' timed out after 60 seconds
*** 2012-11-03 16:42:29.100
*** 2012-11-03 16:42:39.305
Waited for process J000 to initialize for 110 seconds
*** 2012-11-03 16:42:39.305
Dumping diagnostic information for J000:
OS pid = 917522
loadavg : 4.05 3.26 3.32
swap info: free_mem = 9640.50M rsv = 64.00M
           alloc = 240.90M avail = 16384.00M swap_free = 16143.10M
       F S      UID     PID    PPID   C PRI NI ADDR    SZ    WCHAN    STIME    TTY  TIME CMD
1040005 A   oracle  917522       1   0  60 20 1ad230590 89196          16:30:38      -  0:00 [oracle]
skgpgpstack: read() for cmd /bin/sh -c '/usr/bin/procstack 917522 2>&1' timed out after 60 seconds
*** 2012-11-03 16:44:43.732
*** 2012-11-03 16:44:53.936
Waited for process J000 to initialize for 120 seconds
*** 2012-11-03 16:44:53.936
Dumping diagnostic information for J000:
OS pid = 917522
loadavg : 3.03 3.16 3.28
swap info: free_mem = 9667.09M rsv = 64.00M
           alloc = 240.84M avail = 16384.00M swap_free = 16143.16M
       F S      UID     PID    PPID   C PRI NI ADDR    SZ    WCHAN    STIME    TTY  TIME CMD
1040005 A   oracle  917522       1   0  60 20 1ad230590 89196          16:30:38      -  0:00 [oracle]
skgpgpstack: read() for cmd /bin/sh -c '/usr/bin/procstack 917522 2>&1' timed out after 60 seconds
*** 2012-11-03 16:47:00.265
Killing process (ospid 917522):  (reason=x4 error=0)
... and the process is still alive after kill!
*** 2012-11-03 17:05:23.892
Waited for process J000 to initialize for 60 seconds
*** 2012-11-03 17:05:23.892
Dumping diagnostic information for J000:
OS pid = 3915970
loadavg : 2.43 2.42 2.75
swap info: free_mem = 10365.04M rsv = 64.00M
           alloc = 239.53M avail = 16384.00M swap_free = 16144.47M
       F S      UID     PID    PPID   C PRI NI ADDR    SZ    WCHAN    STIME    TTY  TIME CMD
1040005 A   oracle 3915970       1   0  60 20 105d26590 89196          17:04:22      -  0:00 [oracle]
skgpgpstack: read() for cmd /bin/sh -c '/usr/bin/procstack 3915970 2>&1' timed out after 60 seconds
*** 2012-11-03 17:07:35.954
*** 2012-11-03 17:07:46.156
Waited for process J000 to initialize for 70 seconds
*** 2012-11-03 17:07:46.156
Dumping diagnostic information for J000:
OS pid = 3915970
loadavg : 2.24 2.33 2.67
swap info: free_mem = 10400.53M rsv = 64.00M
           alloc = 239.37M avail = 16384.00M swap_free = 16144.63M
       F S      UID     PID    PPID   C PRI NI ADDR    SZ    WCHAN    STIME    TTY  TIME CMD
1040005 A   oracle 3915970       1   0  60 20 105d26590 89196          17:04:22      -  0:00 [oracle]
skgpgpstack: read() for cmd /bin/sh -c '/usr/bin/procstack 3915970 2>&1' timed out after 60 seconds
*** 2012-11-03 17:09:58.294
*** 2012-11-03 17:10:08.495
Waited for process J000 to initialize for 80 seconds
*** 2012-11-03 17:10:08.495
Dumping diagnostic information for J000:
OS pid = 3915970
loadavg : 2.36 2.38 2.64
swap info: free_mem = 10389.09M rsv = 64.00M
           alloc = 239.23M avail = 16384.00M swap_free = 16144.77M
       F S      UID     PID    PPID   C PRI NI ADDR    SZ    WCHAN    STIME    TTY  TIME CMD
1040005 A   oracle 3915970       1   0  60 20 105d26590 89196          17:04:22      -  0:00 [oracle]
skgpgpstack: read() for cmd /bin/sh -c '/usr/bin/procstack 3915970 2>&1' timed out after 60 seconds
*** 2012-11-03 17:12:20.685
*** 2012-11-03 17:12:30.886
Waited for process J000 to initialize for 90 seconds
*** 2012-11-03 17:12:30.886
Dumping diagnostic information for J000:
还有个trc文件太大暂时不放了
系统应该是无法分配新的进程了,所以这些命令都卡死,  但是当时OS free的内存还有10G,也远没有达到最大进程数。
我最后的解决办法是直接reboot OS,重启后OK 各位大神有遇到过这种情况的吗?
论坛徽章:
6
嫦娥
日期:2006-04-13 09:55:49生肖徽章2007版:兔
日期:2008-01-02 17:35:53生肖徽章2007版:虎
日期:2008-01-02 17:35:53生肖徽章2007版:鼠
日期:2008-01-02 17:35:532011新春纪念徽章
日期:2011-02-18 11:43:34ITPUB 11周年纪念徽章
日期:2012-10-09 18:05:37
2#
发表于 2012-11-6 09:10 | 只看该作者

回帖奖励 +50

好像跟JOB有关:
1、kkjcre1p: unable to spawn jobq slave process
2、*** 2012-11-03 16:31:39.479
Waited for process J000 to initialize for 60 seconds
*** 2012-11-03 17:12:30.886
Waited for process J000 to initialize for 90 seconds


ksvsubmit: Process(O001) creation failed这个错好像跟processes不足有关,参考http://www.oracledatabase12g.com ... B8%80%E4%BE%8B.html,需要进一步确认~

使用道具 举报

回复
求职 : 数据库管理员
论坛徽章:
1
ITPUB社区千里马徽章
日期:2013-08-22 09:58:03
3#
 楼主| 发表于 2012-11-6 09:18 | 只看该作者
job_queue_processes   是默认值  10,当前可用的job不超过30,这个参数已经够用了
processes  数为  2000,当时出现异常时为周末,肯定没有达峰值。

使用道具 举报

回复
论坛徽章:
6
嫦娥
日期:2006-04-13 09:55:49生肖徽章2007版:兔
日期:2008-01-02 17:35:53生肖徽章2007版:虎
日期:2008-01-02 17:35:53生肖徽章2007版:鼠
日期:2008-01-02 17:35:532011新春纪念徽章
日期:2011-02-18 11:43:34ITPUB 11周年纪念徽章
日期:2012-10-09 18:05:37
4#
发表于 2012-11-6 09:29 | 只看该作者
不是job_queue_processes默认值的问题,而是那个时间点跑了什么JOB,是不是那个JOB造成的~

使用道具 举报

回复
求职 : 数据库管理员
论坛徽章:
10
ITPUB十周年纪念徽章
日期:2011-11-01 16:26:292014年新春福章
日期:2014-02-18 16:44:08优秀写手
日期:2013-12-27 06:00:12ITPUB社区千里马徽章
日期:2013-06-09 10:15:342013年新春福章
日期:2013-02-25 14:51:24奥运纪念徽章
日期:2012-11-28 09:33:31奥运纪念徽章
日期:2012-11-20 10:27:31ITPUB 11周年纪念徽章
日期:2012-10-09 18:16:00ITPUB 11周年纪念徽章
日期:2012-09-28 17:34:42马上有对象
日期:2014-02-18 16:44:08
5#
发表于 2012-11-6 09:34 | 只看该作者
如果当时能做个hanganalyze还是能清晰内部hang住的原因的,单从上面的trace来看仅仅就是一个子进程分配在等待,而等待往往是资源方面,内存 cpu 信号量等。

使用道具 举报

回复
求职 : 数据库管理员
论坛徽章:
1
ITPUB社区千里马徽章
日期:2013-08-22 09:58:03
6#
 楼主| 发表于 2012-11-6 09:46 | 只看该作者
dotaddjj 发表于 2012-11-6 09:34
如果当时能做个hanganalyze还是能清晰内部hang住的原因的,单从上面的trace来看仅仅就是一个子进程分配在等 ...

因为是生产系统,为了最短时间回复生产,所以当时没有多做分析,但是可以肯定应该不是内存问题,内存内存足够大,发生为题是还有10多G内存空闲。  还有哪些log 可供分析吗?

使用道具 举报

回复
论坛徽章:
51
ITPUB十周年纪念徽章
日期:2011-11-01 16:25:22铁扇公主
日期:2012-02-21 15:03:13最佳人气徽章
日期:2012-03-13 17:39:18ITPUB季度 技术新星
日期:2012-05-22 15:10:11ITPUB 11周年纪念徽章
日期:2012-10-09 18:13:332013年新春福章
日期:2013-02-25 14:51:24ITPUB社区12周年站庆徽章
日期:2013-08-12 09:34:36itpub13周年纪念徽章
日期:2014-09-28 10:55:55
7#
发表于 2012-11-6 10:03 | 只看该作者
GATHER_STATS_JOB: Stopped by Scheduler

可能是自动收集统计信息这个JOB影响的~
这种自动的JOB应该关掉~

使用道具 举报

回复
论坛徽章:
5
2010新春纪念徽章
日期:2010-03-01 11:19:072010广州亚运会纪念徽章:龙舟
日期:2010-12-24 16:20:552012新春纪念徽章
日期:2012-01-04 11:53:54奥运会纪念徽章:铁人三项
日期:2012-09-10 14:36:262013年新春福章
日期:2013-02-25 14:51:24
8#
发表于 2012-11-6 11:20 | 只看该作者
smitty chsys看看操作系统最大进程到底是多少。

使用道具 举报

回复
论坛徽章:
190
生肖徽章:狗
日期:2006-11-23 04:26:03生肖徽章:羊
日期:2007-09-26 17:08:21生肖徽章:马
日期:2007-09-26 17:08:49授权会员
日期:2007-12-31 19:14:41生肖徽章2007版:牛
日期:2008-03-28 10:02:30奥运会纪念徽章:柔道
日期:2008-04-30 16:28:44奥运会纪念徽章:垒球
日期:2008-05-12 21:28:28奥运会纪念徽章:体操
日期:2008-06-26 10:00:41奥运会纪念徽章:沙滩排球
日期:2008-07-27 12:41:59奥运会纪念徽章:艺术体操
日期:2008-07-30 11:09:47
9#
发表于 2012-11-6 11:25 | 只看该作者
本帖最后由 jieyancai 于 2012-11-6 13:28 编辑

vmo -a
看看配置

使用道具 举报

回复
求职 : 数据库管理员
论坛徽章:
1
ITPUB社区千里马徽章
日期:2013-08-22 09:58:03
10#
 楼主| 发表于 2012-11-6 11:33 | 只看该作者
lsattr -El sys0
SW_dist_intr    false              Enable SW distribution of interrupts              True
autorestart     true               Automatically REBOOT OS after a crash             True
boottype        disk               N/A                                               False
capacity_inc    1.00               Processor capacity increment                      False
capped          true               Partition is capped                               False
conslogin       enable             System Console Login                              False
cpuguard        enable             CPU Guard                                         True
dedicated       true               Partition is dedicated                            False
enhanced_RBAC   true               Enhanced RBAC Mode                                True
ent_capacity    2.00               Entitled processor capacity                       False
frequency       1593000000         System Bus Frequency                              False
fullcore        false              Enable full CORE dump                             True
fwversion       IBM,EL340_075      Firmware version and revision levels              False
id_to_partition 0X80000D50B4E00001 Partition ID                                      False
id_to_system    0X80000D50B4E00000 System ID                                         False
iostat          true               Continuously maintain DISK I/O history            True
keylock         normal             State of system keylock at boot time              False
log_pg_dealloc  true               Log predictive memory page deallocation events    True
max_capacity    2.00               Maximum potential processor capacity              False
max_logname     9                  Maximum login name length at boot time            True
maxbuf          20                 Maximum number of pages in block I/O BUFFER CACHE True
maxmbuf         0                  Maximum Kbytes of real memory allowed for MBUFS   True
maxpout         8193               HIGH water mark for pending write I/Os per file   True
maxuproc        10000              Maximum number of PROCESSES allowed per user      Truemin_capacity    1.00               Minimum potential processor capacity              False
minpout         4096               LOW water mark for pending write I/Os per file    True
modelname       IBM,8203-E4A       Machine name                                      False
ncargs          256                ARG/ENV list size in 4K byte blocks               True
nfs4_acl_compat secure             NFS4 ACL Compatibility Mode                       True
pre430core      false              Use pre-430 style CORE dump                       True
pre520tune      disable            Pre-520 tuning compatibility mode                 True
realmem         32505856           Amount of usable physical memory in Kbytes        False
rtasversion     1                  Open Firmware RTAS version                        False
sed_config      select             Stack Execution Disable (SED) Mode                True
systemid        IBM,02068B972      Hardware system identifier                        False
variable_weight 0                  Variable processor capacity weight                False

最大process为10000 肯定够用的  4CORE 32GB P6小机 硬件还是够用的

使用道具 举报

回复

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

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表