监控系统监控到RAC 的一个实例异常关闭 ,时间是凌晨1点多,还好没有影响到业务

之后就是分析原因

这套RAC搭建在虚拟化环境OS SUSE11

查看oracel alert log信息

 Mon Dec 04 01:16:20 2017
Thread 1 advanced to log sequence 26371 (LGWR switch)
Current log# 2 seq# 26371 mem# 0: +DATA/mgr/onlinelog/group_2.258.887111011
Current log# 2 seq# 26371 mem# 1: +FRA/mgr/onlinelog/group_2.258.887111015
Mon Dec 04 01:16:20 2017
Archived Log entry 52713 added for thread 1 sequence 26370 ID 0x6c454da0 dest 1:
Mon Dec 04 01:24:14 2017
LMS0 (ospid: 17259) has not called a wait for 97 secs. <<<<<<<<<<<===========
Mon Dec 04 01:24:29 2017
Errors in file /oracle/product/diag/rdbms/mgr/mgr1/trace/mgr1_lmhb_17273.trc (incident=252137):
ORA-29770: ?????? LMS0 (OSID 17259) ???????? 70 ?
Incident details in: /oracle/product/diag/rdbms/mgr/mgr1/incident/incdir_252137/mgr1_lmhb_17273_i252137.trc <<<<<<<<<<<===========
Mon Dec 04 01:24:40 2017
ERROR: Some process(s) is not making progress. <<<<<<<<<<<===========
LMHB (ospid: 17273) is terminating the instance.
Please check LMHB trace file for more details.
Please also check the CPU load, I/O load and other system properties for anomalous behavior <<<<<<<<<<<===========
ERROR: Some process(s) is not making progress.
LMHB (ospid: 17273): terminating the instance due to error 29770 <<<<<<<<<<<===========
Mon Dec 04 01:24:41 2017
System state dump requested by (instance=1, osid=17273 (LMHB)), summary=[abnormal instance termination].
System State dumped to trace file /oracle/product/diag/rdbms/mgr/mgr1/trace/mgr1_diag_17245.trc
Mon Dec 04 01:24:41 2017
ORA-1092 : opitsk aborting process
Dumping diagnostic data in directory=[cdmp_20171204012441], requested by (instance=1, osid=17273 (LMHB)), summary=[abnormal instance termination].
Mon Dec 04 01:24:46 2017
ORA-1092 : opitsk aborting process
Termination issued to instance processes. Waiting for the processes to exit
Mon Dec 04 01:24:53 2017
ORA-1092 : opitsk aborting process
Mon Dec 04 01:24:53 2017
License high water mark = 43
Mon Dec 04 01:24:54 2017
Instance termination failed to kill one or more processes
Instance terminated by LMHB, pid = 17273
USER (ospid: 3513): terminating the instance
Instance terminated by USER, pid = 3513
Mon Dec 04 01:25:18 2017
Starting ORACLE instance (normal)

从日志信息来看,LMS0进程1:24:14时已经等待97s,之后生成trace文件,之后报错ORA-29770,之后实例被终止。

科普一下LMS进程:

LMSn进程会维护在Global Resource Directory (GRD)中的数据文件以及每个cached block的状态。LMSn用于在RAC的实例间进行message以及数据块的传输,这个对应的服务也就是GCS(Global Cache Service),LMS是Cache Fusion的一个重要部分。LMS进程可以说是RAC上最活跃的后台进程,会消耗较多的CPU.一般每个实例会有多个LMS进程,每个Oracle版本的默认的LMS进程数目会有所不同,大部分版本的默认值是:MIN(CPU_COUNT/2, 2))

ORACLE报错信息

ORA-29770: global enqueue process LMS0 (OSID 17259) is hung for more than 70 seconds

报错生成了trace文件

