银河麒麟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

 

© 版权声明
THE END
喜欢就支持一下吧
点赞0

Warning: mysqli_query(): (HY000/3): Error writing file '/tmp/MYsT1gU2' (Errcode: 28 - No space left on device) in /www/wwwroot/583.cn/wp-includes/class-wpdb.php on line 2345
admin的头像-五八三
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

图形验证码
取消
昵称代码图片