1. 程式人生 > >ADG terminated by LGWR, terminating the instance

ADG terminated by LGWR, terminating the instance

11.2.0.4 RAC TO RAC FOR ADG環境。由於歷史原因,備庫節點二一直沒有啟動,一直是啟動節點一對外提供服務。節點一alert報錯,lgwr進行kill例項操作並自行重啟。
Mon Dec 24 16:11:24 2018
Archived Log entry 262740 added for thread 2 sequence 185858 ID 0x92570693 dest 1:
Mon Dec 24 16:12:28 2018
Exception [type: SIGSEGV, Address not mapped to object] [ADDR:0x7FFCD7489FF8] [PC:0x9899B16, qcsAnalyzeBooleanExpr()+144] [flags: 0x0, count: 1]
Errors in file /u01/app/oracle/diag/rdbms/qdb/qdb1/trace/qdb1_ora_18912.trc (incident=580470):
ORA-07445: exception encountered: core dump [qcsAnalyzeBooleanExpr()+144] [SIGSEGV] [ADDR:0x7FFCD7489FF8] [PC:0x9899B16] [Address not mapped to object] []
Incident details in: /u01/app/oracle/diag/rdbms/qdb/qdb1/incident/incdir_580470/qdb1_ora_18912_i580470.trc
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.

根據丟擲的trc檔案,我們可以追蹤到時間段內的某條SQL

** 2018-12-24 16:12:28.596
dbkedDefDump(): Starting a non-incident diagnostic dump (flags=0x3, level=3, mask=0x0)
----- Current SQL Statement for this session (sql_id=34vxxxxxx) -----
select
from MSS.T_MSS_MOBILE_LOGIN_ADDR where UUID in ('7xxxxx4xxxxxx', '48xxxxxxx, 。。。。。。
整個trc檔案190M,文字內容UUID幾乎佔了整個檔案。

new 2: where owner = 'MSS' and segment_name = 'T_MSS_MOBILE_LOGIN_ADDR'

OWNER SEGMENT_NAME SEGMENT_TYPE Total_Bytes(MB)


MSS T_MSS_MOBILE_LOGIN_ADDR TABLE PARTITION 230054

[[email protected] trace]$ du -sh /u01/app/oracle/diag/rdbms/qdb/qdb1/incident/incdir_580470/qdb1_ora_18912_i580470.trc
190M /u01/app/oracle/diag/rdbms/qdb/qdb1/incident/incdir_580470/qdb1_ora_18912_i580470.trc

緊接著系統報了4021錯誤程式碼
Mon Dec 24 16:30:17 2018
System State dumped to trace file /u01/app/oracle/diag/rdbms/qdb/qdb1/trace/qdb1_ora_67693.trc
Mon Dec 24 16:32:32 2018
Errors in file /u01/app/oracle/diag/rdbms/qdb/qdb1/trace/qdb1_lgwr_39157.trc:
ORA-04021: timeout occurred while waiting to lock object
LGWR (ospid: 39157): terminating the instance due to error 4021
一直到最後的kill 例項,自動重啟
Mon Dec 24 16:32:39 2018
License high water mark = 1203
Instance terminated by LGWR, pid = 39157
USER (ospid: 6702): terminating the instance
Instance terminated by USER, pid = 6702
Mon Dec 24 16:32:48 2018
Starting ORACLE instance (normal)

查詢MOS相關文件,有一篇文件與我們的環境相符
ORA-04021: timeout occurred while waiting to lock object : DR Instance terminated by LGWR (文件 ID 2183882.1)
ADG terminated by LGWR, terminating the instance
ADG terminated by LGWR, terminating the instance

命中了BUG了。根據bug描述,需要修改引數
SQL> show parameter cursor_sharing

NAME TYPE VALUE


cursor_sharing string EXACT
在cursor設定為exact時,兩條sql語句如果存在一點不同,就不會共享cursor,而進行兩次硬解析。
設定為force時Oracle對輸入的SQL值,會將where條件取值自動替換為繫結變數。以後在輸入相同的結構SQL語句時,會進行cursor sharing共享遊標
根據這個臨時方案,我做了一個小實驗。我在主庫建立了一個t表作為該引數的測試

14:35:02 [email protected](bapdb1)> create table t as select * from dba_objects;

Table created.

然後到備庫進行具體實驗。

ADG terminated by LGWR, terminating the instance
ADG terminated by LGWR, terminating the instance

Mark一下,擇日進行引數修改。