Relevant Information Collection
---------------------------------------
System name: Linux
Node name: mgrdb01
Release: 3.0.76-0.11-default
Version: #1 SMP Fri Jun 14 08:21:43 UTC 2013 (ccab990)
Machine: x86_64
VM name: VMWare Version: 6 <<<<<<<=============
Instance name: mgr1
Redo thread mounted by this instance: 1
Oracle process number: 17
Unix process pid: 17273, image: oracle@mgrdb01 (LMHB) <<<<<<<============= *** 2017-12-04 01:23:14.315
*** SESSION ID:(1599.1) 2017-12-04 01:23:14.315
*** CLIENT ID:() 2017-12-04 01:23:14.315
*** SERVICE NAME:(SYS$BACKGROUND) 2017-12-04 01:23:14.315
*** MODULE NAME:() 2017-12-04 01:23:14.315
*** ACTION NAME:() 2017-12-04 01:23:14.315 *** TRACE FILE RECREATED AFTER BEING REMOVED *** *** 2017-12-04 01:23:14.314
==============================
LMS0 (ospid: 17259) has not moved for 41 sec (1512321794.1512321753) <<<<<<<=============
kjfmGCR_HBCheckAll: LMS0 (ospid: 17259) has status 2
: Not in wait; last wait ended 37 secs ago.
: last wait_id 570620887 at 'gcs remote message'. <<<<<<<=============
==============================
Dumping PROCESS LMS0 (ospid: 17259) States
==============================
===[ Callstack ]=== *** 2017-12-04 01:23:14.316
Process diagnostic dump for oracle@mgrdb01 (LMS0), OS id=17259,
pid: 13, proc_ser: 1, sid: 1223, sess_ser: 1
-------------------------------------------------------------------------------
os thread scheduling delay history: (sampling every 1.000000 secs)
0.000000 secs at [ 01:23:13 ]
NOTE: scheduling delay has not been sampled for 0.935154 secs 0.000000 secs from [ 01:23:09 - 01:23:14 ], 5 sec avg
0.000000 secs from [ 01:22:15 - 01:23:14 ], 1 min avg
0.000000 secs from [ 01:18:15 - 01:23:14 ], 5 min avg
loadavg : 22.91 7.20 2.77
Memory (Avail / Total) = 92815.82M / 129069.95M
Swap (Avail / Total) = 16384.00M / 16384.00M
F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD
0 D oracle 17259 1 0 58 - - 12123770 sleep_ Sep25 ? 14:24:46 ora_lms0_mgr1 <<<<<<<============= lms0 is in status 'D'.uninterruptible I/O . *** 2017-12-04 01:23:19.322
Short stack dump: ORA-32516: ?????? 'Unix process pid: 17259, image: oracle@mgrdb01 (LMS0)' ??? ORADEBUG ?? 'SHORT_STACK'; ?????? 4920 ?? -------------------------------------------------------------------------------
Process diagnostic dump actual duration=5.010000 sec
(max dump time=5.000000 sec) *** 2017-12-04 01:23:19.322
kjgcr_SlaveReqBegin: message queued to slave
kjgcr_Main: KJGCR_ACTION - id 3
CPU is high. Top oracle users listed below: <<<<<<<============= CPU is high , but no oracle user consuming high CPU .
Session Serial CPU
1882 1 0
1 28043 0
95 1 0
97 24343 0
189 1 0 *** 2017-12-04 01:23:24.390
kjgcr_Main: Reset called for action high cpu, identify users, count 0 *** 2017-12-04 01:23:24.391
kjgcr_Main: Reset called for action high cpu, kill users, count 0 *** 2017-12-04 01:23:24.391
kjgcr_Main: Reset called for action high cpu, activate RM plan, count 0 *** 2017-12-04 01:23:24.391
kjgcr_Main: Reset called for action high cpu, set BG into RT, count 0 *** 2017-12-04 01:23:34.391
==============================
LMS0 (ospid: 17259) has not moved for 61 sec (1512321814.1512321753) <<<<<<<=============
kjfmGCR_HBCheckAll: LMS0 (ospid: 17259) has status 2
: Not in wait; last wait ended 57 secs ago.
: last wait_id 570620887 at 'gcs remote message'.
...... *** 2017-12-04 01:23:54.401
Process diagnostic dump for oracle@mgrdb01 (LMS0), OS id=17259,
pid: 13, proc_ser: 1, sid: 1223, sess_ser: 1
-------------------------------------------------------------------------------
os thread scheduling delay history: (sampling every 1.000000 secs)
0.000000 secs at [ 01:23:53 ]
NOTE: scheduling delay has not been sampled for 0.859464 secs 0.000000 secs from [ 01:23:49 - 01:23:54 ], 5 sec avg
0.000000 secs from [ 01:22:55 - 01:23:54 ], 1 min avg
0.000000 secs from [ 01:18:55 - 01:23:54 ], 5 min avg
loadavg : 31.82 11.43 4.38
Memory (Avail / Total) = 92795.89M / 129069.95M
Swap (Avail / Total) = 16384.00M / 16384.00M
F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD
0 D oracle 17259 1 0 58 - - 12123770 sleep_ Sep25 ? 14:24:46 ora_lms0_mgr1 <<<<<<<============= still 'D' *** 2017-12-04 01:23:59.409
Short stack dump: ORA-32515: ???? ORADEBUG ?? 'SHORT_STACK' ??? 'Unix process pid: 17259, image: oracle@mgrdb01 (LMS0)'; ???????????? 4930 ?? -------------------------------------------------------------------------------
Process diagnostic dump actual duration=5.010000 sec
(max dump time=5.000000 sec) *** 2017-12-04 01:23:59.410
kjgcr_Main: KJGCR_ACTION - id 5 *** 2017-12-04 01:24:14.409
==============================
LMS0 (ospid: 17259) has not moved for 101 sec (1512321854.1512321753)
kjfmGCR_HBCheckAll: LMS0 (ospid: 17259) has status 6
==================================================
=== LMS0 (ospid: 17259) Heartbeat Report
==================================================
LMS0 (ospid: 17259) has no heartbeats for 101 sec. (threshold 70 sec)
: Not in wait; last wait ended 97 secs ago.
: last wait_id 570620887 at 'gcs remote message'.
==============================
Dumping PROCESS LMS0 (ospid: 17259) States <<<<<<<=============
==============================
===[ System Load State ]===
CPU Total 32 Core 32 Socket 4
Load normal: Cur 9144 Highmark 40960 (35.71 160.00)
===[ Latch State ]===
Not in Latch Get
===[ Session State Object ]===
----------------------------------------
SO: 0xb98ef85d8, type: 4, owner: 0xb88bf79d0, flag: INIT/-/-/0x00 if: 0x3 c: 0x3
proc=0xb88bf79d0, name=session, file=ksu.h LINE:12624, pg=0
(session) sid: 1223 ser: 1 trans: (nil), creator: 0xb88bf79d0
flags: (0x51) USR/- flags_idl: (0x1) BSY/-/-/-/-/-
flags2: (0x409) -/-/INC
DID: , short-term DID:
txn branch: (nil)
oct: 0, prv: 0, sql: (nil), psql: (nil), user: 0/SYS
ksuxds FALSE at location: 0
service name: SYS$BACKGROUND
Current Wait Stack:
Not in wait; last wait ended 1 min 37 sec ago <<<<<<<============= not in wait.
Wait State:
fixed_waits=0 flags=0x21 boundary=(nil)/-1
Session Wait History:
elapsed time of 1 min 37 sec since last wait
0: waited for 'gcs remote message'<<<<<<<=============
waittime=0x1, poll=0x0, event=0x0
wait_id=570620887 seq_num=7644 snap_id=1
wait times: snap=0.001200 sec, exc=0.001200 sec, total=0.001200 sec
wait times: max=0.010000 sec
wait counts: calls=1 os=1
occurred after 0.000218 sec of elapsed time
1: waited for 'gcs remote message'
waittime=0x1, poll=0x0, event=0x0
wait_id=570620886 seq_num=7643 snap_id=1
wait times: snap=0.006362 sec, exc=0.006362 sec, total=0.006362 sec
wait times: max=0.010000 sec
wait counts: calls=1 os=1
occurred after 0.000022 sec of elapsed time

通过trace文件可以看到,lms0 的状态是 'D'

D是什么意思?

Linux进程状态:D (TASK_UNINTERRUPTIBLE),不可中断的睡眠状态。

引起D状态的根本原因是由于IO等待,若你对某个磁盘的IO操作特别频繁,就会造成后续的IO操作处于等待状态,即处于D状态。

也就是说LMS0进程在不可中断的睡眠状态,同时CPU很高,但是不是ORACLE用户占用的。

到这里就可以怀疑,问题可能出现在OS层面,去查看OSwatcher监控信息

zzz ***Mon Dec 4 01:21:02 CST 2017
procs -----------memory---------- ---swap-- -----io---- -system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
5 0 0 95113492 1518640 31129980 0 0 3 5 0 0 1 0 99 0 0
0 0 0 95107952 1518640 31130044 0 0 80 1 6505 8514 2 1 97 0 0
0 0 0 95107652 1518640 31130020 0 0 80 34 4694 7057 1 0 99 0 0
zzz ***Mon Dec 4 01:21:32 CST 2017
procs -----------memory---------- ---swap-- -----io---- -system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
4 0 0 95120764 1518644 31130072 0 0 3 5 0 0 1 0 99 0 0
1 0 0 95116052 1518644 31130136 0 0 80 1 6378 8855 2 1 97 0 0
0 0 0 95115644 1518644 31130132 0 0 16 34 5174 7705 1 0 99 0 0
zzz ***Mon Dec 4 01:24:53 CST 2017
procs -----------memory---------- ---swap-- -----io---- -system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
8 6 0 96085040 1518752 31135792 0 0 3 5 0 0 1 0 99 0 0
2 0 0 96155748 1518772 31120520 0 0 0 9642 11662 9591 9 5 84 3 0
1 0 0 97170696 1518780 30175204 0 0 0 2749 5527 6026 3 2 95 0 0
zzz ***Mon Dec 4 01:25:23 CST 2017
procs -----------memory---------- ---swap-- -----io---- -system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
4 0 0 117056400 1518796 10318440 0 0 3 5 0 0 1 0 99 0 0
0 0 0 117052664 1518796 10318456 0 0 0 230 3792 4556 0 1 99 0 0
1 0 0 116783816 1518796 10587120 0 0 0 841 3856 4530 1 2 97 0 0
vmstat 采样间隔为30秒,但是从01:21:32 之后一直到01:24:53之间的记录都没有 。说明OS在此期间性能很差。 
性能差到什么程度,简单的top,iostat,ps都无法生成,直接导致lms进程通信障碍。
问题定位到OS层面,很可惜我们抛开了oracle的嫌疑,但是OS工程师并没有找到问题的根因。

