-
Bug
-
Resolution: Unresolved
-
Medium
-
None
-
None
-
None
-
3
-
9223372036854775807
-
- Problem
On master, `check_mem_leak()` in `test-framework.sh` does not detect an LNet (Portals) memory leak. Tests that unload the modules pass even when LNet leaks memory.
-
- Environment
- master since LU-18687 "debug: cleanly split lustre_compat and debug" (commit 7fa1ec5446, landed 2026-02-10).
- Any node. b_es7_0 is not affected.
-
- Reproduction
1. Make LNet leak memory. The reproducer in LU-21009 is one way.
2. Unload the modules with `unload_modules_local` or `unload_modules`.
3. The console shows `(module.c:646:debug_module_exit()) Portals memory leaked: 320 bytes`. `check_mem_leak()` returns 0.
-
- Analysis
`check_mem_leak()` matches the leak line with this pattern:
dmesg | tail -n 20 | grep -E -i "libcfs.*memory leaked"
Before LU-18687, `libcfs_exit()` printed the message, so the line contained "libcfs". Now `debug_module_exit()` prints it, and the line does not contain "libcfs". The pattern matches nothing.
b_es7_0 still prints the message from `libcfs_exit()`, and its `check_mem_leak()` catches the same leak.
-
- Proposed fix
Match the message text instead of the function name, for example `grep -E "Portals memory leaked"`. This works for the old and the new function name.
- is related to
-
LU-18687 Separate userspace/compat code from kernel code
-
- Open
-