今天遇到一个问题,就是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
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
(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
- 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使用率立即下降: