今天遇到一個問題,就是Oracle 11.2.0.4 EMON進程持續消耗CPU。問題現象如圖所示:
查詢oracle mos發現是Oracle未發佈的BUG9735536(Doc ID 1603844.1)
APPLIES TO:
Oracle Database - Enterprise Edition - Version 11.2.0.1 to 12.1.0.2 [Release 11.2 to 12.1]
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Information in this document applies to any platform.
SYMPTOMS
Event Monitor (EMON) slave process is consuming CPU.
Multiple stacks from the process obtained via
connect / as sysdba
oradebug setospid 1379
or use the following to find EMON process
In 11g ps -ef | grep EMON
In 12c ps-ef |grep ennn
oradebug SHORT_STACK
have the form
Oracle pid: 43, Unix process pid: 1379, image: oracle@feltux3154 (E000)
_write()+10<-nttwr()+275<-nsntwrn()+111<-nspsend()+935<-nsdo()+4694<-nsfull_sd()+46<-kpcesend()+952<-kponsnd()+392<-kponepms()+1729<-kponprmsg()+405<-kponemn0()+597<-kponemn()+1152<-ksvrdp()+3653<-opirip()+901<-opidrv()+684<-sou2o()+87<-opimai_real()+280<-ssthrdmain()+295<-main()+203<-_start()+108
which indicates it is stuck in a network write.
CAUSE
The cause of this issue has been identified in unpublished enhancement Bug 973553
SOLUTION
The workaround is to kill the emon slave process via
kill -9 ps_id
where ps_id is the process id of the emon slave.
The emon slave will automatically restart when it is next required to do so.
To permanently resolve the issue if the release is 11.2.0.3 or below apply Patch 9735536 (Just apply the fix, no need to set any underscore parameters to activate)
The fix for 9735536 is first included in 11.2.0.4 and higher.
In 11.2.0.4 onwards do the following to enable the fix for unpublished Bug 9735536 :
connect / as sysdba
alter system set "_client_enable_auto_unregister"=true scope=spfile
shutdown immediate
startup
REFERENCES
BUG:14796134 - EMON SLAVE PROCESS HANGS IN NETWORK WRITE
NOTE:9735536.8 - Bug 9735536 - Enhancement request which allows ability to selectively remove slow clients from Emon Notification mechanism
如文檔,臨時解決方法是查殺EMON重啓該進程,處理後問題實例的CPU使用率立即下降: