zoukankan      html  css  js  c++  java
  • systemdlogind.service的RemoveIPC参数影响

    systemd-logind.service的RemoveIPC参数影响

    背景

    在centos7.2,RHEL7.2或Kylin-Server-20200711版本系统内核上遇到一个奇怪的问题,用户登入后创建的文件,在用户logout后会被自动删除。

    原因

    在RHEL7.2及之后,systemd-logind 服务引入了一个新特性——当一个user 完全退出os之后,remove掉所有的IPC objects。
    该特性由/etc/systemd/logind.conf参数文件中RemoveIPC选项来控制。详细请看man logind.conf(5)。当使用默认值(即 RemoveIPC=yes)的情况,当用户退出时,操作系统会remove掉该用户的shared memory segments and semaphores。

    影响范围

    在设置了RemoveIPC=yes 的RHEL7.2或Kylin-Server-20200711版本系统中会crash掉使用了Shared Memory Segment (SHM) or Semaphores (SEM)的应用程序

    目前遇到过的数据库应用

    1. 在RHEL7.2上安装的Oracle Database应用程序异常crash
    2. 在Kylin-Server-10-SP1-Release-Build04-20200711-x86_64部署的DM DSC应用也出现异常crash

    解决方案

    关闭RemoveIPC特性

    # 修改配置文件 
    sed -i 's/.*RemoveIPC.*/RemoveIPC=no/' /etc/systemd/logind.conf 
    
    # 检查确认配置
    grep RemoveIPC /etc/systemd/logind.conf
    RemoveIPC=no
    
    # 重启服务或重启操作系统
    systemctl daemon-reload
    systemctl restart systemd-logind.service
    
    # 结果验证确认
    loginctl show-session | grep RemoveIPC
    systemctl show systemd-logind | grep RemoveIPC
    
  • 相关阅读:
    Envoy 源码分析--network L4 filter manager
    Envoy 源码分析--network
    Envoy 源码分析--buffer
    Envoy 源码分析--event
    kubeadm安装kubernetes-v1.13.1
    istio-opentracing链路追踪方案
    istio-mix介绍
    BLAKE及BLAKE2算法详解
    YIIMP矿池搭建
    NOMP矿池搭建
  • 原文地址:https://www.cnblogs.com/binliubiao/p/15524509.html
Copyright © 2011-2022 走看看