3 nodes Rac, in a PSU activity, the cluster on first node failed to startup after patching.
Below is the error in alertnode1.log:
2012-09-22 03:01:39.894
[ohasd(28563)]CRS-2112:The OLR service started on node cintrnpdb001.
2012-09-22 03:01:39.917
[ohasd(28563)]CRS-1301:Oracle High Availability Service started on node cintrnpdb001.
2012-09-22 03:01:39.918
[ohasd(28563)]CRS-8017:location: /etc/oracle/lastgasp has 2 reboot advisory log files, 0 were announced and 0 errors occurred
2012-09-22 03:01:53.765
[gpnpd(28771)]CRS-2328:GPNPD started on node cintrnpdb001.
2012-09-22 03:01:56.228
[cssd(28831)]CRS-1713:CSSD daemon is started in clustered mode
2012-09-22 03:11:55.298
[/prod/product/oracle/11.2.0.2/grid/bin/cssdagent(28819)]CRS-5818:Aborted command 'start for resource: ora.cssd 1 1' for resource 'ora.cssd'. Details at (:CRSAGF00113:) {0:0:2} in /prod/product/oracle/11.2.0.2/grid/log/cintrnpdb001/agent/ohasd/oracssdagent_root/oracssdagent_root.log.
2012-09-22 03:11:55.299
[cssd(28831)]CRS-1656:The CSS daemon is terminating due to a fatal error; Details at (:CSSSC00012:) in /prod/product/oracle/11.2.0.2/grid/log/cintrnpdb001/cssd/ocssd.log
2012-09-22 03:11:55.299
[cssd(28831)]CRS-1603:CSSD on node cintrnpdb001 shutdown by user.
During the whole time cssd.log keep throwing below error:
2012-09-22 03:00:00.546: [ GPNP][2692574496]clsgpnpm_newWiredMsg: [at clsgpnpm.c:741] Msg-reply has soap fault 10 (Operation returned Retry (error CLSGPNP_CALL_AGAIN)) [uri "http://www.grid-pnp.org/2005/12/gpnp-errors#"]
2012-09-22 03:00:02.558: [ GPNP][2692574496]clsgpnpm_newWiredMsg: [at clsgpnpm.c:741] Msg-reply has soap fault 10 (Operation returned Retry (error CLSGPNP_CALL_AGAIN)) [uri "http://www.grid-pnp.org/2005/12/gpnp-errors#"]
2012-09-22 03:00:04.568: [ GPNP][2692574496]clsgpnpm_newWiredMsg: [at clsgpnpm.c:741] Msg-reply has soap fault 10 (Operation returned Retry (error CLSGPNP_CALL_AGAIN)) [uri "http://www.grid-pnp.org/2005/12/gpnp-errors#"]
Above information show that cssd failed to get GPNPD profile.
Let's go to check gpnpd to see what's wrong:
2012-09-22 02:46:51.594: [ GPNP][1088584000]clsgpnp_profileCallUrlInt: [at clsgpnp.c:2104] put-profile call to url "tcp://cintrnpdb003:33612" disco "mdns:service:gpnp._tcp.local.://cintrnpdb003:33612/agent=gpnpd,cname=crs_transp,host=cintrnpdb003,pid=20890/gpnpd h:cintrnpdb003 c:crs_transp" [f=0 claimed- host:cintrnpdb001 cname:crs_transp seq:6 auth:CN=GPnP_peer]
2012-09-22 02:47:05.424: [ OCRMSG][1085512000]GIPC error [29] msg [gipcretConnectionRefused]
2012-09-22 02:47:26.446: [ OCRMSG][1085512000]GIPC error [29] msg [gipcretConnectionRefused]
From above we can see when first node's gpnpd startup, it send a call to third node's gpnpd, but get no response.
So till now we can suspect that the issue is because gpnpd on third node have some issue.
After i kill gpnpd.bin on third node and let it re-start, the cluster on first node succeed startup immediately.
More......
GE, AGFA. experienced in 9i/10g/11g/12c, AdvanceReplication, Stream, GoldenGate, RAC, DataGuard, ODA, EXADATA, GridControl. In my career I have always been assigned to handle most complicated and critical oracle issues without solution online, and I hope to record some of them via this blog.
September 22, 2012
cluster on first node failed to startup after reboot due to GPNP hang on third node
September 12, 2012
CSSD terminated from clssnmvDiskPingMonitorThread without disk timeout countdown
One node's cluster suddenly terminated.
Below is the message in cluster's alert.log:
2012-09-11 11:41:30.328
[ctssd(22428)]CRS-2409:The clock on host node8 is not synchronous with the mean cluster time. No action has been taken as the Cluster Time Synchroniza
tion Service is running in observer mode.
2012-09-11 12:30:03.122
[cssd(21061)]CRS-1606:The number of voting files available, 0, is less than the minimum number of voting files required, 1, resulting in CSSD termination to
ensure data integrity; details at (:CSSNM00018:) in /prod/grid/11.2.0/grid/log/node8/cssd/ocssd.log
2012-09-11 12:30:03.123
[cssd(21061)]CRS-1656:The CSS daemon is terminating due to a fatal error; Details at (:CSSSC00012:) in /prod/grid/11.2.0/grid/log/node8/cssd/ocssd.log
2012-09-11 12:30:03.233 [cssd(21061)]CRS-1652:Starting clean up of CRSD resources.
Let‘s check ocssd.log:
2012-09-11 12:30:02.543: [ CSSD][1113450816]clssnmSendingThread: sending status msg to all nodes
2012-09-11 12:30:02.543: [ CSSD][1113450816]clssnmSendingThread: sent 5 status msgs to all nodes
2012-09-11 12:30:03.122: [ CSSD][1082489152](:CSSNM00018:)clssnmvDiskCheck: Aborting, 0 of 1 configured voting disks available, need 1
2012-09-11 12:30:03.123: [ CSSD][1082489152]###################################
2012-09-11 12:30:03.123: [ CSSD][1082489152]clssscExit: CSSD aborting from thread clssnmvDiskPingMonitorThread
2012-09-11 12:30:03.123: [ CSSD][1082489152]###################################
2012-09-11 12:30:03.123: [ CSSD][1082489152](:CSSSC00012:)clssscExit: A fatal error occurred and the CSS daemon is terminating abnormally
So it looks like an IO issue to VOTEDISK.
But after checking we didn't find any abnormal or error message from neither OS level nor storage side.
Then i reviewed the ocssd.log, and with surprise i found there is no long-disk timeout countdown in log.
We know if ocssd failed to reach Votedisk, then it will start to count 200s. Only if after 200s the votedisk still unavailable, then occsd will terminated itself.
The countdown information should be like:
clssscMonitorThreads clssnmvDiskPingThread not scheduled for 16020 msecs
But in our case, there is not such countdown, the occssd just terminated from clssnmvDiskPingMonitorThread all of a sudden.
It should be a bug instead of VOTEDISK IO issue. I will raise an SR with oracle support for further checking.
More......
September 5, 2012
RAC: "CRS-0184: Cannot communicate with the CRS daemon“ due to EVMD
One node of a Rac server get some trouble, its CRSD keep terminating and rebooting. When try to query CRSD will get error “Cannot communicate with the CRS daemon”.
Below error repeate in alertnode1.log:
2012-08-28 19:32:32.995 [ohasd(26038)]CRS-2765:Resource 'ora.crsd' has failed on server 'racnode001'. 2012-08-28 19:32:38.319 [crsd(13117)]CRS-1012:The OCR service started on node racnode001. 2012-08-28 19:42:54.134 [crsd(13117)]CRS-0810:Cluster Ready Service aborted due to failure to communicate
with Event Management Service with error [1].
Details at (:CRSD00120:) in /prod/grid/11.2.0.2/grid/log/racnode001/crsd/crsd.log.
2012-08-28 19:42:54.804
[ohasd(26038)]CRS-2765:Resource 'ora.crsd' has failed on server 'racnode001'.
2012-08-28 19:42:59.175
[crsd(10695)]CRS-1012:The OCR service started on node cihcispdb001.
2012-08-28 19:53:15.226
[crsd(10695)]CRS-0810:Cluster Ready Service aborted due to failure to communicate with Event Management Service with error [1]. Details at (:CRSD00120:) in /prod/grid/11.2.0.2/grid/log/racnode001/crsd/crsd.log. 2012-08-28 19:53:15.575 [ohasd(26038)]CRS-2765:Resource 'ora.crsd' has failed on server 'racnode001'.
From above log we can see CRSD keep failing and rebooting.
Let‘s check crsd.log to see detail:
2012-08-29 18:07:25.462: [ default][3503137264] CRS Daemon Starting
2012-08-29 18:07:25.464: [ default][1106962752] Policy Engine is not initialized yet!
2012-08-29 18:07:25.465: [ default][3503137264] ENV Logging level for Module: AGENT 1
2012-08-29 18:07:25.465: [ default][3503137264] ENV Logging level for Module: AGFW 0
.............
.............
2012-08-29 18:15:40.648: [ COMMCRS][3503137264]Authorization failed, network error
2012-08-29 18:15:55.584: [ CRSMAIN][1106962752] Policy Engine is not initialized yet!
2012-08-29 18:16:11.408: [ COMMCRS][3503137264]Authorization failed, network error
2012-08-29 18:16:25.586: [ CRSMAIN][1106962752] Policy Engine is not initialized yet!
2012-08-29 18:16:41.668: [ COMMCRS][3503137264]Authorization failed, network error
2012-08-29 18:16:55.597: [ CRSMAIN][1106962752] Policy Engine is not initialized yet!
2012-08-29 18:17:12.929: [ COMMCRS][3503137264]Authorization failed, network error
2012-08-29 18:17:25.609: [ CRSMAIN][1106962752] Policy Engine is not initialized yet!
2012-08-29 18:17:43.190: [ COMMCRS][3503137264]Authorization failed, network error
2012-08-29 18:17:43.191: [ CRSMAIN][3503137264] Created alert : (:CRSD00120:) : Could not init EVM, error: 1
2012-08-29 18:17:43.191: [ CRSD][3503137264][PANIC] CRSD exiting: Could not init EVMMgr.1
2012-08-29 18:17:43.191: [ CRSD][3503137264] Done.
2012-08-29 18:17:44.287: [ default][3316335088] First attempt: init CSS context succeeded.
2012-08-29 18:17:44.290: [ clsdmt][1078745408]PID for the Process [29342], connkey 1
2012-08-29 18:17:44.291: [ clsdmt][1078745408]Creating PID [29342] file for home /prod/grid/11.2.0.2/grid host racnode001 bin crs to /prod/grid/11.2.0.2/grid/crs/init/ 2012-08-29 18:17:44.291: [ clsdmt][1078745408]Writing PID [29342] to the file
[/prod/grid/11.2.0.2/grid/crs/init/racnode001.pid] 2012-08-29 18:17:45.182: [ default][1078745408] Policy Engine is not initialized yet!
We can see When CRSD starting up, it failed at initial EVENT Manager step. Let's check what's wrong with EVENT MANAGER.
Below is from evmd.log:
2012-08-29 16:12:18.636: [ COMMCRS][54275088]clsc_send: waiting for space to write
on icon (0x9d6fdc0). 0/88 sent 2012-08-29 16:12:26.660: [ COMMCRS][54275088]clsc_send: waiting for space to write
on icon (0x9d6fdc0). 0/88 sent 2012-08-29 16:12:34.676: [ COMMCRS][54275088]clsc_send: waiting for space to write
on icon (0x9d6fdc0). 0/88 sent 2012-08-29 16:12:42.711: [ COMMCRS][54275088]clsc_send: waiting for space to write
on icon (0x9d6fdc0). 0/88 sent
EVMD keep reporting above error message. It means when try to write icon on “/prod/grid/11.2.0.2/grid/auth/evm”, it failed due to lack of space.
But the mount point have enough space, so the possible reason evmd still keep throwing above error could be either:
1. bug
2. in some moment in history, the mount point was lack of space and EVMD was trapped in that state, and even though space released later, EVMD not automatically recovered.
The solution is simple, i reload the EVMD, and CRSD also become fine automaticlly:
2012-08-29 20:42:44.276
[crsd(6075)]CRS-1012:The OCR service started on node racnode001.
2012-08-29 20:52:58.684
[crsd(6075)]CRS-0810:Cluster Ready Service aborted due to failure to communicate with Event Management Service with error [1]. Details at (:CRSD00120:) in /prod/grid/11.2.0.2/grid/log/racnode001/crsd/crsd.log.
2012-08-29 20:52:58.850
[ohasd(26038)]CRS-2765:Resource 'ora.crsd' has failed on server 'racnode001'.
2012-08-29 20:53:03.131
[crsd(4699)]CRS-1012:The OCR service started on node racnode001.
2012-08-29 21:03:17.894
[crsd(4699)]CRS-0810:Cluster Ready Service aborted due to failure to communicate with Event Management Service with error [1]. Details at (:CRSD00120:) in /prod/grid/11.2.0.2/grid/log/racnode001/crsd/crsd.log.
2012-08-29 21:03:18.609
[ohasd(26038)]CRS-2765:Resource 'ora.crsd' has failed on server 'racnode001'.
2012-08-29 21:03:22.962
[crsd(28965)]CRS-1012:The OCR service started on node racnode001.
2012-08-29 21:11:48.965
[evmd(21764)]CRS-1401:EVMD started on node racnode001.
2012-08-29 21:11:52.774
[crsd(28965)]CRS-1201:CRSD started on node racnode001.
Then CRSD become normal:
racnode001 [+ASM1] /prod/grid/11.2.0.2/grid/log/racnode001/evmd > crsctl check crs CRS-4537: Cluster Ready Services is online CRS-4529: Cluster Synchronization Services is online CRS-4533: Event Manager is online
More......
September 2, 2012
Blocker=Waiter: Self Dead Lock caused within one session
We know very well about deadlock. We know deadlock happens when multiple sessions compete some resources.
And in some particular case, dead lock can also be caused within the same session, below is a example:
SQL> create index obj_ind4$ on obj$(name);
create index obj_ind4$ on obj$(name)
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-00060: deadlock detected while waiting for resource
Currently there is no lock on obj$, but when we try to create a index on it, it failed with dead lock issue.
Below is from the trace file:
*** 2012-07-02 09:13:45.155 *** SERVICE NAME:(SYS$USERS) 2012-07-02 09:13:45.154 *** SESSION ID:(135.46) 2012-07-02 09:13:45.154 DEADLOCK DETECTED [Transaction Deadlock] Current SQL statement for this session: update obj$ set obj#=:6,type#=:7,ctime=:8,mtime=:9,stime=:10,status=:11,dataobj#=:13,flags=:14,oid$=:15,spare1=:16, spare2=:17 where owner#=:1 and name=:2 and namespace =:3 and(remoteowner=:4 or remoteowner is null and :4 is null)and(linkname=:5 or linkname is null and :5 is null)and(subname=:12 or subname is null and :12 is null) The following deadlock is not an ORACLE error. It is a deadlock due to user error in the design of an application or from issuing incorrect ad-hoc SQL. The following information may aid in determining the deadlock: Deadlock graph: ---------Blocker(s)-------- ---------Waiter(s)--------- Resource Name process session holds waits process session holds waits TM-00000012-00000000 21 135 S 21 135 SX session 135: DID 0001-0015-0000001D session 135: DID 0001-0015-0000001D Rows waited on: Session 135: obj - rowid = 00000025 - AAAAAlAABAAAADhAAA (dictionary objn - 37, file - 1, block - 225, slot - 0) Information on the OTHER waiting sessions: End of information on OTHER waiting sessions. ===================================================
From above we can clearly see the blocker is session 21 as well as waiter, which means the deadlock is caused by the session 21 itself.
From the current SQL the reason is obviously:
to create a object, oracle need to insert a row of the object's detail into obj$ table. The Insert is an DML which require level 3 TM lock on obj$ table.
And since we are creating the index on obj$ table, the session also require exclusive lock on the table which means no DML is allowed on ojb$.
That's where the dead lock comes.
More......
August 7, 2012
SYSTEMSTATE DUMP: Shooting DB Hang, sqlplus Hang, self deadlock latch, PMON deadlock latch
One DB is hang. Try to login with "sqlplus / as sysdba" also fail, just hang there.
I use "-prelim" option to login and make a systemstate dump.
Below is the ass.awk output for systemstate dump:
System State 1 ~~~~~~~~~~~~~~~~ 1: 2: 0: waiting for 'pmon timer' <---- PMON is fine at this moment 3: 0: waiting for 'rdbms ipc message' 4: 0: waiting for 'VKTM Logical Idle Wait' 5: 0: waiting for 'rdbms ipc message' 6: 0: waiting for 'DIAG idle wait' 7: 0: waiting for 'rdbms ipc message' 8: 0: waiting for 'DIAG idle wait' 9: 0: waiting for 'rdbms ipc message' 10: 0: waiting for 'rdbms ipc message' 11: 0: waiting for 'rdbms ipc message' 12: 0: waiting for 'rdbms ipc message' 13: 0: waiting for 'rdbms ipc message' 14: 0: waiting for 'rdbms ipc message' 15: 0: waiting for 'rdbms ipc message' 16: 0: waiting for 'rdbms ipc message' 17: 0: waiting for 'rdbms ipc message' 18: 0: waiting for 'rdbms ipc message' 19: 0: waiting for 'rdbms ipc message' 20: 0: waiting for 'rdbms ipc message' 21: 0: waiting for 'rdbms ipc message' 22: 0: waiting for 'rdbms ipc message' 23: 0: waiting for 'rdbms ipc message' 24: 0: waiting for 'rdbms ipc message' 25: 0: waiting for 'rdbms ipc message' 26: 0: waiting for 'rdbms ipc message' 27: 0: waiting for 'rdbms ipc message' 28: 0: waiting for 'rdbms ipc message' 29: 0: waiting for 'rdbms ipc message' 30: 0: waiting for 'rdbms ipc message' 31: 0: waiting for 'rdbms ipc message' 32: 0: waiting for 'smon timer' 33: 0: waiting for 'rdbms ipc message' 34: 0: waiting for 'latch free' [Latch 60009fc8] 35: 0: waiting for 'rdbms ipc message' 36: [Latch 60009fc8] 37: 0: waiting for 'enq: PV - syncstart'[Enqueue PV-00000000-00000000] 38: [Latch 60009fc8] 39: 0: waiting for 'SQL*Net message from client' 40: 0: waiting for 'VKRM Idle' 41: 0: waiting for 'rdbms ipc message' 42: 0: waiting for 'rdbms ipc message' 43: 0: waiting for 'rdbms ipc message' 44: 0: waiting for 'Streams AQ: qmn coordinator idle wait' 45: 0: waiting for 'enq: PR - contention'[Enqueue PR-00000000-00000000] 46: [Latch 60009fc8] 47: 0: waiting for 'Streams AQ: qmn slave idle wait' 48: [Latch 60009fc8] 49: 0: waiting for 'SQL*Net message from client' 50: [Latch 60009fc8] 51: 9: waited for 'Streams AQ: waiting for time management or cleanup tasks' 52: 0: waiting for 'SQL*Net message from client' Blockers ~~~~~~~~ Above is a list of all the processes. If they are waiting for a resource then it will be given in square brackets. Below is a summary of the waited upon resources, together with the holder of that resource. Notes: ~~~~~ o A process id of '???' implies that the holder was not found in the systemstate. Resource Holder State Latch 60009fc8 ??? Blocker Enqueue PV-00000000-00000000 34: 34: is waiting for Latch 60009fc8 Enqueue PR-00000000-00000000 34: 34: is waiting for Latch 60009fc8 Object Names ~~~~~~~~~~~~ Latch 60009fc8 process allocation Enqueue PV-00000000-00000000 Enqueue PR-00000000-00000000
Obviously the root blocker is latch: 60009fc8. But unluckily the systemstate dump don't have the infor that which session is holding the latch:
alpcispdb552[oracle]_pgbs> cat pgbs_diag_2254.trc|grep 60009fc8
waiting for 60009fc8 process allocation level=7
address=0x60009fc8, number=0x9, tries=0x0
p1: 'address'=0x60009fc8
waiting for 60009fc8 process allocation level=7
waiting for 60009fc8 process allocation level=7
waiting for 60009fc8 process allocation level=7
waiting for 60009fc8 process allocation level=7
waiting for 60009fc8 process allocation level=7
Then let's choose any one blocked process to check:
PROCESS 34: MMON
----------------------------------------
SO: 0x1972e95a8, type: 2, owner: (nil), flag: INIT/-/-/0x00 if: 0x3 c: 0x3
proc=0x1972e95a8, name=process, file=ksu.h LINE:12451, pg=0
(process) Oracle pid:34, ser:1, calls cur/top: 0x189db28e8/0x19f52b748
flags : (0x2) SYSTEM
flags2: (0x20), flags3: (0x0)
intr error: 0, call error: 0, sess error: 0, txn error 0
intr queue: empty
ksudlp FALSE at location: 0
(post info) last post received: 0 0 68
last post received-location: kso2.h LINE:467 ID:ksoreq_reply
last process to post me: 19f2ef058 165 0
last post sent: 0 0 26
last post sent-location: ksa2.h LINE:282 ID:ksasnd
last process posted by me: 1982dec38 1 6
(latch info) wait_event=0 bits=0
Location from where call was made: ksu.h LINE:13713 ID:ksu_unreserve:
waiting for 60009fc8 process allocation level=7
Location from where latch is held: ksu.h LINE:13677 ID:ksuapc: proc addr
Context saved from call: 6965578584
state=busy [holder orapid=0] wlstate=free [value=0]
gotten 57043 times wait, failed first 54 sleeps 0
gotten 26253 times nowait, failed: 1
possible holder pid = 0 ospid=26755
Process Group: DEFAULT, pseudo proc: 0x19734a4b8
O/S info: user: oracle, term: UNKNOWN, ospid: 2339
OSD pid info: Unix process pid: 2339, image: oracle@server552(MMON)
Above blocked process is MMON, pay attention to red part, it is waiting for 60009fc8, and latch's possible holder ospid: 26755.
Let’s check ospid 26755:
PROCESS 50:
----------------------------------------
SO: 0x19f2ef058, type: 2, owner: (nil), flag: INIT/-/-/0x00 if: 0x3 c: 0x3
proc=0x19f2ef058, name=process, file=ksu.h LINE:12451, pg=0
(process) Oracle pid:50, ser:165, calls cur/top: (nil)/(nil)
flags : (0x0) -
flags2: (0x8000), flags3: (0x0)
intr error: 0, call error: 0, sess error: 0, txn error 0
intr queue: empty
ksudlp FALSE at location: 0
(post info) last post received: 0 0 0
last post received-location: No post
last process to post me: none
last post sent: 0 0 0
last post sent-location: No post
last process posted by me: none
(latch info) wait_event=0 bits=0
Location from where call was made: ksu.h LINE:13721 ID:ksudlp:
Context saved from call: 6965620824
waiting for 60009fc8 process allocation level=7
Location from where latch is held: ksu.h LINE:13677 ID:ksuapc: proc addr
Context saved from call: 6965578584
state=busy [holder orapid=0] wlstate=free [value=0]
gotten 57043 times wait, failed first 54 sleeps 0
gotten 26253 times nowait, failed: 1
possible holder pid = 0 ospid=26755
O/S info: user: oracle, term: UNKNOWN, ospid: 26755
OSD pid info: Unix process pid: 26755, image: oracle@alpcispdb552)
We can see the Process 26755 is blocked by itself. A self deadlock latch issue.
Then i kill the Process 26755 from OS level with "kill -9" to get the latch released. But unluckly the DB is still hang.
I make a latest systemstate and check:
System State 1
~~~~~~~~~~~~~~~~
1:
2: 0: waiting for 'latch free' [Latch 60009fc8] ---- PMON is blocked
3: 0: waiting for 'rdbms ipc message'
4: 0: waiting for 'VKTM Logical Idle Wait'
5: 0: waiting for 'rdbms ipc message'
6:
7: 0: waiting for 'rdbms ipc message'
8: 0: waiting for 'DIAG idle wait'
9: 0: waiting for 'rdbms ipc message'
10: 0: waiting for 'rdbms ipc message'
11: 0: waiting for 'rdbms ipc message'
12: 0: waiting for 'rdbms ipc message'
13: 0: waiting for 'rdbms ipc message'
14: 0: waiting for 'rdbms ipc message'
15: 0: waiting for 'rdbms ipc message'
16: 0: waiting for 'rdbms ipc message'
17: 0: waiting for 'rdbms ipc message'
18: 0: waiting for 'rdbms ipc message'
19: 0: waiting for 'rdbms ipc message'
20: 0: waiting for 'rdbms ipc message'
21: 0: waiting for 'rdbms ipc message'
22: 0: waiting for 'rdbms ipc message'
23: 0: waiting for 'rdbms ipc message'
24: 0: waiting for 'rdbms ipc message'
25: 0: waiting for 'rdbms ipc message'
26: 0: waiting for 'rdbms ipc message'
27: 0: waiting for 'rdbms ipc message'
28: 0: waiting for 'rdbms ipc message'
29: 0: waiting for 'rdbms ipc message'
30: 0: waiting for 'rdbms ipc message'
31: 0: waiting for 'rdbms ipc message'
32: 0: waiting for 'smon timer'
33: 0: waiting for 'rdbms ipc message'
34: 0: waiting for 'latch free' [Latch 60009fc8]
35: 0: waiting for 'rdbms ipc message'
36: [Latch 60009fc8]
37: 0: waiting for 'enq: PV - syncstart'[Enqueue PV-00000000-00000000]
38: [Latch 60009fc8]
39: 0: waiting for 'SQL*Net message from client'
40: 0: waiting for 'VKRM Idle'
41: 0: waiting for 'rdbms ipc message'
42: 0: waiting for 'rdbms ipc message'
43: 0: waiting for 'rdbms ipc message'
44: 0: waiting for 'Streams AQ: qmn coordinator idle wait'
45: 0: waiting for 'enq: PR - contention'[Enqueue PR-00000000-00000000]
46: [Latch 60009fc8]
47: 0: waiting for 'Streams AQ: qmn slave idle wait'
48: [Latch 60009fc8]
49: 0: waiting for 'SQL*Net message from client'
50: [Latch 60009fc8]
51: 9: waited for 'Streams AQ: waiting for time management or cleanup tasks'
52: 0: waiting for 'SQL*Net message from client'
Blockers
~~~~~~~~
Above is a list of all the processes. If they are waiting for a resource
then it will be given in square brackets. Below is a summary of the
waited upon resources, together with the holder of that resource.
Notes:
~~~~~
o A process id of '???' implies that the holder was not found in the
systemstate.
Resource Holder State
Latch 60009fc8 ??? Blocker
Enqueue PV-00000000-00000000 34: 34: is waiting for Latch 60009fc8
Enqueue PR-00000000-00000000 34: 34: is waiting for Latch 60009fc8
Object Names
~~~~~~~~~~~~
Latch 60009fc8 process allocation
Enqueue PV-00000000-00000000
Enqueue PR-00000000-00000000
We can see pmon is also blocked on latch 60009fc8.
And below is the process dump for PMON:
PROCESS 2: PMON
----------------------------------------
SO: 0x19935b370, type: 2, owner: (nil), flag: INIT/-/-/0x00 if: 0x3 c: 0x3
proc=0x19935b370, name=process, file=ksu.h LINE:12451, pg=0
(process) Oracle pid:2, ser:1, calls cur/top: 0x19f525a88/0x19f525a88
flags : (0xe) SYSTEM
flags2: (0x0), flags3: (0x0)
intr error: 0, call error: 0, sess error: 0, txn error 0
intr queue: empty
ksudlp FALSE at location: 0
(post info) last post received: 0 0 68
last post received-location: kso2.h LINE:467 ID:ksoreq_reply
last process to post me: 19f2edfd8 2 2
last post sent: 0 0 26
last post sent-location: ksa2.h LINE:282 ID:ksasnd
last process posted by me: 1982dec38 1 6
(latch info) wait_event=0 bits=0
Location from where call was made: ksu.h LINE:13721 ID:ksudlp:
Context saved from call: 6814711808
waiting for 60009fc8 process allocation level=7
Location from where latch is held: ksu.h LINE:13677 ID:ksuapc: proc addr
Context saved from call: 6965578584
state=busy [holder orapid=0] wlstate=free [value=0]
gotten 57043 times wait, failed first 54 sleeps 0
gotten 26253 times nowait, failed: 1
possible holder pid = 0 ospid=26755
Process Group: DEFAULT, pseudo proc: 0x19734a4b8
O/S info: user: oracle, term: UNKNOWN, ospid: 1311
OSD pid info: Unix process pid: 1311, image: oracle@server552(PMON)
We can see PMON is waiting on latch 60009fc8, blocked by the process that we just killed.
It is clear to us now:
process 26755 was in self deadlock state on latch 60009fc8 and blocked other processes. Later i killed process 26755 to release the latch, then pmon should go to clean the process and release the resource.
But before pmon start to work, pmon itself also require the same latch: 60009fc8 and hence blocked and can't progress.
So it is a typiclly pmon deadlock.
We had to bounce the DB at last.
More......
July 30, 2012
RMAN senior: duplicate database from tape without target DB, "RMAN-05548: The set of duplicated tablespaces is not self-contained"
Today, user require to restore a table from old backup.
The table is small, a few thousands rows. But the DB is big, 200gb. We don't have sufficient space to support restoring the whole DB.
We decide to resotre the table and its tablespace only, we will use "duplicate database skip tablespace" clause to skip irrelative tablespaces:
server001[oracle]_ORCLPROD> rman target / auxiliary sys/oracle@temp2 catalog rmanadmin/rman_psswd@rmancatalog
Recovery Manager: Release 11.2.0.2.0 - Production on Sun Jul 29 04:23:34 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: ORCLPROD (DBID=1650044020)
connected to recovery catalog database
connected to auxiliary database: TEMP2 (not mounted)
RMAN> run
{
set until time "to_date('03-JUL-201212:00:00','dd-mm-yyyyhh24:mi:ss')";
allocate auxiliary channel ch1 type 'sbt_tape' parms 'ENV=(NB_ORA_SERVER=netbacksev1_b,NB_ORA_CLIENT=server001_b)';
allocate auxiliary channel ch2 type 'sbt_tape' parms 'ENV=(NB_ORA_SERVER=netbacksev1_b,NB_ORA_CLIENT=server001_b)';
duplicate target database to temp2 nofilenamecheck skip tablespace USERS,TBS1,TBS2,TBS3,TBS4,TBS5,TBS6,TBS7;
}
executing command: SET until clause
..........
..........
Violation: ORA-39906: Constraint SYS_C0050693 between table GETS_SO.GETS_SO_ATS_PROJECT in tablespace OTD and table GETS_SO.GETS_SO_SWPT_SSO_SHOP_ORD in tablespace SWPT_TABLES.
Violation: ORA-39908: Index GETS_SO.GETS_SO_NRE_BUSINESS_MST_PK in tablespace OTX_INDEXES enforces primary constraints of table GETS_SO.GETS_SO_NRE_BUSINESS_MST in tablespace OTD.
Violation: ORA-39908: Index GETS_SO.GETS_SO_NRE_CUSTOMER_MST_PK in tablespace OTX_INDEXES enforces primary constraints of table GETS_SO.GETS_SO_NRE_CUSTOMER_MST in tablespace OTD.
Violation: ORA-39908: Index GETS_SO.GETS_SO_NRE_ESR_DETAIL_PK in tablespace OTX_INDEXES enforces primary constraints of table GETS_SO.GETS_SO_NRE_ESR_DETAIL in tablespace OTD.
Violation: ORA-39907: Index GETS_SO.GETS_SO_NRE_ESR_DSGN_TSK_IE2 in tablespace OTX_INDEXES points to table GETS_SO.GETS_SO_NRE_ESR_DSGN_TSK in tablespace OTD.
Violation: ORA-39907: Index GETS_SO.GETS_SO_NRE_ESR_RPT_TSK_IE1 in tablespace OTX_INDEXES points to table GETS_SO.GETS_SO_NRE_ESR_RPT_TSK in tablespace OTD.
..........
..........
released channel: ch1
released channel: ch2
released channel: ch3
released channel: ch4
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 07/29/2012 05:13:00
RMAN-05501: aborting duplication of target database
RMAN-05548: The set of duplicated tablespaces is not self-containedThe red part is an enhancement in 11g. When we skipped some tablespaces, oracle will check dependency on remaining tablespace through TTS transport check procedure. If the check failed, then rman will refuse to restore.
How to skip that? The only method is to use no-target duplicate.
Since the tablespace checking relies on target database, so with this method, oracle can't check the dependency from target DB:
no target duplicate:
rman auxiliary / catalog catalog rmanadmin/rman_psswd@rmancatalog
set dbid 21111;
run
{
set until time "to_date('03-JUL-201212:00:00','dd-mm-yyyyhh24:mi:ss')";
allocate auxiliary channel ch1 type 'sbt_tape' parms 'ENV=(NB_ORA_SERVER=netbacksev1_b,NB_ORA_CLIENT=server001_b)';
allocate auxiliary channel ch2 type 'sbt_tape' parms 'ENV=(NB_ORA_SERVER=netbacksev1_b,NB_ORA_CLIENT=server001_b)';
duplicate database to temp backup location 'sbt_tape' nofilenamecheck skip tablespace USERS,TBS1,TBS2,TBS3,TBS4,TBS5,TBS6,TBS7;
}More......
July 21, 2012
From 11.2.0.2.5, oracle don't support ADJUST SCN any more
Today, after incomplete recovery and opened a DB, i decided to increasing SCN for the DB.
I set "_allow_error_simulation=true", and use:
alter session set events 'IMMEDIATE trace name adjust_scn level 4490'; ALTER SESSION SET EVENTS '10015 TRACE NAME ADJUST_SCN LEVEL 4490';
The alert.log shew that oracle even didn't try to turn the SCN.
Very wiered.
Then i decide to try "_minimum_giga_scn" once, i added "_minimum_giga_scn=7000" into init.ora and then startup the DB:
SYS @ apci > startup
ORA-01078: failure in processing system parameters
LRM-00101: unknown parameter name '_minimum_giga_scn'
Kidding? I removed the parameter and again i can startup DB normal.
Let's query the hidden parameter:
SYS @ apci > select ksppinm from x$ksppi where ksppinm like '%giga%'; no rows selected
Let's check different version databases:
10.2.0.4, no problem as we expected: SYS @ 10gDB> select ksppinm from x$ksppi where ksppinm like '%giga%'; KSPPINM -------------------------------------------------------------------------------- _minimum_giga_scn 11.2.0.2.4, parameter still there: SYS @ XXDB >select ksppinm from x$ksppi where ksppinm like '%giga%'; KSPPINM -------------------------------------------------------------------------------- _minimum_giga_scn 11.2.0.2.5, from this version the parameter disapper: SQL> select ksppinm from x$ksppi where ksppinm like '%giga%'; no rows selected 11.2.0.2.6: SYS @ DB1 > select ksppinm from x$ksppi where ksppinm like '%giga%'; no rows selected 11.2.0.3: SYS @ DB2 > select ksppinm from x$ksppi where ksppinm like '%giga%'; no rows selected
We can see oracle remove the ADJUST SCN function since 11.2.0.2.5, so we can't use oracle's function to adjust SCN in future.
In there any alternative way?
Yes, we can do first increasing the checkpoint_change# value in datafile header block to a appopraite value, and then re-create controlfile.
So the new controlfile will read our new value as current SCN.
Below is the step:
SYS @ test8 > select current_scn from v$database; CURRENT_SCN ----------- 4324729 BBED> set offset 484 OFFSET 484 BBED> dump File: /d735/data02/oracle/test8/data/system01.dbf (1) Block: 1 Offsets: 484 to 995 Dba:0x00400001 ------------------------------------------------------------------------ 3ffe4100 00000000 59d60a2f 01000000 01000000 62010000 1000db8a 02000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 BBED> modify /x dddddddd Warning: contents of previous BIFILE will be lost. Proceed? (Y/N) Y File: /d735/data02/oracle/test8/data/system01.dbf (1) Block: 1 Offsets: 484 to 995 Dba:0x00400001 ------------------------------------------------------------------------ dddddddd 00000000 59d60a2f 01000000 01000000 62010000 1000db8a 02000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 BBED> sum apply; Check value for File 1, Block 1: current = 0x5036, required = 0x5036 SYS @ test8 > startup nomount; ORACLE instance started. Total System Global Area 730714112 bytes Fixed Size 2230080 bytes Variable Size 318769344 bytes Database Buffers 322961408 bytes Redo Buffers 86753280 bytes SYS @ test8 > CREATE CONTROLFILE REUSE DATABASE "TEST8" RESETLOGS NOARCHIVELOG 2 MAXLOGFILES 200 3 MAXLOGMEMBERS 4 ........... ........... 29 '/d735/data02/oracle/test8/data/user03_new.dbf' 30 CHARACTER SET UTF8 31 ; Control file created. SYS @ test8 > alter database open resetlogs; Database altered. SYS @ test8 > select current_scn from v$database; CURRENT_SCN ----------- 3722305178
Done.
More......
July 5, 2012
Instance evicted due to HAIP failure
Rac cluster, one server's instances abruptly evicted and re-joined the cluster after 10 minutes. Below is from DB's alert log:
Wed Jun 27 00:34:55 2012
Errors in file /q001/product/ora_base/diag/rdbms/ttpoltq/ttpoltq1/trace/ttpoltq1_ora_21759.trc (incident=139278):
ORA-00603: ORACLE server session terminated by fatal error
ORA-27504: IPC error creating OSD context
ORA-27300: OS system dependent operation:if_not_found failed with status: 0
ORA-27301: OS failure message: Error 0
ORA-27302: failure occurred at: skgxpvaddr9
ORA-27303: additional information: requested interface 169.254.25.210 not found. Check output from ifconfig command
.............
ORA-29740: evicted by instance number 3, group incarnation 60
LMON (ospid: 20361): terminating the instance due to error 29740
Instance terminated by LMON, pid = 20361
From red part we know there must be something wrong with interconnect.
After checking found interfaces on 10.0.0.* network were working fine.
Also GPNP logfile shew no abnormal information.
Then the issue must be caused by HAIP.
Let's check CSSD's logfile:
oracle $ cat ocssd.log|egrep -i 'haip|disk' 2012-06-27 00:31:44.417: [ CSSD][1117505856]clssscMonitorThreads clssnmvDiskPingThread not scheduled for 7910 msecs 2012-06-27 00:31:52.433: [ CSSD][1117505856]clssscMonitorThreads clssnmvDiskPingThread not scheduled for 15920 msecs 2012-06-27 00:32:00.449: [ CSSD][1117505856]clssscMonitorThreads clssnmvDiskPingThread not scheduled for 23940 msecs 2012-06-27 00:32:08.170: [ CSSD][1105717568]clssscMonitorThreads clssnmvDiskPingThread not scheduled for 31660 msecs 2012-06-27 00:32:16.481: [ CSSD][1117505856]clssscMonitorThreads clssnmvDiskPingThread not scheduled for 39970 msecs 2012-06-27 00:32:24.497: [ CSSD][1117505856]clssscMonitorThreads clssnmvDiskPingThread not scheduled for 47980 msecs 2012-06-27 00:32:32.513: [ CSSD][1117505856]clssscMonitorThreads clssnmvDiskPingThread not scheduled for 56000 msecs 2012-06-27 00:32:40.945: [ CSSD][1117505856]clssscMonitorThreads clssnmvDiskPingThread not scheduled for 64430 msecs 2012-06-27 00:32:49.236: [ CSSD][1105717568]clssscMonitorThreads clssnmvDiskPingThread not scheduled for 72720 msecs 2012-06-27 00:32:58.565: [ CSSD][1117505856]clssscMonitorThreads clssnmvDiskPingThread not scheduled for 82040 msecs 2012-06-27 00:33:06.581: [ CSSD][1117505856]clssscMonitorThreads clssnmvDiskPingThread not scheduled for 90060 msecs 2012-06-27 00:33:14.597: [ CSSD][1117505856]clssscMonitorThreads clssnmvDiskPingThread not scheduled for 98070 msecs 2012-06-27 00:33:15.539: [ CSSD][1109621056]clssnmvDiskCheck: (ORCL:ASM_DISK01) No I/O completed after 50% maximum time, 200000 ms, will be considered unusable in 99990 ms 2012-06-27 00:33:22.614: [ CSSD][1117505856]clssscMonitorThreads clssnmvDiskPingThread not scheduled for 106090 msecs 2012-06-27 00:33:30.629: [ CSSD][1117505856]clssscMonitorThreads clssnmvDiskPingThread not scheduled for 114100 msecs 2012-06-27 00:33:34.069: [ CSSD][1105717568]clssgmFenceClient: fencing client (0x19278b0), member 1 in group haip.cluster_interconnect, no share, death fence 1, SAGE fence 0 2012-06-27 00:33:34.069: [ CSSD][1105717568]clssgmUnreferenceMember: global grock haip.cluster_interconnect member 1 refcount is 1 2012-06-27 00:33:34.069: [ CSSD][1093089600]clssgmTermMember: Terminating member 1 (0x18afc30) in grock haip.cluster_interconnect 2012-06-27 00:33:34.069: [ CSSD][1093089600]clssgmUnreferenceMember: global grock haip.cluster_interconnect member 1 refcount is 0 2012-06-27 00:33:34.070: [ CSSD][1111198016]clssgmRemoveMember: grock haip.cluster_interconnect, member number 1 (0x18afc30) node number 1 state 0x0 grock type 2 2012-06-27 00:33:34.070: [ CSSD][1111198016]clssgmGrantLocks: 1-> new master (3/3) group haip.cluster_interconnect 2012-06-27 00:33:34.072: [ CSSD][1111198016]clssgmBroadcastGrockRcfgCmpl: RPC(0x6c30034) of grock(haip.cluster_interconnect) is waiting for at least another ack from node(2) 2012-06-27 00:33:34.072: [ CSSD][1111198016]clssgmBroadcastGrockRcfgCmpl: RPC(0x6c30034) of grock(haip.cluster_interconnect) received all acks, grock update sequence(109) 2012-06-27 00:33:34.242: [ CSSD][1105717568]clssgmJoinGrock: global grock haip.cluster_interconnect new client 0x2aaab0611a70 with con 0x12622491, requested num 1, flags 0x4000100 2012-06-27 00:33:34.242: [ CSSD][1105717568]clssgmAddGrockMember: adding member to grock haip.cluster_interconnect 2012-06-27 00:33:34.242: [ CSSD][1111198016]clssgmAddMember: Adding fencing for member 1, group haip.cluster_interconnect, death 1, SAGE 0 2012-06-27 00:33:34.242: [ CSSD][1111198016]clssgmAddMember: member (1/0x2aaab051c000) added. pbsz(0) prsz(0) flags 0x0 to grock (0x2aaab00e3190/haip.cluster_interconnect) 2012-06-27 00:33:34.242: [ CSSD][1111198016]clssgmCommonAddMember: global group grock haip.cluster_interconnect member(1/Local) node(1) flags 0x0 0x423b6300 2012-06-27 00:33:34.245: [ CSSD][1111198016]clssgmBroadcastGrockRcfgCmpl: RPC(0x6c70034) of grock(haip.cluster_interconnect) is waiting for at least another ack from node(2) 2012-06-27 00:33:34.245: [ CSSD][1111198016]clssgmBroadcastGrockRcfgCmpl: RPC(0x6c70034) of grock(haip.cluster_interconnect) received all acks, grock update sequence(110) 2012-06-27 00:33:34.562: [ CSSD][1105717568]clssgmExitGrock: client 1 (0x2aaab0611a70), grock haip.cluster_interconnect, member 1 2012-06-27 00:33:34.562: [ CSSD][1105717568]clssgmUnregisterPrimary: Unregistering member 1 (0x2aaab051c000) in global grock haip.cluster_interconnect 2012-06-27 00:33:34.562: [ CSSD][1105717568]clssgmUnreferenceMember: global grock haip.cluster_interconnect member 1 refcount is 0 2012-06-27 00:33:34.562: [ CSSD][1111198016]clssgmRemoveMember: grock haip.cluster_interconnect, member number 1 (0x2aaab051c000) node number 1 state 0x4 grock type 2 2012-06-27 00:33:34.564: [ CSSD][1111198016]clssgmBroadcastGrockRcfgCmpl: RPC(0x6c80034) of grock(haip.cluster_interconnect) is waiting for at least another ack from node(2) 2012-06-27 00:33:34.565: [ CSSD][1111198016]clssgmBroadcastGrockRcfgCmpl: RPC(0x6c80034) of grock(haip.cluster_interconnect) received all acks, grock update sequence(111) 2012-06-27 00:33:34.627: [ CSSD][1105717568]clssgmJoinGrock: global grock haip.cluster_interconnect new client 0x2aaab04022b0 with con 0x1262256c, requested num 1, flags 0x4000100 2012-06-27 00:33:34.627: [ CSSD][1105717568]clssgmAddGrockMember: adding member to grock haip.cluster_interconnect 2012-06-27 00:33:34.627: [ CSSD][1111198016]clssgmAddMember: Adding fencing for member 1, group haip.cluster_interconnect, death 1, SAGE 0 2012-06-27 00:33:34.627: [ CSSD][1111198016]clssgmAddMember: member (1/0x2aaab04c0f80) added. pbsz(0) prsz(0) flags 0x0 to grock (0x2aaab00e3190/haip.cluster_interconnect) 2012-06-27 00:33:34.627: [ CSSD][1111198016]clssgmCommonAddMember: global group grock haip.cluster_interconnect member(1/Local) node(1) flags 0x0 0x423b6300 2012-06-27 00:33:34.629: [ CSSD][1111198016]clssgmBroadcastGrockRcfgCmpl: RPC(0x6cb0034) of grock(haip.cluster_interconnect) is waiting for at least another ack from node(2) 2012-06-27 00:33:34.630: [ CSSD][1111198016]clssgmBroadcastGrockRcfgCmpl: RPC(0x6cb0034) of grock(haip.cluster_interconnect) received all acks, grock update sequence(112) 2012-06-27 00:33:39.647: [ CSSD][1117505856]clssscMonitorThreads clssnmvDiskPingThread not scheduled for 123120 msecs 2012-06-27 00:33:47.663: [ CSSD][1117505856]clssscMonitorThreads clssnmvDiskPingThread not scheduled for 131130 msecs 2012-06-27 00:33:55.680: [ CSSD][1117505856]clssscMonitorThreads clssnmvDiskPingThread not scheduled for 139150 msecs 2012-06-27 00:34:04.115: [ CSSD][1117505856]clssscMonitorThreads clssnmvDiskPingThread not scheduled for 147580 msecs 2012-06-27 00:34:05.658: [ CSSD][1109621056]clssnmvDiskCheck: (ORCL:ASM_DISK01) No I/O completed after 75% maximum time, 200000 ms, will be considered unusable in 49880 ms 2012-06-27 00:34:11.712: [ CSSD][1117505856]clssscMonitorThreads clssnmvDiskPingThread not scheduled for 155180 msecs 2012-06-27 00:34:19.728: [ CSSD][1117505856]clssscMonitorThreads clssnmvDiskPingThread not scheduled for 163190 msecs 2012-06-27 00:34:28.314: [ CSSD][1105717568]clssscMonitorThreads clssnmvDiskPingThread not scheduled for 171770 msecs 2012-06-27 00:34:35.732: [ CSSD][1109621056]clssnmvDiskCheck: (ORCL:ASM_DISK01) No I/O completed after 90% maximum time, 200000 ms, will be considered unusable in 19810 ms 2012-06-27 00:34:36.762: [ CSSD][1117505856]clssscMonitorThreads clssnmvDiskPingThread not scheduled for 180220 msecs 2012-06-27 00:34:43.044: [ CSSD][1111198016]clssgmRemoveMember: grock haip.cluster_interconnect, member number 3 (0x2aaaac27b800) node number 3 state 0x0 grock type 2 2012-06-27 00:34:43.044: [ CSSD][1111198016]clssgmGrantLocks: 3-> new master (2/2) group haip.cluster_interconnect 2012-06-27 00:34:43.046: [ CSSD][1111198016]clssgmBroadcastGrockRcfgCmpl: RPC(0x7200034) of grock(haip.cluster_interconnect) is waiting for at least another ack from node(2) 2012-06-27 00:34:43.047: [ CSSD][1111198016]clssgmBroadcastGrockRcfgCmpl: RPC(0x7200034) of grock(haip.cluster_interconnect) received all acks, grock update sequence(113) 2012-06-27 00:34:43.291: [ CSSD][1111198016]clssgmAddMember: member (3/0x2aaaac5844a0) added. pbsz(0) prsz(0) flags 0x0 to grock (0x2aaab00e3190/haip.cluster_interconnect) 2012-06-27 00:34:43.291: [ CSSD][1111198016]clssgmCommonAddMember: global group grock haip.cluster_interconnect member(3/Remote) node(3) flags 0x0 0xac5844a0 2012-06-27 00:34:43.293: [ CSSD][1111198016]clssgmBroadcastGrockRcfgCmpl: RPC(0x7400034) of grock(haip.cluster_interconnect) is waiting for at least another ack from node(2) 2012-06-27 00:34:43.293: [ CSSD][1111198016]clssgmBroadcastGrockRcfgCmpl: RPC(0x7400034) of grock(haip.cluster_interconnect) received all acks, grock update sequence(114) 2012-06-27 00:34:43.636: [ CSSD][1111198016]clssgmRemoveMember: grock haip.cluster_interconnect, member number 3 (0x2aaaac5844a0) node number 3 state 0x0 grock type 2 2012-06-27 00:34:43.638: [ CSSD][1111198016]clssgmBroadcastGrockRcfgCmpl: RPC(0x74f0034) of grock(haip.cluster_interconnect) is waiting for at least another ack from node(3) 2012-06-27 00:34:43.639: [ CSSD][1111198016]clssgmBroadcastGrockRcfgCmpl: RPC(0x74f0034) of grock(haip.cluster_interconnect) received all acks, grock update sequence(115) 2012-06-27 00:34:43.730: [ CSSD][1111198016]clssgmAddMember: member (3/0x1dba9d0) added. pbsz(0) prsz(0) flags 0x0 to grock (0x2aaab00e3190/haip.cluster_interconnect) 2012-06-27 00:34:43.731: [ CSSD][1111198016]clssgmCommonAddMember: global group grock haip.cluster_interconnect member(3/Remote) node(3) flags 0x0 0x1dba9d0 2012-06-27 00:34:43.733: [ CSSD][1111198016]clssgmBroadcastGrockRcfgCmpl: RPC(0x74a0034) of grock(haip.cluster_interconnect) is waiting for at least another ack from node(2) 2012-06-27 00:34:43.733: [ CSSD][1111198016]clssgmBroadcastGrockRcfgCmpl: RPC(0x74a0034) of grock(haip.cluster_interconnect) received all acks, grock update sequence(116) 2012-06-27 00:34:45.457: [ CSSD][1105717568]clssgmExitGrock: client 1 (0x2aaab04022b0), grock haip.cluster_interconnect, member 1 2012-06-27 00:34:45.457: [ CSSD][1105717568]clssgmUnregisterPrimary: Unregistering member 1 (0x2aaab04c0f80) in global grock haip.cluster_interconnect 2012-06-27 00:34:45.457: [ CSSD][1105717568]clssgmUnreferenceMember: global grock haip.cluster_interconnect member 1 refcount is 0 2012-06-27 00:34:45.457: [ CSSD][1111198016]clssgmRemoveMember: grock haip.cluster_interconnect, member number 1 (0x2aaab04c0f80) node number 1 state 0x4 grock type 2 2012-06-27 00:34:45.459: [ CSSD][1111198016]clssgmBroadcastGrockRcfgCmpl: RPC(0x7640034) of grock(haip.cluster_interconnect) is waiting for at least another ack from node(2) 2012-06-27 00:34:45.459: [ CSSD][1111198016]clssgmBroadcastGrockRcfgCmpl: RPC(0x7640034) of grock(haip.cluster_interconnect) received all acks, grock update sequence(117) 2012-06-27 00:43:28.566: [ CSSD][1105717568]clssgmJoinGrock: global grock haip.cluster_interconnect new client 0x2aaab43103e0 with con 0x126435d1, requested num 1, flags 0x4000100 2012-06-27 00:43:28.566: [ CSSD][1105717568]clssgmAddGrockMember: adding member to grock haip.cluster_interconnect 2012-06-27 00:43:28.566: [ CSSD][1111198016]clssgmAddMember: Adding fencing for member 1, group haip.cluster_interconnect, death 1, SAGE 0 2012-06-27 00:43:28.566: [ CSSD][1111198016]clssgmAddMember: member (1/0x2aaab46fbd20) added. pbsz(0) prsz(0) flags 0x0 to grock (0x2aaab00e3190/haip.cluster_interconnect) 2012-06-27 00:43:28.566: [ CSSD][1111198016]clssgmCommonAddMember: global group grock haip.cluster_interconnect member(1/Local) node(1) flags 0x0 0x423b6300 2012-06-27 00:43:28.568: [ CSSD][1111198016]clssgmBroadcastGrockRcfgCmpl: RPC(0x2aa0035) of grock(haip.cluster_interconnect) is waiting for at least another ack from node(2) 2012-06-27 00:43:28.569: [ CSSD][1111198016]clssgmBroadcastGrockRcfgCmpl: RPC(0x2aa0035) of grock(haip.cluster_interconnect) received all acks, grock update sequence(118) 2012-06-27 00:43:44.470: [ CSSD][1105717568]clssgmExecuteClientRequest: VOTEDISKQUERY recvd from proc 32 (0x2aaab4269a70) 2012-06-27 00:43:45.958: [ CSSD][1105717568]clssgmExecuteClientRequest: VOTEDISKQUERY recvd from proc 32 (0x2aaab4269a70) 2012-06-27 00:43:48.770: [ CSSD][1105717568]clssgmExecuteClientRequest: VOTEDISKQUERY recvd from proc 34 (0x2aaab05c4340) 2012-06-27 00:43:48.771: [ CSSD][1105717568]clssgmExecuteClientRequest: VOTEDISKQUERY recvd from proc 34 (0x2aaab05c4340)
2012-06-27 00:31:44.417: [ CSSD][1117505856]clssscMonitorThreads clssnmvDiskPingThread not scheduled for 7910 msecs
The long disk timeout threshold is 200 seconds in 11gR2.
During the countdown process, the cluster had a check on HAIP and belive HAIP already died:
2012-06-27 00:33:34.069: [ CSSD][1105717568]clssgmFenceClient: fencing client (0x19278b0), member 1 in group haip.cluster_interconnect, no share, death fence 1, SAGE fence 0
Cluster start to cleanup HAIP, and tried mutiple times to restart HAIP.
And later, the votedisk is online again, so votedisk timeout countdown stopped, and HAIP also re-brought up on-line, and all instances also be brought up, and all things back to normal then.
More......
July 3, 2012
MMAN in idle state but blocking other sessions which waiting 'SGA: allocation forcing component growth'
Find many blocking in one instance of an three nodes Rac DB.
Most sessions are either hang or running slow, after tracing found the blocker is MMAN process.
Below is from the trace:
Chain 1:
-------------------------------------------------------------------------------
Oracle session identified by:
{
instance: 1 (apccfp1.apccfp11)
os id: 15557
process id: 64, oracle@alpcispdb604 (J001)
session id: 2
session serial #: 23481
}
is waiting for 'latch free' with wait info:
{
p1: 'address'=0x6003f518
p2: 'number'=0x189
p3: 'tries'=0x0
time in wait: 22.106728 sec
timeout after: never
wait id: 3995
blocking: 0 sessions
current sql: UPDATE T_XXXX HSC SET (HSC.HOSTAPP_STATE_ID, HSC..................
wait history:
* time between current wait and wait #1: 0.023292 sec
1. event: 'gc current block 2-way'
time waited: 0.000410 sec
wait id: 3994 p1: ''=0x1
p2: ''=0x1a32e
p3: ''=0x1
* time between wait #1 and #2: 0.000438 sec
2. event: 'library cache pin'
time waited: 0.000327 sec
wait id: 3993 p1: 'handle address'=0x1b7e8b1f0
p2: 'pin address'=0x13b609ef0
p3: '100*mode+namespace'=0xffffffff00160002
* time between wait #2 and #3: 0.000158 sec
3. event: 'library cache lock'
time waited: 0.000374 sec
wait id: 3992 p1: 'handle address'=0x1b7e8b1f0
p2: 'lock address'=0x172458968
p3: '100*mode+namespace'=0xffffffff00160002
}
and is blocked by
=> Oracle session identified by:
{
instance: 1 (apccfp1.apccfp11)
os id: 15454
process id: 65, oracle@alpcispdb604
session id: 28
session serial #: 33079
}
which is waiting for 'SGA: allocation forcing component growth' with wait info:
{
time in wait: 0.047688 sec (last interval)
time in wait: 4.538964 sec (total)
heur. time in wait: 4.539095 sec
timeout after: never
wait id: 44447
blocking: 17 sessions
current sql:
wait history:
* time between current wait and wait #1: 0.000000 sec
1. event: 'SGA: allocation forcing component growth'
time waited: 0.000053 sec
wait id: 44535
* time between wait #1 and #2: 0.000000 sec
2. event: 'SGA: allocation forcing component growth'
time waited: 0.050851 sec (last interval)
time waited: 4.491223 sec (total)
wait id: 44447
* time between wait #2 and #3: 0.000000 sec
3. event: 'SGA: allocation forcing component growth'
time waited: 0.000122 sec
wait id: 44534
}
and is blocked by
=> Oracle session identified by:
{
instance: 1 (apccfp1.apccfp11)
os id: 25858
process id: 18, oracle@alpcispdb604 (MMAN)
session id: 451
session serial #: 1
}
which is waiting for 'rdbms ipc message' with wait info:
{
p1: 'timeout'=0x1f
time in wait: 0.047679 sec
timeout after: 0.262321 sec
wait id: 3739777
blocking: 18 sessions
current sql:
wait history:
* time between current wait and wait #1: 0.000060 sec
1. event: 'rdbms ipc message'
time waited: 0.050904 sec
wait id: 3739776 p1: 'timeout'=0x24
* time between wait #1 and #2: 0.000067 sec
2. event: 'rdbms ipc message'
time waited: 0.050946 sec
wait id: 3739775 p1: 'timeout'=0x29
* time between wait #2 and #3: 0.000055 sec
3. event: 'rdbms ipc message'
time waited: 0.050844 sec
wait id: 3739774 p1: 'timeout'=0x2e
}
Chain 1 Signature: 'rdbms ipc message'<='SGA: allocation forcing component growth'<='latch free'
Chain 1 Signature Hash: 0xd39c75b6
------------------------------------------------------------------------------- There are mutiple other chains, but all chains' root is MMAN.
From above we can see some sessions were facing suffcient memory issue, hence waiting MMAN to turn memory for them.
These blocked sessions were also hodling some resouces, as a result they were blocking more sessions.
And during the whole time, MMAN is idle and do nothing.
We tried to flush shared_pool but also hang, also blocked by MMAN. Since MMAN is critical background process, we can't kill it. Therefore we had to bounce the first instance at last.
More......
July 1, 2012
diagnose 04030: koh-kghu sessi and large of free space
Recently one of our prod DB repeatly got 04030 error:
ORA-04030: out of process memory when trying allocate 64024 bytes (qmxeventInitCt,qmxeventInitctx:buffer) ORA-04030: out of process memory when trying allocate 824504 bytes (pga heap,kco buffer) ORA-04030: out of process memory when trying allocate 16328 bytes (PLSQL Opt Pool,pdz7M04_Create)
ORA-04030: (pga heap,kco buffer) may indiate kco buffer in PGA heap consuming too much space and leading to 04030.
But in our case, each ORA-04030's parameters are different.
It means some other type allocated most of PGA, and left no space for other types PGA request.
Trace file shows the 04031 coming from an daily expdp job:
Below is current SQL:
*** 2012-06-30 22:25:39.959
dbkedDefDump(): Starting incident default dumps (flags=0x2, level=3, mask=0x0)
----- Current SQL Statement for this session (sql_id=b1n2qbfhwsyhb) -----
CREATE TABLE "ET$036AA8ED0002"
( "ABSTRACT_ID",
"FEED_ID",
"SEC_STATE",
"IS_ACTIVE",
"CREATED_BY",
"CREATED_DATE",
"UPDATED_BY",
"UPDATED_DATE",
"XML_RSS_ABSTRACT",
"XML_ABSTRACT_SOURCE"
) ORGANIZATION EXTERNAL
( TYPE ORACLE_DATAPUMP DEFAULT DIRECTORY "DATA_RAD" ACCESS PARAMETERS ( DEBUG = (0 , 0) DATAPUMP INTERNAL TABLE "POCDBA02"."T_NR_ABSTRACT" JOB ( "SYSTEM
","SYS_EXPORT_FULL_20",1) WORKERID 1 PARALLEL 1 VERSION '11.2.0.2' ENCRYPTPASSWORDISNULL COMPRESSION DISABLED ENCRYPTION DISABLED ) LOCATION ('bogus.dat')
) PARALLEL 1 REJECT LIMIT UNLIMITED
AS SELECT /*+ PARALLEL(KU$,1) */ "ABSTRACT_ID", "FEED_ID", "SEC_STATE", "IS_ACTIVE", "CREATED_BY", "CREATED_DATE", "UPDATED_BY", "UPDATED_DATE", SYS_XMLT
_2_SC("XML_RSS_ABSTRACT"), SYS_XMLT_2_SC("XML_ABSTRACT_SOURCE")
FROM RELATIONAL("PXXX02"."T_NR_AXXXCT" NOT XMLTYPE) KU$
Below is the PGA map from trace file, notice red part:
-------------------------
Private memory usage per Oracle process
Top 10 processes:
-------------------------
(percentage is of 4529 MB total allocated memory)
91% pid 62: 4104 MB used of 4107 MB allocated <= CURRENT PROC
2% pid 86: 16 MB used of 83 MB allocated (64 MB freeable)
1% pid 37: 38 MB used of 41 MB allocated (1088 KB freeable)
1% pid 38: 28 MB used of 29 MB allocated
0% pid 15: 13 MB used of 13 MB allocated (64 KB freeable)
0% pid 13: 13 MB used of 13 MB allocated (64 KB freeable)
0% pid 14: 13 MB used of 13 MB allocated (64 KB freeable)
0% pid 59: 6482 KB used of 13 MB allocated (6272 KB freeable)
0% pid 20: 12 MB used of 13 MB allocated
0% pid 19: 8853 KB used of 13 MB allocated
vm.max_map_count=65536
And below parameter in DB:
_realfree_heap_pagesize_hint 65536
The easist solution is increasing the limit to allow process to apply more memory, but the best way is to identify why this process consumed so much memory.
Let's check into the trace file:
======================================= TOP 10 MEMORY USES FOR THIS PROCESS --------------------------------------- *** 2012-06-30 22:25:39.707 74% 3041 MB, 66260 chunks: "free memory " session heap ds=0x2b4fb3e26d30 dsprt=0xb7eec80 25% 1010 MB, 64838 chunks: "qmxtgCreateTempLob " koh-kghu sessi ds=0x2b4fb6638bd0 dsprt=0x2b4fb3e26d30 0% 8859 KB, 2185 chunks: "kxsFrame4kPage " session heap ds=0x2b4fb3e26d30 dsprt=0xb7eec80 0% 6019 KB, 378 chunks: "pmuccst: adt/record " PL/SQL koh-kghu sessi ds=0x2b4fb492b110 dsprt=0x2b4fb3e26d30 0% 5562 KB, 46 chunks: "XVM Storage " XVM subheap of ds=0x2b4fb498b278 dsprt=0x2b4fb3d89b38 0% 3300 KB, 207 chunks: "pmucalm coll " PL/SQL koh-kghu sessi ds=0x2b4fb48facf8 dsprt=0x2b4fb3e26d30 0% 2312 KB, 2627 chunks: "permanent memory " SQL kxs-heap-p ds=0x2b4fb5d31898 dsprt=0x2b4fb3e26d30 0% 2281 KB, 185 chunks: "pl/sql vc2 " PL/SQL koh-kghu sessi ds=0x2b4fb66a8e30 dsprt=0x2b4fb3e26d30 0% 1319 KB, 85 chunks: "static frame of inst " PL/SQL koh-kghu sessi ds=0x2b4fb5bbfa70 dsprt=0x2b4fb3e26d30 0% 1288 KB, 160 chunks: "kxsFrame8kPage " session heap ds=0x2b4fb3e26d30 dsprt=0xb7eec80
I restart the expdp job, and during it is running, the PGA usage keep increasing, and when the PGA allocation size reached 2gb, i made an PGA dump:
news2 >oradebug setospid 11903
Statement processed.
news2 >oradebug dump heapdump 536870913
Statement processed.
Let's check our trace file:
server803.corporate.ge.com[oracle]_news2> cat db2_dw00_11903.trc.2|grep -i "total heap size"
HEAP DUMP heap name="session heap" desc=0x2b88a22b6d30
Total heap size =1768309088
HEAP DUMP heap name="koh-kghu sessi" desc=0x2b88a487cd60
Total heap size =429703184
HEAP DUMP heap name="koh-kghu sessi" desc=0x2b88a2db6110
Total heap size = 10794656
HEAP DUMP heap name="koh-kghu sessi" desc=0x2b88a239d2b8
Total heap size = 4149616
HEAP DUMP heap name="koh-kghu sessi" desc=0x2b88a22de820
Total heap size = 1272824
HEAP DUMP heap name="koh-kghu sessi" desc=0x2b88a2da2c48
Total heap size = 1178344
HEAP DUMP heap name="pga heap" desc=0xb7e9240
Total heap size = 11246712
HEAP DUMP heap name="XVMsubheap" desc=0x2b88a2214b38
Total heap size = 5709704
HEAP DUMP heap name="XVM subheap of" desc=0x2b88a2e67d00
Total heap size = 5708240
HEAP DUMP heap name="qmxdContextEnc" desc=0x2b88a2e67c00
Total heap size = 4216
HEAP DUMP heap name="KSFQ heap" desc=0x2b88a21d7f30
Total heap size = 1074104
HEAP DUMP heap name="koh-kghu call " desc=0x2b88a2740010
Total heap size = 940200
HEAP DUMP heap name="KFK_IO_SUBHEAP" desc=0x2b88a20684a8
Total heap size = 476688
HEAP DUMP heap name="PLS PGA hp" desc=0x2b88a2210bc0
Total heap size = 135280
HEAP DUMP heap name="top call heap" desc=0xb7eea60
Total heap size = 720680
HEAP DUMP heap name="callheap" desc=0x2b88a2311108
Total heap size = 285856
HEAP DUMP heap name="qbcqtcHTHeap" desc=0x2b88a2354b00
Total heap size = 6400
HEAP DUMP heap name="qcpi4.c.kgght" desc=0x2b88a2354738
Total heap size = 3624
HEAP DUMP heap name="kggec.c.kggfa" desc=0x2b88a2354478
Total heap size = 1528
HEAP DUMP heap name="PLS CGA hp" desc=0x2b88a2b83ee8
Total heap size = 1992
HEAP DUMP heap name="callheap" desc=0xb7edc18
Total heap size = 131064
HEAP DUMP heap name="callheap" desc=0xb7edb60
Total heap size = 38000
HEAP DUMP heap name="kti call subhe" desc=0x2b88a220d7e8
Total heap size = 36968
HEAP DUMP heap name="top uga heap" desc=0xb7eec80
Total heap size =1769554808
HEAP DUMP heap name="session heap" desc=0x2b88a22b6d30
Total heap size =1768309088
HEAP DUMP heap name="koh-kghu sessi" desc=0x2b88a487cd60
Total heap size =429703184
HEAP DUMP heap name="koh-kghu sessi" desc=0x2b88a2db6110
Total heap size = 10794656
HEAP DUMP heap name="koh-kghu sessi" desc=0x2b88a239d2b8
Total heap size = 4149616
HEAP DUMP heap name="koh-kghu sessi" desc=0x2b88a22de820
Total heap size = 1272824
HEAP DUMP heap name="koh-kghu sessi" desc=0x2b88a2da2c48
Total heap size = 1178344
Notice outstanding large part, "top uga heap" is big, caused by "session heap".
Then let's check session heap:
HEAP DUMP heap name="session heap" desc=0x2b88a22b6d30 ........... Total heap size =1768309088 Total free space =1296798672 ........... FIVE LARGEST SUB HEAPS for heap name="session heap" desc=0x2b88a22b6d30 Subheap ds=0x2b88a487cd60 heap name= koh-kghu sessi size= 430756008 owner=(nil) latch=(nil) Subheap ds=0x2b88a2db6110 heap name= koh-kghu sessi size= 10821000 owner=(nil) latch=(nil) Subheap ds=0x2b88a239d2b8 heap name= koh-kghu sessi size= 4159400 owner=(nil) latch=(nil) Subheap ds=0x2b88a22de820 heap name= koh-kghu sessi size= 1276088 owner=(nil) latch=(nil) Subheap ds=0x2b88a2da2c48 heap name= koh-kghu sessi size= 1181128 owner=(nil) latch=(nil)
We can see session heap is 1.7gb big. 0.5gb consumend on "koh-kghu sessi", and all other 1.2gb are free!
Eventhough the space is free, but it only belong to session heap and can't be used by other types in different heaps.
Why “koh-kghu sessi” consumend so much space and why so many free space are allcoated in session heap while it shouldn't be?
After searched on metalink, we may hit two bugs here, one for free memory, one for "koh-kghu sessi":
1.ORA-04030 encountered by a process which allocate large free memory [ID 1439928.1]
2.Bug 10194031 - EXPDP of OR XML leaks memory / runs slow [ID 10194031.8]
More......
June 30, 2012
RMAN blocked by ARCH process, waiting “enq: WL - contention”
Today, we got a file system alert, one server's arch mount point is 90% full.
After checking found one DB's archivelog occupied 90% space.
And this DB's backup arch job was running since 10 days ago and still hang there, no progress.
After checking in the DB, found the rman job was blocked by below red part event:
SSID OSUSER USERNAME STATE STATUS MODULE ---------- --------- ------------ -------------- ------------ -------------------------
BLOCKING_SESSION EVENT PROGRAM
---------------- ----------------------- --------------------------------
244 oracle SYS WAITING ACTIVE rman@server621 (TNS V1-V3)
58 enq: WL - contention rman@server621 (TNS V1-V3)
SQL_TEXT
--------------------------------------
begin dbms_rcvman.setDatabase(upper(:dbname), :rlscn, :rltime, :fhdbi, :db_unique_name, TRUE); dbms_rcvman.setCanApplyAnyRedo(TRUE); dbms_rcvman.setCanConvertCf(TRUE); if (:canhandletts = 1) then dbms_rcvman.setCanHandleTransportableTbs(TRUE); end if; end;
It is blocked by session 58, which is ARC0 process:
SID SPID ROGRAM
------ -------- --------------------------
58 10899 oracle@server621 (ARC1)
Killing ARC0 process, oracle will restart it automaticlly.
Then the rman backup job began to progress normally.
More......
June 29, 2012
hack the core:bootstrap$, replace bootstrap$ with user's table
bootstrap$ is the most core table for database. It contains defination for oracle most critical dictinary tables such as: obj$, tab$, ts$ etc.
During an startup, oracle will read bootstrap$ to build dictionary for whole DB.
Any modification on bootstrap$ may destroy your database, and oracle support won't help anything on that.
Below is bootstrap$ structure and one row in it:
SYS @ geded > select count(*) from bootstrap$;
COUNT(*)
----------
60
SYS @ geded > select * from bootstrap$ where line#=18;
LINE# OBJ#
---------- ----------
SQL_TEXT
-------------------------------------------------------------------------------------
18 18
CREATE TABLE OBJ$("OBJ#" NUMBER NOT NULL,"DATAOBJ#" NUMBER,"OWNER#" NUMBER NOT NULL,"NAME" VARCHAR2(30) NOT NULL,"NAMESPACE" NUMBER NOT NULL,"SUBNAME" VARCHAR2(30),"TYPE#" NUMBER NOT NULL,"C
TIME" DATE NOT NULL,"MTIME" DATE NOT NULL,"STIME" DATE NOT NULL,"STATUS" NUMBER NOT NULL,"REMOTEOWNER" VARCHAR2(30),"LINKNAME" VARCHAR2(128),"FLAGS" NUMBER,"OID$" RAW(16),"SPARE1" NUMBER,"SP
ARE2" NUMBER,"SPARE3" NUMBER,"SPARE4" VARCHAR2(1000),"SPARE5" VARCHAR2(1000),"SPARE6" DATE) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE ( INITIAL 16K NEXT 104K MINEXTENTS 1 MAXEXT
ENTS 2147483645 PCTINCREASE 0 OBJNO 18 EXTENTS (FILE 1 BLOCK 240))
SYS @ geded > desc bootstrap$;
Name Null? Type
-------------- ---------- ---------------
LINE# NOT NULL NUMBER
OBJ# NOT NULL NUMBER
SQL_TEXT NOT NULL VARCHAR2(4000)
Below is one possible error for bootstrap$ failure during startup:
ORA-01092: ORACLE instance terminated. Disconnection forced ORA-00704: bootstrap process failure.
Today, let's hack the bootstrap$, even replace it with our own table:
Kevin.Zhang > select count(*) from bootstrap$;
COUNT(*)
----------
60
Kevin.Zhang > shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
Kevin.Zhang > startup upgrade;
ORACLE instance started.
Total System Global Area 730714112 bytes
Fixed Size 2230080 bytes
Variable Size 318769344 bytes
Database Buffers 322961408 bytes
Redo Buffers 86753280 bytes
Database mounted.
Database opened.
Kevin.Zhang > create table KILLBOOT as select * from bootstrap$;
Table created.
Kevin.Zhang > delete from KILLBOOT where LINE#=59;
1 row deleted.
Kevin.Zhang > commit;
Commit complete.
Kevin.Zhang > delete from bootstrap$;
60 rows deleted.
Kevin.Zhang > commit;
Commit complete.
Here we use an internal package DBMS_DDL_INTERNAL.SWAP_BOOTSTRAP to swap bootstrap$ to our new table KILLBOOT.
Infact package DBMS_DDL_INTERNAL.SWAP_BOOTSTRAP only do one thing, to update kcvfhrdb in super block(file 1 block 1):
Kevin.Zhang > exec DBMS_DDL_INTERNAL.SWAP_BOOTSTRAP('KILLBOOT');
PL/SQL procedure successfully completed.
Kevin.Zhang > update obj$ set name='BOOTSTRAP_DEL' where name='BOOTSTRAP$';
1 row updated.
Kevin.Zhang > commit;
Commit complete.
Kevin.Zhang > shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
Kevin.Zhang > startup;
ORACLE instance started.
Total System Global Area 730714112 bytes
Fixed Size 2230080 bytes
Variable Size 318769344 bytes
Database Buffers 322961408 bytes
Redo Buffers 86753280 bytes
Database mounted.
Database opened.
Kevin.Zhang > select count(*) from bootstrap$;
COUNT(*)
----------
59
Kevin.Zhang > select count(*) from bootstrap_del;
COUNT(*)
----------
0
Kevin.Zhang > select count(*) from KILLBOOT;
COUNT(*)
----------
59
We are done, let's prove that we have already succeeded in replacing bootstrap$ with our new table KILLBOOT:
Kevin.Zhang > select dbms_rowid.rowid_relative_fno(rowid) file_id,dbms_rowid.rowid_block_number(rowid) block_id from bootstrap$ where rownum<10;
FILE_ID BLOCK_ID
---------- ----------
1 60817
1 60817
1 60817
1 60817
1 60817
1 60817
1 60817
1 60817
1 60817
9 rows selected.
From the block_id we can clearly identify since this block belong to KILLBOOT table.
More......
June 27, 2012
LMS terminating the instance due to error 4031
One of our two node Rac DB encounter 04031 due to inbalance in mini sub heap.
After turned parameter for shared_pool, i decided to bounce instance one by one.
But when i was bouncing the instance on first node, the second node instance also crashed.
Below is in the logfile for second instance:
Wed Jun 27 04:57:28 2012
Reconfiguration started (old inc 4, new inc 6)
List of instances:
2 (myinst: 2)
Global Resource Directory frozen
* dead instance detected - domain 0 invalid = TRUE
Communication channels reestablished
Master broadcasted resource hash value bitmaps
Non-local Process blocks cleaned out
Wed Jun 27 04:57:28 2012
LMS 1: 0 GCS shadows cancelled, 0 closed, 0 Xw survived
Wed Jun 27 04:57:28 2012
LMS 2: 0 GCS shadows cancelled, 0 closed, 0 Xw survived
Wed Jun 27 04:57:28 2012
LMS 0: 0 GCS shadows cancelled, 0 closed, 0 Xw survived
Set master node info
Submitted all remote-enqueue requests
Dwn-cvts replayed, VALBLKs dubious
All grantable enqueues granted
Post SMON to start 1st pass IR
Wed Jun 27 04:57:28 2012
Instance recovery: looking for dead threads
Beginning instance recovery of 1 threads
parallel recovery started with 6 processes
Started redo scan
Completed redo scan
read 202 KB redo, 74 data blocks need recovery
Wed Jun 27 04:57:32 2012
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
Errors in file /d001/product/ora_base/diag/rdbms/ttpoltd/ttpoltd2/trace/ttpoltd2_lms2_942.trc:
ORA-04031: unable to allocate 4136 bytes of shared memory ("shared pool","unknown object","sga heap(3,0)","gcs dynamic r")
LMS2 (ospid: 942): terminating the instance due to error 4031
Wed Jun 27 04:57:33 2012
System state dump requested by (instance=2, osid=942 (LMS2)), summary=[abnormal instance termination].
System State dumped to trace file /d001/product/ora_base/diag/rdbms/ttpoltd/ttpoltd2/trace/ttpoltd2_diag_920.trc
Wed Jun 27 04:57:34 2012
ORA-1092 : opitsk aborting process
Errors in file /d001/product/ora_base/diag/rdbms/ttpoltd/ttpoltd2/trace/ttpoltd2_diag_920.trc:
ORA-00601: cleanup lock conflict
Dumping diagnostic data in directory=[cdmp_20120627045733], requested by (instance=2, osid=942 (LMS2)), summary=[abnormal instance termination].
Wed Jun 27 04:57:35 2012
ORA-1092 : opitsk aborting process
Wed Jun 27 04:57:35 2012
License high water mark = 38
Instance terminated by LMS2, pid = 942
USER (ospid: 17522): terminating the instance
Instance terminated by USER, pid = 17522
From above log we can see during instance reconfigure progress, LMS hit 04031 and failed to progress with reconfigure operation, hence LMS terminated the instance.:
More......
June 23, 2012
04031 and large pool, parallel and PX msg pool
Parallelism require "PX msg pool". In past, "PX msg pool" are allocate from shared_pool:
SYS @ test > select * from v$sgastat where upper(name) like '%PX%';
POOL NAME BYTES
------------ -------------------------------------------------- ----------
shared pool PX subheap desc 256
shared pool PX msg pool struct 56
shared pool PX QC deq stats 1696
shared pool ksu: ksusg_emptypxsta 5200
shared pool PX server deq stats 1696
shared pool PX list of chunk lists 1088
shared pool PX subheap 66792
shared pool PX QC msg stats 2904
shared pool PX server msg stats 2904
shared pool PX msg pool 8192000
Since 10g, if Automatic Shared Memory Management(ASMM) is enabled, the "PX msg pool" will be allocated from large_pool:
SYS @ SYS @ test > select * from v$sgastat where name like '%PX%';
POOL NAME BYTES
------------ -------------------------------------------------- ----------
shared pool PX subheap desc 256
shared pool PX msg pool struct 56
shared pool PX QC deq stats 1696
shared pool PX server deq stats 1696
shared pool PX list of chunk lists 1088
shared pool PX subheap 757656
shared pool PX QC msg stats 2904
shared pool PX server msg stats 2904
large pool PX msg pool 8088608
Ignore those names starting with PX in shared_pool, most of they are only some kind of descriptions for "PX msg pool". For example, "PX msg pool struct" describle the structure of "PX msg pool". "PX server msg stats" records statistics afor "PX msg pool".
Recently We hit the error 04031 in large_pool:
ORA-04031: unable to allocate 2048024 bytes of shared memory ("large pool","unknown object","large pool","PX msg pool")
Obviously it is because insufficient space in large pool.
Current size for large pool is 16m.This size fit most cases, for example, parallel 10.
But in our case the issue SQL's parallel is 20:
*** 2012-06-20 22:11:37.731
dbkedDefDump(): Starting incident default dumps (flags=0x2, level=3, mask=0x0)
----- Current SQL Statement for this session (sql_id=5a10rbj2tx6j4) -----
select substrb(dump(val,16,0,32),1,120) ep, cnt from (select /*+ no_expand_table(t) index_rs(t) parallel(t,20) parallel_index(t,20) dbms_stats cursor_shari
ng_exact use_weak_name_resl dynamic_sampling(0) no_monitoring no_substrb_pad */max(substrb("BUSINXXXMENT",1,32)) val,count(*) cnt from "XXXAVETH"."XXX_EXT" t where substrb("BUSINXXXMENT",1,32) is not null group by nlssort(substrb("BUSINXXXMENT",1,32), 'NLS_SORT = binary')) order by nlssor
t(val,'NLS_SORT = binary')
If the SGA have enough free memory, this is not a issue, because large_pool=16m only define an lower bound of large_pool. When large_pool is lack of space, ASMM will try to allocate some space for it:
SYS @ test > select * from v$sgastat where POOL ='large pool'; POOL NAME BYTES ------------ -------------------------------------------------- ---------- large pool PX msg pool 8088608 large pool free memory 300000 <---- here from another session i run one SQL with parallel 20:--->
SYS @ test > / POOL NAME BYTES ------------ -------------------------------------------------- ---------- large pool PX msg pool 26287976 large pool free memory 2883640 large pool KGH: NO ACCESS 188512
We can see large pool extends automaticlly. Also notice: "KGH: NO ACCESS", it means ASMM retrive some space from large_pool and offer to db_cache.But in our case, the SGA already reached its sga_max_size, so there is no extra space to offer to large_pool.
The issue SQL is coming from a daily gather stats job:
exec DBMS_STATS.GATHER_SCHEMA_STATS(ownname=>'XXXVETH',estimate_percent=>20,block_sample=>false,method_opt=>'For all columns size 225',GRANULARITY=>'ALL',degree=>20,cascade=>true);
To fix the issue, we can either:
1. increase large pool size.
2. reduce degree in gather stats job.
More......