“Slow” system & ORA-00445: background process “DIAG” did not start after 120 seconds ?

Since I am currently checking all Oracle systems at the customers site, I thought at first sight, that almost all of them are overutilized or wrong configured, because everything seemed so sloooooow… Especially the new logins and creating of the new processes were a way too slow – more than 5 seconds! Sometimes I waited for the local login as sysdba for about 15-20 seconds!

Another problem was, when the database has been restarted, it couldn’t get online/opened, because background processes couldn’t get started! I got these messages:

ORA-00445: background process "DIAG" did not start after 120 seconds
ORA-00445: background process "VKRM" did not start after 120 seconds
ORA-00445: background process "DBRM" did not start after 120 seconds

and so on…

The prime suspect was the memory and I went in that direction to analyse it and to find the root cause of that issue. This behaviour has been noticed not only on one system – all of them are affected!

I found on the My Oracle Support homepage more details about it and fortunately the reason and solution for this issue:

ORA-00445: Background Process “xxxx” Did Not Start After 120 Seconds (Doc ID 1345364.1)

So, what’s the cause?
Recent linux kernels have a feature called Address Space Layout Randomization (ASLR) and it is designed to load shared memory objects in random addresses.
In Oracle, multiple processes map a shared memory object at the same address across the processes.

With ASLR turned on Oracle cannot guarantee the availability of this shared memory address.
This conflict in the address space means that a process trying to attach a shared memory object to a specific address may not be able to do so, resulting in a failure in shmat subroutine.

You can verify whether ASLR is being used as follows:

# /sbin/sysctl -a | grep randomize
kernel.randomize_va_space = 1

If the parameter is set to any value other than 0 then ASLR is in use.

To permanently disable ASLR, add/modify this parameter in /etc/sysctl.conf:

kernel.randomize_va_space=0
kernel.exec-shield=0

You need to reboot for kernel.exec-shield parameter to take effect.

Hope it helps!


Leave a Reply

Your email address will not be published. Required fields are marked *