AQ Server EMON Processes Get Error ORA-04021 (Doc ID 1921934.1)

Last updated on OCTOBER 09, 2016

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.3 and later
Information in this document applies to any platform.

Symptoms

See errors in database alert log on qxxx processes:

ORA-04021: timeout occurred while waiting to lock object
ORA-00447: fatal error in background process
Emon timeout encountered error 4021

AQ messages may stop being processed.

You have confirmed streams pool size>0.

 

A systemstate dump may show an EMON slave (Exxx) blocking other sessions waiting for Library Cache lock and not processing.

Example from systemstate:

   OSD pid info: Unix process pid: 79628, image: oracle@rac02db01-dc6 (E003) <<================EMON slave
   Short stack dump:
ksedsts()+465<-ksdxfstk()+32<-ksdxcb()+1927<-sspuser()+112<-__sighandler()<-kghfnd()+2951<-kghprmalo()+593<-kghalp()+1073<-kprbalo()+43<-kprbope()+69
<-kkcnsli()+145<-kponexpnfy()+631<-kkcnrri0()+2066<-kponexpreg()+3293
<-kponemn()+991<-ksvrdp()+1766<-opirip()+674<-opidrv()+603<-sou2o()+103<-opimai_real()+250<-ssthrdmain()+265<-main()+201<-__libc_start_main()+244

Current Wait Stack:

     Not in wait; last wait ended 65 min 48 sec ago     <<=====================================NOT IN WAIT
   There are 64 sessions blocked by this session.   <<================================BLOCKING OTHER SESSIONS

 

NOTE that the emon stack contains kponexpnfy which calls kkcnsli.

 

A sql trace of the emon slave may also show repeated looping of statement:

select location_name from loc$ where emon# = :1 and connection# = :2

 

 

 

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms