Re: [Devel] WARNING at mm/slub.c

2017-03-20 Thread Dmitry Monakhov

Denis Kirjanov  writes:

> On 3/16/17, Denis Kirjanov  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]  [] dump_stack+0x19/0x1b
>> [11796.593076]  [] warn_slowpath_common+0x70/0xb0
>> [11796.594228]  [] warn_slowpath_null+0x1a/0x20
>> [11796.595442]  []
>> slab_pre_alloc_hook.isra.42.part.43+0x15/0x17
>> [11796.596686]  [] kmem_cache_alloc_trace+0x58/0x230
>> [11796.597965]  [] ? kmapset_new+0x1e/0x50
>> [11796.599224]  [] kmapset_new+0x1e/0x50
>> [11796.600433]  [] __sysfs_add_one+0x4a/0xb0
>> [11796.601431]  [] sysfs_add_one+0x1b/0xd0
>> [11796.602451]  [] sysfs_add_file_mode+0xb7/0x100
>> [11796.603449]  [] sysfs_create_file+0x2a/0x30
>> [11796.604461]  [] kobject_add_internal+0x16c/0x2f0
>> [11796.605503]  [] kobject_add+0x75/0xd0
>> [11796.606627]  [] ? kmem_cache_alloc_trace+0x207/0x230
>> [11796.607655]  [] __link_block_group+0xe1/0x120 [btrfs]
>> [11796.608634]  [] btrfs_make_block_group+0x150/0x270
>> [btrfs]
>> [11796.609701]  [] __btrfs_alloc_chunk+0x67f/0x8a0
>> [btrfs]
>> [11796.610756]  [] btrfs_alloc_chunk+0x34/0x40 [btrfs]
>> [11796.611800]  [] do_chunk_alloc+0x23f/0x410 [btrfs]
>> [11796.612954]  []
>> btrfs_check_data_free_space+0xea/0x280 [btrfs]
>> [11796.614008]  [] __btrfs_buffered_write+0x151/0x5c0
>> [btrfs]
>> [11796.615153]  [] btrfs_file_aio_write+0x246/0x560
>> [btrfs]
>> [11796.616141]  [] ?
>> __mem_cgroup_commit_charge+0x152/0x350
>> [11796.617220]  [] do_sync_write+0x90/0xe0
>> [11796.618253]  [] vfs_write+0xbd/0x1e0
>> [11796.619224]  [] SyS_write+0x7f/0xe0
>> [11796.620185]  [] system_call_fastpath+0x16/0x1b
>> [11796.621145] ---[ end trace 1437311f89b9e3c6 ]---
>>
>
> Guys, I've found your commit:
>
> commit 149819fef38230c95f4d6c644061bc8b0dcdd51d
> Author: Vladimir Davydov 
> 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
 [] dump_stack+0x19/0x1b
 [] warn_slowpath_common+0x61/0x80
 [] warn_slowpath_null+0x1a/0x20
 [] slab_pre_alloc_hook.isra.31.part.32+0x15/0x17
 [] kmem_cache_alloc+0x55/0x210
 [] ? ext4_mb_add_groupinfo+0xe1/0x230 [ext4]
 [] ext4_mb_add_groupinfo+0xe1/0x230 [ext4]
 [] ext4_flex_group_add+0xba6/0x14b0 [ext4]
 [] ? ext4_bg_num_gdb+0x79/0x90 [ext4]
 [] ext4_resize_fs+0x76d/0xe40 [ext4]
 [] ext4_ioctl+0xded/0x1110 [ext4]
 [] ? do_filp_open+0x4b/0xb0
 [] do_vfs_ioctl+0x255/0x4f0
 [] ? __fd_install+0x47/0x60
 [] SyS_ioctl+0x54/0xa0
 [] 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


Re: [Devel] WARNING at mm/slub.c

2017-03-20 Thread Konstantin Khorenko

On 03/20/2017 11:11 AM, Denis Kirjanov wrote:

On 3/16/17, Denis Kirjanov  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]  [] dump_stack+0x19/0x1b
[11796.593076]  [] warn_slowpath_common+0x70/0xb0
[11796.594228]  [] warn_slowpath_null+0x1a/0x20
[11796.595442]  []
slab_pre_alloc_hook.isra.42.part.43+0x15/0x17
[11796.596686]  [] kmem_cache_alloc_trace+0x58/0x230
[11796.597965]  [] ? kmapset_new+0x1e/0x50
[11796.599224]  [] kmapset_new+0x1e/0x50
[11796.600433]  [] __sysfs_add_one+0x4a/0xb0
[11796.601431]  [] sysfs_add_one+0x1b/0xd0
[11796.602451]  [] sysfs_add_file_mode+0xb7/0x100
[11796.603449]  [] sysfs_create_file+0x2a/0x30
[11796.604461]  [] kobject_add_internal+0x16c/0x2f0
[11796.605503]  [] kobject_add+0x75/0xd0
[11796.606627]  [] ? kmem_cache_alloc_trace+0x207/0x230
[11796.607655]  [] __link_block_group+0xe1/0x120 [btrfs]
[11796.608634]  [] btrfs_make_block_group+0x150/0x270
[btrfs]
[11796.609701]  [] __btrfs_alloc_chunk+0x67f/0x8a0
[btrfs]
[11796.610756]  [] btrfs_alloc_chunk+0x34/0x40 [btrfs]
[11796.611800]  [] do_chunk_alloc+0x23f/0x410 [btrfs]
[11796.612954]  []
btrfs_check_data_free_space+0xea/0x280 [btrfs]
[11796.614008]  [] __btrfs_buffered_write+0x151/0x5c0
[btrfs]
[11796.615153]  [] btrfs_file_aio_write+0x246/0x560
[btrfs]
[11796.616141]  [] ?
__mem_cgroup_commit_charge+0x152/0x350
[11796.617220]  [] do_sync_write+0x90/0xe0
[11796.618253]  [] vfs_write+0xbd/0x1e0
[11796.619224]  [] SyS_write+0x7f/0xe0
[11796.620185]  [] system_call_fastpath+0x16/0x1b
[11796.621145] ---[ end trace 1437311f89b9e3c6 ]---



Guys, I've found your commit:

commit 149819fef38230c95f4d6c644061bc8b0dcdd51d
Author: Vladimir Davydov 
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.


Did not get your question.
If the question is about inability to open a link, then sorry for that but it's 
an internal jira id.

If this is an indirect question about how the issue has been fixed so we could 
return back the debug,
then there were a bunch of patches ported from mainstream, probably the one you 
needed is:

commit 4fdb5543183d027a19805b72025b859af73d0863
Author: Dmitry Monakhov 
Date:   Tue Nov 25 13:08:04 2014 -0500

ext4: cleanup GFP flags inside resize path


If the question was "why the debug patch was added at all?", then Dima can 
explain.

--
Best regards,

Konstantin Khorenko,
Virtuozzo Linux Kernel Team
___
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel


Re: [Devel] WARNING at mm/slub.c

2017-03-20 Thread Denis Kirjanov
On 3/16/17, Denis Kirjanov  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]  [] dump_stack+0x19/0x1b
> [11796.593076]  [] warn_slowpath_common+0x70/0xb0
> [11796.594228]  [] warn_slowpath_null+0x1a/0x20
> [11796.595442]  []
> slab_pre_alloc_hook.isra.42.part.43+0x15/0x17
> [11796.596686]  [] kmem_cache_alloc_trace+0x58/0x230
> [11796.597965]  [] ? kmapset_new+0x1e/0x50
> [11796.599224]  [] kmapset_new+0x1e/0x50
> [11796.600433]  [] __sysfs_add_one+0x4a/0xb0
> [11796.601431]  [] sysfs_add_one+0x1b/0xd0
> [11796.602451]  [] sysfs_add_file_mode+0xb7/0x100
> [11796.603449]  [] sysfs_create_file+0x2a/0x30
> [11796.604461]  [] kobject_add_internal+0x16c/0x2f0
> [11796.605503]  [] kobject_add+0x75/0xd0
> [11796.606627]  [] ? kmem_cache_alloc_trace+0x207/0x230
> [11796.607655]  [] __link_block_group+0xe1/0x120 [btrfs]
> [11796.608634]  [] btrfs_make_block_group+0x150/0x270
> [btrfs]
> [11796.609701]  [] __btrfs_alloc_chunk+0x67f/0x8a0
> [btrfs]
> [11796.610756]  [] btrfs_alloc_chunk+0x34/0x40 [btrfs]
> [11796.611800]  [] do_chunk_alloc+0x23f/0x410 [btrfs]
> [11796.612954]  []
> btrfs_check_data_free_space+0xea/0x280 [btrfs]
> [11796.614008]  [] __btrfs_buffered_write+0x151/0x5c0
> [btrfs]
> [11796.615153]  [] btrfs_file_aio_write+0x246/0x560
> [btrfs]
> [11796.616141]  [] ?
> __mem_cgroup_commit_charge+0x152/0x350
> [11796.617220]  [] do_sync_write+0x90/0xe0
> [11796.618253]  [] vfs_write+0xbd/0x1e0
> [11796.619224]  [] SyS_write+0x7f/0xe0
> [11796.620185]  [] system_call_fastpath+0x16/0x1b
> [11796.621145] ---[ end trace 1437311f89b9e3c6 ]---
>

Guys, I've found your commit:

commit 149819fef38230c95f4d6c644061bc8b0dcdd51d
Author: Vladimir Davydov 
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.



> Thanks!
>
___
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel


Re: [Devel] WARNING at mm/slub.c

2017-03-17 Thread Konstantin Khorenko

Hi Denis,

1) do you see the same on latest RHEL7 3.10.0-514.10.2.el7 kernel?
If yes, please file a bug to RedHat.

