数据库多次出现ORA-00445: background process "J002" did not start after 30 seconds报错及ORA-3136错误
查看相关文档(文档 ID 1600807.1),两个报错都可能与内存压力过大有关
另外关于ORA-00445还有另一篇文档提到,在Oracle启用ASLR会无法保证shared memory address可用性
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.
ASLR 技术在 2005 年的 kernel 2.6.12 中被引入Linux 系统,它将进程的某些内存空间地址进行随机化来增大入侵者预测目的地址的难度,从而降低进程被成功入侵的风险。
内存中的对象,是有一个内存地址的。ASLR是基于安全考虑增加内存溢出攻击泄露的难度,因为如果内存地址是一定的,那么获取溢出对象的内存地址后,可以根据这个地址进行攻击。启用了ASLR,如果是不同的进程读取,就会给随机的offset偏移量,导致不同的进程,即使是同一个对象,得到的地址是不同的。
在oracle中,多个进程共享相同地址的共享内存,特别是父进程派生出子进程的时候,父进程告诉子进程的内存对象地址,应该是一致的。这种派生的关系,往往有CJQ0派生出J001,J002,SMCO派生出W001,W002,MMON派生出m001,m002等等。当开启ASLR后,多个进程在处理同一个共享内存对象时,得到了不同的内存地址,这个oracle处理不了,就报ora-445了。
在Oracle最佳实践中,建议关闭该参数
Disable ASLR (Address Space Layout Randomization) on OEL/RHEL 5, 6 and 7 and Suse 10 and above to prevent process startup errors. ASLR is a feature 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. See Document 1345364.1 for additional details.
RAC and Oracle Clusterware Best Practices and Starter Kit (Linux) (文档 ID 811306.1)
查看ASLR是否开启
/sbin/sysctl -a | grep randomize# 0:没有随机化。即关闭 ASLR。
# 1:保留的随机化。共享库、栈、mmap() 以及 VDSO 将被随机化。
# 2:完全的随机化。在 1 的基础上,通过 brk() 分配的内存空间也将被随机化。
关闭方法
Redhat 6及以上
vi /etc/sysctl.conf
#添加
kernel.randomize_va_space=0#执行
/sbin/sysctl -p
Redhat 5
vi /etc/sysctl.conf
#添加
kernel.randomize_va_space=0
kernel.exec-shield=0#须重启生效
reboot
验证方法
/sbin/sysctl -a | grep randomize
#看到
kernel.randomize_va_space = 0
参考
ORA-00445: Background Process "xxxx" Did Not Start After 120 Seconds (文档 ID 1345364.1)
IF : Troubleshooting ORA-00445: Background Process "xxxx" Did Not Start After n Seconds / Ksvcreate: Process(xxxx) Creation Failed (文档 ID 2023910.1)
RAC and Oracle Clusterware Best Practices and Starter Kit (Linux) (文档 ID 811306.1)
Linux平台的ASLR机制_加号减减号的博客-CSDN博客_aslr机制
https://community.oracle.com/docs/DOC-1006799
https://www.networkworld.com/article/3331199/what-does-aslr-do-for-linux.html