-
Notifications
You must be signed in to change notification settings - Fork 443
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Elkeid v1.9 huge memory occupation on Rocky 8 (v4.18)
oncall: https://oncall.bytedance.net/chats/user/userCase?cross_oncall_flow_id=46075810&picked_detail=46075810 stack trace: @[ __kmalloc+376 __kmalloc+376 smith_init_ent+26 tt_rb_insert_key_nolock+30 smith_insert_ent+152 security_inode_create_pre_handler+4174 kprobe_ftrace_handler+144 ftrace_ops_assist_func+110 intel_nhlt_get_dmic_geo+286056 security_inode_create+5 path_openat+3372 do_filp_open+147 do_sys_open+388 do_syscall_64+91 entry_SYSCALL_64_after_hwframe+101 ]: 1440 影响范围:内核早于4.19的火山云环境 (1.9版本的驱动,支持文件落盘扫描功能),CentOS 6/7/8均在此范围之内。 产生机制:针对4.19之前的内核(不支持FMODE_CREATE通知功能),HIDS驱动只能自身缓存及管理新文件的创建信息,针对大量创建新文件并长时间占用的情况会导致内存使用量一直累加,因为没有文件关闭事件故不会触发基于LRU的问题控制机制故此内存不会释放,而正常程序会主动关闭文件句柄所以不会触发此问题。 修复方案:针对大量文件创建并保持占用的情况将强制启用LRU回收,已测试通过,发布前还需要进一步强化测试及验证。临时解决办法就是先下线HIDS驱动,等新版本发布后再次拉起即可,不需要系统重启;另外针对新文件创建量不大的系统,可以卸载并重新加载驱动可做到缓解内存占用的持续增加 问题分析与复盘: https://bytedance.larkoffice.com/docx/ZYsid6QOzo93fDx5evncgXLInHd Signed-off-by: shenping.matt <[email protected]>
- Loading branch information
1 parent
6185a45
commit d5a48c3
Showing
1 changed file
with
28 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters