ORA-445报错与ASLR

60 篇文章 13 订阅
51 篇文章 1 订阅

数据库多次出现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

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Hehuyi_In

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值