• 银河麒麟V10 SP2 auditd服务内存泄露问题


    这几天遇到基于海光服务器的银河麒麟V10 SP2版本操作系统出现内存无故增长问题。

    排查发现auditd服务,占用了大量内存。

    我的环境是银河麒麟V10 SP2 524,audit版本audit-3.0-5.se.06

    复制代码
    ==5037== HEAP SUMMARY:
    ==5037==     in use at exit: 3,022 bytes in 210 blocks
    ==5037==   total heap usage: 415 allocs, 205 frees, 159,455 bytes allocated
    ==5037== 
    ==5037== 122 bytes in 35 blocks are definitely lost in loss record 1 of 6
    ==5037==    at 0x483479B: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==5037==    by 0x488435C: xmalloc (in /usr/lib64/libaudit.so.1.0.0)
    ==5037==    by 0x4884393: xmemdup (in /usr/lib64/libaudit.so.1.0.0)
    ==5037==    by 0x48848FF: ??? (in /usr/lib64/libaudit.so.1.0.0)
    ==5037==    by 0x4884B4C: get_file_sys_info (in /usr/lib64/libaudit.so.1.0.0)
    ==5037==    by 0x11217B: ??? (in /usr/sbin/auditd)
    ==5037==    by 0x112D83: ??? (in /usr/sbin/auditd)
    ==5037==    by 0x10ECA7: ??? (in /usr/sbin/auditd)
    ==5037==    by 0x4BD0B26: (below main) (libc-start.c:308)
    ==5037== 
    ==5037== 122 bytes in 35 blocks are definitely lost in loss record 2 of 6
    ==5037==    at 0x483479B: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==5037==    by 0x488435C: xmalloc (in /usr/lib64/libaudit.so.1.0.0)
    ==5037==    by 0x4884393: xmemdup (in /usr/lib64/libaudit.so.1.0.0)
    ==5037==    by 0x488494E: ??? (in /usr/lib64/libaudit.so.1.0.0)
    ==5037==    by 0x4884B4C: get_file_sys_info (in /usr/lib64/libaudit.so.1.0.0)
    ==5037==    by 0x11217B: ??? (in /usr/sbin/auditd)
    ==5037==    by 0x112D83: ??? (in /usr/sbin/auditd)
    ==5037==    by 0x10ECA7: ??? (in /usr/sbin/auditd)
    ==5037==    by 0x4BD0B26: (below main) (libc-start.c:308)
    复制代码

    分析auditd服务存在内存泄露问题,位置在/usr/lib64/libaudit.so.1.0.0的get_file_sys_info处,malloc以后未释放。

    auditd是审计服务,会对ssh的会话做日志记录,该问题出现在写日志前判断分区时的一部分代码。

    经过循环ssh登录退出,也复现了这个现象。

     yum update audit

    升级到audit-3.0-5.se.07.ky10及以后版本即可解决

    我也找到了官方发布的补丁:https://www.kylinos.cn/index.php/support/update/6.html

     

  • 相关阅读:
    【KV260】利用XADC生成芯片温度曲线图
    Java后端面试题(redis相关2)(day8)
    【RepVGG网络】
    超简单的集成表达式树查询组件,Sy.ExpressionBuilder 使用说明
    桥接模式学习
    N9344C安捷伦Agilent N9344C频谱分析仪
    GO语言之Goroutine和channel
    isa-l 中硬件优化函数的调用路径
    电机开源驱动器基本操作与实现
    CNN(卷积神经网络)、RNN(循环神经网络)、DNN(深度神经网络)的内部网络结构有什么区别?
  • 原文地址:https://www.cnblogs.com/vpandaxjl/p/17663818.html