If no:
2) do you see the same on latest vz7 kernel 3.10.0-514.10.2.vz7.29.4 or later?
   https://download.openvz.org/virtuozzo/factory/x86_64/os/Packages/v/

If yes, please file a bug on bugs.openvz.org, we'll take a look.

Thank you.

--
Best regards,

Konstantin Khorenko,
Virtuozzo Linux Kernel Team

On 03/16/2017 03:58 PM, Denis Kirjanov 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]  [] dump_stack+0x19/0x1b
[11796.593076]  [] warn_slowpath_common+0x70/0xb0
[11796.594228]  [] warn_slowpath_null+0x1a/0x20
[11796.595442]  []
slab_pre_alloc_hook.isra.42.part.43+0x15/0x17
[11796.596686]  [] kmem_cache_alloc_trace+0x58/0x230
[11796.597965]  [] ? kmapset_new+0x1e/0x50
[11796.599224]  [] kmapset_new+0x1e/0x50
[11796.600433]  [] __sysfs_add_one+0x4a/0xb0
[11796.601431]  [] sysfs_add_one+0x1b/0xd0
[11796.602451]  [] sysfs_add_file_mode+0xb7/0x100
[11796.603449]  [] sysfs_create_file+0x2a/0x30
[11796.604461]  [] kobject_add_internal+0x16c/0x2f0
[11796.605503]  [] kobject_add+0x75/0xd0
[11796.606627]  [] ? kmem_cache_alloc_trace+0x207/0x230
[11796.607655]  [] __link_block_group+0xe1/0x120 [btrfs]
[11796.608634]  [] btrfs_make_block_group+0x150/0x270 [btrfs]
[11796.609701]  [] __btrfs_alloc_chunk+0x67f/0x8a0 [btrfs]
[11796.610756]  [] btrfs_alloc_chunk+0x34/0x40 [btrfs]
[11796.611800]  [] do_chunk_alloc+0x23f/0x410 [btrfs]
[11796.612954]  []
btrfs_check_data_free_space+0xea/0x280 [btrfs]
[11796.614008]  [] __btrfs_buffered_write+0x151/0x5c0 [btrfs]
[11796.615153]  [] btrfs_file_aio_write+0x246/0x560 [btrfs]
[11796.616141]  [] ? __mem_cgroup_commit_charge+0x152/0x350
[11796.617220]  [] do_sync_write+0x90/0xe0
[11796.618253]  [] vfs_write+0xbd/0x1e0
[11796.619224]  [] SyS_write+0x7f/0xe0
[11796.620185]  [] system_call_fastpath+0x16/0x1b
[11796.621145] ---[ end trace 1437311f89b9e3c6 ]---

Thanks!
___
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

___
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel


[Devel] WARNING at mm/slub.c

2017-03-16 Thread Denis Kirjanov
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]  [] dump_stack+0x19/0x1b
[11796.593076]  [] warn_slowpath_common+0x70/0xb0
[11796.594228]  [] warn_slowpath_null+0x1a/0x20
[11796.595442]  []
slab_pre_alloc_hook.isra.42.part.43+0x15/0x17
[11796.596686]  [] kmem_cache_alloc_trace+0x58/0x230
[11796.597965]  [] ? kmapset_new+0x1e/0x50
[11796.599224]  [] kmapset_new+0x1e/0x50
[11796.600433]  [] __sysfs_add_one+0x4a/0xb0
[11796.601431]  [] sysfs_add_one+0x1b/0xd0
[11796.602451]  [] sysfs_add_file_mode+0xb7/0x100
[11796.603449]  [] sysfs_create_file+0x2a/0x30
[11796.604461]  [] kobject_add_internal+0x16c/0x2f0
[11796.605503]  [] kobject_add+0x75/0xd0
[11796.606627]  [] ? kmem_cache_alloc_trace+0x207/0x230
[11796.607655]  [] __link_block_group+0xe1/0x120 [btrfs]
[11796.608634]  [] btrfs_make_block_group+0x150/0x270 [btrfs]
[11796.609701]  [] __btrfs_alloc_chunk+0x67f/0x8a0 [btrfs]
[11796.610756]  [] btrfs_alloc_chunk+0x34/0x40 [btrfs]
[11796.611800]  [] do_chunk_alloc+0x23f/0x410 [btrfs]
[11796.612954]  []
btrfs_check_data_free_space+0xea/0x280 [btrfs]
[11796.614008]  [] __btrfs_buffered_write+0x151/0x5c0 [btrfs]
[11796.615153]  [] btrfs_file_aio_write+0x246/0x560 [btrfs]
[11796.616141]  [] ? __mem_cgroup_commit_charge+0x152/0x350
[11796.617220]  [] do_sync_write+0x90/0xe0
[11796.618253]  [] vfs_write+0xbd/0x1e0
[11796.619224]  [] SyS_write+0x7f/0xe0
[11796.620185]  [] system_call_fastpath+0x16/0x1b
[11796.621145] ---[ end trace 1437311f89b9e3c6 ]---

Thanks!
___
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel