Memleaks in offset_ctx->xa (shmem)
Subsystems (3)
Hi,
I notice a regression report on Bugzilla [1]. Quoting from it:
Quoted 22 lines
We have been getting memleaks in
offset_ctx->xain our networking tests:unreferenced object
0xffff8881004cd080(size 576):
comm "systemd", pid 1, jiffies 4294893373 (age 1992.864s) hex dump (first 32 bytes):00 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 38 5c 7c 02 81 88 ff ff 98 d0 4c 00 81 88 ff ff 8\|.......L..... backtrace: [<000000000f554608>] xas_alloc+0x306/0x430 [<0000000075537d52>] xas_create+0x4b4/0xc80 [<00000000a927aab2>] xas_store+0x73/0x1680 [<0000000020a61203>] __xa_alloc+0x1d8/0x2d0 [<00000000ae300af2>] __xa_alloc_cyclic+0xf1/0x310 [<000000001032332c>] simple_offset_add+0xd8/0x170 [<0000000073229fad>] shmem_mknod+0xbf/0x180 [<00000000242520ce>] vfs_mknod+0x3b0/0x5c0 [<000000001ef218dd>] unix_bind+0x2c2/0xdb0 [<0000000009b9a8dd>] __sys_bind+0x127/0x1e0 [<000000003c949fbb>] __x64_sys_bind+0x6e/0xb0 [<00000000b8a767c7>] do_syscall_64+0x3d/0x90 [<000000006132ae0d>] entry_SYSCALL_64_after_hwframe+0x46/0xb0
Quoted 3 lines
Memleak trace points to some syscall performed by systemd and none of our tests do anything more advanced with it than 'systemctl restart ovs-vswitchd'. Basically it is a setup with Fedora and an upstream kernel that executes bunch of network offload tests with Open vSwitch, iproute2 tc, Linux bridge, etc.
It looks like those may be caused by recent commit
6faddda69f62("libfs: Add directory operations for stable offsets") but we don't have a proper reproduction, just sometimes arbitrary getting the memleak complains during/after the regression run.
See Bugzilla for the full thread.
Anyway, I'm adding it to regzbot:
#regzbot introduced: 6faddda69f623d https://bugzilla.kernel.org/show_bug.cgi?id=218039
#regzbot title: stable offsets directory operation support triggers offset_ctx->xa memory leak
Thanks.
[1]: https://bugzilla.kernel.org/show_bug.cgi?id=218039
Signature · 1 line
An old man doll... just what I always wanted! - Clara
Quoted 9 lines · Bagas Sanjaya
I notice a regression report on Bugzilla [1]. Quoting from it:
Quoted 3 lines
We have been getting memleaks in
offset_ctx->xain our networking tests:unreferenced object
0xffff8881004cd080(size 576):[...]
#regzbot introduced:6faddda69f623dhttps://bugzilla.kernel.org/show_bug.cgi?id=218039
#regzbot title: stable offsets directory operation support triggersoffset_ctx->xamemory leak
Thx for adding this to regzbot.
Bagas, FWIW, before doing so you in the future might want to search lore for an abbreviated commit-id with a wildcard (e.g.
https://lore.kernel.org/all/?q=6faddda6* ) and the bugzilla url (e.g.
https://lore.kernel.org/all/?q=https%3A%2F%2Fbugzilla.kernel.org%2Fshow_bug.cgi%3Fid%3D218039).
Because then in this case you would have noticed that this was already discussed on the lists and Chuck asked to bring it to bugzilla for further tracking, so forwarding this likely was not worth it:
https://lore.kernel.org/all/[email protected]/
OTOH I wonder if what Chuck asked for was wise: '''Looks like "Memory Management / Other" is appropriate for shmem, and Hugh or Andrew can re-assign ownership to me.'''
Not sure if Hugh or Andrew actually do anything like that. I doubt that, but maybe I'm wrong. Ahh, the joys of our bugzilla instance that many core developers avoid... (FWIW, I don't blame anyone for that, I understand why it's like that; but it complicated things...).
Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat) --
Everything you wanna know about Linux kernel regression tracking:
https://linux-regtracking.leemhuis.info/about/#tldr
If I did something stupid, please tell me, as explained on that page.
P.S., FWIW:
#regzbot monitor: https://lore.kernel.org/all/[email protected]/
Quoted 9 lines · Linux regression tracking (Thorsten Leemhuis)
Bagas, FWIW, before doing so you in the future might want to search lore for an abbreviated commit-id with a wildcard (e.g.
https://lore.kernel.org/all/?q=6faddda6* ) and the bugzilla url (e.g.
https://lore.kernel.org/all/?q=https%3A%2F%2Fbugzilla.kernel.org%2Fshow_bug.cgi%3Fid%3D218039).
Because then in this case you would have noticed that this was already discussed on the lists and Chuck asked to bring it to bugzilla for further tracking, so forwarding this likely was not worth it:
https://lore.kernel.org/all/[email protected]/
Thanks for the tip reminder! I always forget it then...
Signature · 1 line
An old man doll... just what I always wanted! - Clara