RAC 单节点实例异常关闭,关键报错ORA--29770的更多相关文章

  1. dbstart和dbshut启动、关闭数据库报错ORACLE_HOME_LISTNER is not SET解决办法

    dbstart启动数据库报错,如下: [oracle@wen ~]$ dbstartORACLE_HOME_LISTNER is not SET, unable to auto-start Oracl ...

  2. RAC+单节点搭建DG

    primary RAC to single standby 参考文献:RAC+单实例DATAGUARD 配置   http://blog.csdn.net/miyatang/article/detai ...

  3. MongoDB在已有账号的实例下还原数据库报错的分析(error applying oplog)

    一. 背景 今天在MongoDB 4.0.4版本下,在还原恢复数据库时报错. 主要错误为: Failed: restore error: error applying oplog: applyOps: ...

  4. Oracle RAC集群搭建(zero)--全是报错

    1. 提示Check if the DISPLAYvariable is set.    Failed<<<< 解决方案: #xhost +  //切换到root用户输入 #s ...

  5. Websocket 关闭浏览器报错

    这个报错,是因为你关闭之后,websocket 自动连接失败造成的 只要在你的websocket 运行的类里面加上: @OnError public void onError(Throwable e, ...

  6. Rac grid用户启停监听报错无权限

    [grid@max1 ~]$ lsnrctl stop LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 04-NOV-2016 00:20: ...

  7. mongodb之 非正常关闭启动报错处理

    Mongodb如果非正常关闭,直接启动会报错.查看日志文件. 处理: 需要做的是删除mongod.lock和WiredTiger.lock这两个lock文件,然后执行--repair,这里的mongo ...

  8. centos 关闭selinux 临时关闭selinux 报错 setenforce: setenforce() failed

    关闭selinux的方法有两种:临时关闭和永久关闭. 查看selinux的状态:estatus [root@--- ~]# sestatus SELinux status: enabled SELin ...

  9. nginx关闭php报错页面显示

    默认情况下nginx是会显示php的报错的,如果要关闭报错显示,需要在/usr/local/php7/etc/php-fpm.d/www.conf文件里面设置,貌似默认情况下在php.ini关闭没效果 ...

随机推荐

  1. 使用 Craft CMS 搭建blog模型

    原文链接:http://www.supperxin.com/Coding/Details/create-blog-using-craft-cms Craft CMS站点的搭建可以参考这篇:使用Dock ...

  2. Java 基础【04】数组内存分配

    可能Java 数组大家都很熟悉,最近我遇到了一个关于Java 数组内存分配的问题. 突然发现许多书上“基本数据类型存储在栈内存当中,对象则保存在堆内存”这句话完全是错误的.下面是个简单的例子代码: p ...

  3. ZSTU 4241 圣杯战争(ST表+二分)

    题目链接  ZSTU 4241 问题转化为有很多区间,现在每次给定一个区间求这个区间和之前所有区间中的某一个的交集的最大长度. 强制在线. 首先我们把所有的区间预处理出来. 然后去重(那些被包含的小区 ...

  4. Careercup | Chapter 2

    链表的题里面,快慢指针.双指针用得很多. 2.1 Write code to remove duplicates from an unsorted linked list.FOLLOW UPHow w ...

  5. Jackson反序列化错误:com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field的解决方法

    说明:出现这种问题的情况是由于JSON里面包含了实体没有的字段导致反序列化失败. 解决方法: // 第一种解决方案 // ObjectMapper对象添加 mapper.configure(Deser ...

  6. C中的继承和多态

    昨天同学面试被问到这个问题,很有水平,以前都没有遇到过这个问题,一时自己也不知道怎么回答. 网上学习了一下,记录以备后用! C/C++ Internals : 里面的问题都写的不错,可以读读! Ref ...

  7. PADS的历史版本

    1986年:PADS PCB,DOS操作系统 1989年:PADS Logic,DOS操作系统 1990年:PADS 2000,DOS操作系统 1993年:PADS Perform,DOS和Windo ...

  8. Allegro基本操作——PCB布线

    转:http://blog.sina.com.cn/s/blog_1538bc9470102vyyq.html http://www.elecfans.com/article/80/110/2010/ ...

  9. Unity3D总结:关于射线碰撞

    方法一:Physics.Raycast 光线投射 1.static function Raycast (origin : Vector3, direction : Vector3, distance  ...

  10. 看完此文,妈妈还会担心你docker入不了门?

    本文在个人技术博客不同步发布,详情可猛戳 亦可扫描屏幕右侧二维码关注个人公众号,公众号内有个人联系方式,等你来撩...   上周对象突然心血来潮说想养个小宠物,我问想养啥她又说随便,你看着办!!!这我 ...