阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

RHEL 7上Oracle 莫名宕机 ORA-27300

204次阅读
没有评论

共计 1745 个字符,预计需要花费 5 分钟才能阅读完成。

现象:

Oracle 执行 job:expdp, 数据库实例直接宕掉, 报错如下:
ORA-27300: OS system dependent operation:semctl failed with status: 22
ORA-27301: OS failure message: Invalid argument
ORA-27302: failure occurred at: sskgpwrm1
ORA-27157: OS post/wait facility removed
ORA-27300: OS system dependent operation:semop failed with status: 36
ORA-27301: OS failure message: Identifier removed
ORA-27302: failure occurred at: sskgpwwait1

数据库版本 11.2.0.4, 操作系统版本:rhel 7
检查操作系统日志, 定时任务日志并无异常;

原因:
On RedHat 7.x, systemd-logind service introduced a new feature to remove all IPC objects when a user fully logs out.
The feature is controled by the option RemoveIPC in the /etc/systemd/logind.conf configuration file,
see man logind.conf(5) for details.
在 RHEL 7.x 的版本里,systemd-logind 服务控制着用户的行为, 当用户退出, 会清理该用户的所有内存段. 那么定时任务的数据泵就有问题了, 调用的内存段是 oracle 的;

查看 removeipc 的说明:
RemoveIPC=
Controls whether System V and POSIX IPC objects belonging to the user shall be removed when the user fully logs out. Takes a boolean argument. If enabled, the user
may not consume IPC resources after the last of the user’s sessions terminated. This covers System V semaphores, shared memory and message queues, as well as POSIX
shared memory and message queues. Note that IPC objects of the root user are excluded from the effect of this setting. Defaults to “yes”.
The default value for RemoveIPC in RHEL7.2 is yes.
默认值为 yes; 所以当有定时任务时:
As a result, when the last oracle or grid user disconnects, the OS removes shared memory segments and semaphores for those users.
As Oracle ASM and Databases use shared memory segments for SGA, removing shared memory segments will crash the Oracle ASM and database instances.

解决办法:
1) Set RemoveIPC=no in /etc/systemd/logind.conf
2) 重启服务
systemctl daemon-reload
systemctl restart systemd-logind

参考 MOS:
ORA-27300 ORA-27301 ORA-27302 ORA-27157 Database Crash (Doc ID 438205.1)
Failed Install of RAC with ASM: ORA-27300 ORA-27302 ORA-27300 ORA-27301 ORA-27302 (Doc ID 2099563.1)

更多 Oracle 相关信息见 Oracle 专题页面 https://www.linuxidc.com/topicnews.aspx?tid=12

正文完
星哥玩云-微信公众号
post-qrcode
 0
星锅
版权声明:本站原创文章,由 星锅 于2022-01-22发表,共计1745字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中