Denis Kirjanov <dkirja...@cloudlinux.com> writes: > On 3/16/17, Denis Kirjanov <dkirja...@cloudlinux.com> wrote: >> Hi guys, >> >> with the kernel rh7-3.10.0-327.36.1.vz7.18.7 we're seeing the >> following WARNING while running LTP test suite: >> >> [11796.576981] WARNING: at mm/slub.c:1252 >> slab_pre_alloc_hook.isra.42.part.43+0x15/0x17() >> >> [11796.591008] Call Trace: >> [11796.592065] [<ffffffff8164c468>] dump_stack+0x19/0x1b >> [11796.593076] [<ffffffff8107b850>] warn_slowpath_common+0x70/0xb0 >> [11796.594228] [<ffffffff8107b99a>] warn_slowpath_null+0x1a/0x20 >> [11796.595442] [<ffffffff81649469>] >> slab_pre_alloc_hook.isra.42.part.43+0x15/0x17 >> [11796.596686] [<ffffffff811d8b68>] kmem_cache_alloc_trace+0x58/0x230 >> [11796.597965] [<ffffffff813126ee>] ? kmapset_new+0x1e/0x50 >> [11796.599224] [<ffffffff813126ee>] kmapset_new+0x1e/0x50 >> [11796.600433] [<ffffffff8127c7ba>] __sysfs_add_one+0x4a/0xb0 >> [11796.601431] [<ffffffff8127c83b>] sysfs_add_one+0x1b/0xd0 >> [11796.602451] [<ffffffff8127baa7>] sysfs_add_file_mode+0xb7/0x100 >> [11796.603449] [<ffffffff8127bb1a>] sysfs_create_file+0x2a/0x30 >> [11796.604461] [<ffffffff812fe12c>] kobject_add_internal+0x16c/0x2f0 >> [11796.605503] [<ffffffff812fe5b5>] kobject_add+0x75/0xd0 >> [11796.606627] [<ffffffff811d8d17>] ? kmem_cache_alloc_trace+0x207/0x230 >> [11796.607655] [<ffffffffa0563091>] __link_block_group+0xe1/0x120 [btrfs] >> [11796.608634] [<ffffffffa05661a0>] btrfs_make_block_group+0x150/0x270 >> [btrfs] >> [11796.609701] [<ffffffffa059fd5f>] __btrfs_alloc_chunk+0x67f/0x8a0 >> [btrfs] >> [11796.610756] [<ffffffffa05a2eb4>] btrfs_alloc_chunk+0x34/0x40 [btrfs] >> [11796.611800] [<ffffffffa055d62f>] do_chunk_alloc+0x23f/0x410 [btrfs] >> [11796.612954] [<ffffffffa055e61a>] >> btrfs_check_data_free_space+0xea/0x280 [btrfs] >> [11796.614008] [<ffffffffa05898a1>] __btrfs_buffered_write+0x151/0x5c0 >> [btrfs] >> [11796.615153] [<ffffffffa058d056>] btrfs_file_aio_write+0x246/0x560 >> [btrfs] >> [11796.616141] [<ffffffff811eae92>] ? >> __mem_cgroup_commit_charge+0x152/0x350 >> [11796.617220] [<ffffffff811faff0>] do_sync_write+0x90/0xe0 >> [11796.618253] [<ffffffff811fb81d>] vfs_write+0xbd/0x1e0 >> [11796.619224] [<ffffffff811fc2bf>] SyS_write+0x7f/0xe0 >> [11796.620185] [<ffffffff8165ccc9>] system_call_fastpath+0x16/0x1b >> [11796.621145] ---[ end trace 1437311f89b9e3c6 ]--- >> > > Guys, I've found your commit: > > commit 149819fef38230c95f4d6c644061bc8b0dcdd51d > Author: Vladimir Davydov <vdavy...@parallels.com> > Date: Fri Jun 5 13:20:02 2015 +0400 > > mm/fs: Port diff-mm-debug-memallocation-caused-fs-reentrance > > Enable the debug once again, as the issue it found has been fixed: > https://jira.sw.ru/browse/PSBM-34112 > > Previous commit: 255427905323ac97a3c9b2d5acb2bf21ea2b31f6. > > Author: Dmitry Monakhov > Email: dmonak...@openvz.org > Subject: mm: debug memallocation caused fs reentrance > Date: Sun, 9 Nov 2014 11:53:14 +0400 > > But I can't open a link to figure out the original reason for the patch. Originally we found that [<ffffffff815c8cfa>] dump_stack+0x19/0x1b [<ffffffff8105da61>] warn_slowpath_common+0x61/0x80 [<ffffffff8105db8a>] warn_slowpath_null+0x1a/0x20 [<ffffffff815c5e55>] slab_pre_alloc_hook.isra.31.part.32+0x15/0x17 [<ffffffff8119d8c5>] kmem_cache_alloc+0x55/0x210 [<ffffffffa028fec1>] ? ext4_mb_add_groupinfo+0xe1/0x230 [ext4] [<ffffffffa028fec1>] ext4_mb_add_groupinfo+0xe1/0x230 [ext4] [<ffffffffa027fe66>] ext4_flex_group_add+0xba6/0x14b0 [ext4] [<ffffffffa0252ad9>] ? ext4_bg_num_gdb+0x79/0x90 [ext4] [<ffffffffa02819fd>] ext4_resize_fs+0x76d/0xe40 [ext4] [<ffffffffa0262ead>] ext4_ioctl+0xded/0x1110 [ext4] [<ffffffff811cc2db>] ? do_filp_open+0x4b/0xb0 [<ffffffff811ce2f5>] do_vfs_ioctl+0x255/0x4f0 [<ffffffff811d8f97>] ? __fd_install+0x47/0x60 [<ffffffff811ce5e4>] SyS_ioctl+0x54/0xa0 [<ffffffff815d9499>] system_call_fastpath+0x16/0x1b
This is pure bug, which resut in deadlock, or fscorruption. which I've fixed here https://github.com/torvalds/linux/commit/4fdb5543183d027a19805b72025b859af73d0863 I've realized that his is whole class of locking issues which should be detected on runtume that is why I've add this warning, I also send the patch to mainstream http://www.spinics.net/lists/linux-btrfs/msg39034.html which note that btrfs definitely has fs-reentrance issues http://www.spinics.net/lists/linux-btrfs/msg39035.html Dave does not like the way I've do the detection so patch was not committed, but it exists in our tree, It is resonanable to replace WARN_ON with WARN_ON_ONCE to prevent spamming. I'll send a patch > > > >> Thanks! >> _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel