For older debug kernels we get a double free with RCU usage with Xarray.
WARNING: CPU: 2 PID: 21477 at lib/debugobjects.c:286
debug_print_object+0x83/0xa0
ODEBUG: activate active (active state 1) object type:
rcu_head hint: (null)
Modules linked in: lustre(OE) ofd(OE) osp(OE) lod(OE)
ost(OE) mdt(OE) mdd(OE) mgs(OE) lquota(OE) lfsck(OE) obdecho(OE) mgc(OE)
mdc(OE) lov(OE) osc(OE) lmv(OE) fid(OE) fld(OE) ptlrpc_gss(OE)
ptlrpc(OE) obdclass(OE) ksocklnd(OE) lnet(OE) crc32_generic libcfs(OE)
crc_t10dif crct10dif_generic crct10dif_common rpcsec_gss_krb5 squashfs
pcspkr i2c_piix4 i2c_core binfmt_misc ip_tables ext4 mbcache jbd2
ata_generic pata_acpi ata_piix serio_raw libata
CPU: 2 PID: 21477 Comm: umount Tainted: G OE
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),
BIOS 1.16.2-1.fc38 04/01/2014
Call Trace:
[<
ffffffff817ded29>] dump_stack+0x19/0x1b
[<
ffffffff8108d558>] __warn+0xd8/0x100
[<
ffffffff8108d5df>] warn_slowpath_fmt+0x5f/0x80
[<
ffffffff81414723>] debug_print_object+0x83/0xa0
[<
ffffffff814150af>] debug_object_activate+0x1af/0x210
[<
ffffffff817e8d7e>] ? _raw_spin_unlock+0xe/0x20
[<
ffffffffa0189e60>] ? xas_alloc+0xd0/0xd0 [libcfs]
[<
ffffffff8114dc8f>] __call_rcu+0x3f/0x2d0
[<
ffffffff8114df3d>] call_rcu_sched+0x1d/0x20
[<
ffffffffa0189f44>] xas_free_nodes+0xa4/0xf0 [libcfs]
[<
ffffffffa018b26f>] xa_destroy+0xdf/0xf0 [libcfs]
This can be solved by cleaning up individual items in the Xarray
before destroying the Xarray.
Test-Parameters: trivial
Test-Parameters: testlist=sanity-quota env=ONLY=1,ONLY_REPEAT=100 clientdistro=el7.9
Change-Id: I49c5fb588d1b5c44f37e55500a6f33a2cd3988ee
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52381
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>