2022-04-30 17:19:25

by Naresh Kamboju

[permalink] [raw]
Subject: [next] mm: libhugetlbfs: WARNING: at mm/page_alloc.c:5368 __alloc_pages

Following kernel warning notices on Linux next-20220427 till date next-20220429
on qemu_arm64 and arm64 devices.

While testing libhugetlbfs test suite and ltp mm and hugetlb.

Reported-by: Linux Kernel Functional Testing <[email protected]>

Test log:
----------
truncate_above_4GB (2M: 64): PASS
brk_near_huge (2M: 64): brk_near_huge: malloc.c:2401: sysmalloc:
Assertion `(old_top == initial_top (av) && old_size == 0) ||
((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) &&
((unsigned long) old_end & (pagesize - 1)) == 0)' failed.
[ 15.685019] audit: type=1701 audit(1651222753.772:25):
auid=4294967295 uid=0 gid=0 ses=4294967295 pid=454
comm=\"brk_near_huge\"
exe=\"/usr/lib/libhugetlbfs/tests/obj64/brk_near_huge\" sig=6 res=1
[ 15.685629] ------------[ cut here ]------------
[ 15.685631] WARNING: CPU: 2 PID: 454 at mm/page_alloc.c:5368
__alloc_pages+0x624/0xd50
[ 15.688908] Modules linked in: rfkill crct10dif_ce fuse
[ 15.689714] CPU: 2 PID: 454 Comm: brk_near_huge Not tainted
5.18.0-rc4-next-20220429 #1
[ 15.691218] Hardware name: linux,dummy-virt (DT)
[ 15.691716] pstate: 20400005 (nzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 15.693109] pc : __alloc_pages+0x624/0xd50
[ 15.693686] lr : alloc_pages+0xb8/0x170
[ 15.694358] sp : ffff800008813630
[ 15.694662] x29: ffff800008813630 x28: 000000000000000e x27: ffffbc6414591650
[ 15.695663] x26: ffff0000c089f800 x25: ffff800008813c58 x24: 000000000000000e
[ 15.697045] x23: 0000000000000dc0 x22: 0000000000000000 x21: 000000000000000e
[ 15.697866] x20: ffffbc64160189a0 x19: 0000000000040dc0 x18: ffffffffffffffff
[ 15.699028] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000
[ 15.700073] x14: 0000000000000000 x13: 0000000000000000 x12: ffff0000ff7f5b58
[ 15.701344] x11: 0000000000000068 x10: ffffbc6414f7d000 x9 : ffffbc6413530e78
[ 15.702773] x8 : fffffc000321c001 x7 : 00000000f0000000 x6 : 0000000000000001
[ 15.703659] x5 : 0000000000000000 x4 : ffff0000c1a930c0 x3 : 0000000000000000
[ 15.705314] x2 : 0000000000000000 x1 : 0000000000000001 x0 : 0000000000040dc0
[ 15.706179] Call trace:
[ 15.706712] __alloc_pages+0x624/0xd50
[ 15.707231] alloc_pages+0xb8/0x170
[ 15.707870] kmalloc_order+0x40/0x100
[ 15.708482] kmalloc_order_trace+0x38/0x130
[ 15.709246] __kmalloc+0x37c/0x3e0
[ 15.709691] __regset_get+0xa0/0x104
[ 15.710131] regset_get_alloc+0x20/0x2c
[ 15.710524] elf_core_dump+0x3a8/0xd10
[ 15.711065] do_coredump+0xe50/0x138c
[ 15.711640] get_signal+0x860/0x920
[ 15.712249] do_notify_resume+0x184/0x1480
[ 15.712723] el0_svc+0xa8/0xc0
[ 15.713052] el0t_64_sync_handler+0xbc/0x140
[ 15.713741] el0t_64_sync+0x18c/0x190
[ 15.714206] ---[ end trace 0000000000000000 ]---
task-size-overrun (2M: 64): PASS

metadata:
git_ref: master
git_repo: https://gitlab.com/Linaro/lkft/mirrors/next/linux-next
git_sha: 5469f0c06732a077c70a759a81f2a1f00b277694
git_describe: next-20220429
kernel_version: 5.18.0-rc4
kernel-config: https://builds.tuxbuild.com/28SmyZKz6g9xF6bf4J2YibE8Lo0/config
kernel-config: https://builds.tuxbuild.com/28SmyZKz6g9xF6bf4J2YibE8Lo0/config
vmlinux : https://builds.tuxbuild.com/28SmyZKz6g9xF6bf4J2YibE8Lo0/vmlinux.xz
System.map : https://builds.tuxbuild.com/28SmyZKz6g9xF6bf4J2YibE8Lo0/System.map


Reported-by: Linux Kernel Functional Testing <[email protected]>

--
Linaro LKFT
https://lkft.linaro.org


2022-05-02 09:17:01

by Naresh Kamboju

[permalink] [raw]
Subject: Re: [next] mm: libhugetlbfs: WARNING: at mm/page_alloc.c:5368 __alloc_pages

On Fri, 29 Apr 2022 at 21:33, Qian Cai <[email protected]> wrote:
>
> On Fri, Apr 29, 2022 at 04:50:25PM +0530, Naresh Kamboju wrote:
> > Following kernel warning notices on Linux next-20220427 till date next-20220429
> > on qemu_arm64 and arm64 devices.
> >
> > While testing libhugetlbfs test suite and ltp mm and hugetlb.
> >
> > Reported-by: Linux Kernel Functional Testing <[email protected]>
> >
> > Test log:
> > ----------
> > truncate_above_4GB (2M: 64): PASS
> > brk_near_huge (2M: 64): brk_near_huge: malloc.c:2401: sysmalloc:
> > Assertion `(old_top == initial_top (av) && old_size == 0) ||
> > ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) &&
> > ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.
> > [ 15.685019] audit: type=1701 audit(1651222753.772:25):
> > auid=4294967295 uid=0 gid=0 ses=4294967295 pid=454
> > comm=\"brk_near_huge\"
> > exe=\"/usr/lib/libhugetlbfs/tests/obj64/brk_near_huge\" sig=6 res=1
> > [ 15.685629] ------------[ cut here ]------------
> > [ 15.685631] WARNING: CPU: 2 PID: 454 at mm/page_alloc.c:5368
>
> Naresh, I am having difficult to reproduce this reliablely. If you have
> spare cycles, do you mind reverting those to see if you can still
> reproduce? I can't seems to find other recent commits more suspicious
> than that series.
>
> 37e73e3b0a9d drivers: virtio_mem: use pageblock size as the minimum virtio_mem size.
> d2b9cd2acb2b mm: cma: use pageblock_order as the single alignment
> 7f125582227e mm: page_isolation: enable arbitrary range page isolation.
> fb009b307b21 mm: make alloc_contig_range work at pageblock granularity
> 7c7e18d510f4 mm: page_isolation: check specified range for unmovable pages
> 6a242a94b883 mm: page_isolation: move has_unmovable_pages() to mm/page_isolation.c
>
> $ git revert --no-edit e389355485b7..37e73e3b0a9d

The reported kernel warning was not solved by reverted above patches.


- Naresh

2022-05-02 23:08:28

by Qian Cai

[permalink] [raw]
Subject: Re: [next] mm: libhugetlbfs: WARNING: at mm/page_alloc.c:5368 __alloc_pages

On Fri, Apr 29, 2022 at 04:50:25PM +0530, Naresh Kamboju wrote:
> Following kernel warning notices on Linux next-20220427 till date next-20220429
> on qemu_arm64 and arm64 devices.
>
> While testing libhugetlbfs test suite and ltp mm and hugetlb.
>
> Reported-by: Linux Kernel Functional Testing <[email protected]>
>
> Test log:
> ----------
> truncate_above_4GB (2M: 64): PASS
> brk_near_huge (2M: 64): brk_near_huge: malloc.c:2401: sysmalloc:
> Assertion `(old_top == initial_top (av) && old_size == 0) ||
> ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) &&
> ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.
> [ 15.685019] audit: type=1701 audit(1651222753.772:25):
> auid=4294967295 uid=0 gid=0 ses=4294967295 pid=454
> comm=\"brk_near_huge\"
> exe=\"/usr/lib/libhugetlbfs/tests/obj64/brk_near_huge\" sig=6 res=1
> [ 15.685629] ------------[ cut here ]------------
> [ 15.685631] WARNING: CPU: 2 PID: 454 at mm/page_alloc.c:5368

Naresh, I am having difficult to reproduce this reliablely. If you have
spare cycles, do you mind reverting those to see if you can still
reproduce? I can't seems to find other recent commits more suspicious
than that series.

37e73e3b0a9d drivers: virtio_mem: use pageblock size as the minimum virtio_mem size.
d2b9cd2acb2b mm: cma: use pageblock_order as the single alignment
7f125582227e mm: page_isolation: enable arbitrary range page isolation.
fb009b307b21 mm: make alloc_contig_range work at pageblock granularity
7c7e18d510f4 mm: page_isolation: check specified range for unmovable pages
6a242a94b883 mm: page_isolation: move has_unmovable_pages() to mm/page_isolation.c

$ git revert --no-edit e389355485b7..37e73e3b0a9d

2022-05-03 00:39:02

by Qian Cai

[permalink] [raw]
Subject: Re: [next] mm: libhugetlbfs: WARNING: at mm/page_alloc.c:5368 __alloc_pages

On Sat, Apr 30, 2022 at 03:41:41AM +0530, Naresh Kamboju wrote:
> The reported kernel warning was not solved by reverted above patches.

Thanks for the confirmation. Then, I can't think of any other good
candidates at the moment apart from doing brutal-force bisecting.

2022-05-04 17:09:54

by Qian Cai

[permalink] [raw]
Subject: Re: [next] mm: libhugetlbfs: WARNING: at mm/page_alloc.c:5368 __alloc_pages

On Sat, Apr 30, 2022 at 03:41:41AM +0530, Naresh Kamboju wrote:
> The reported kernel warning was not solved by reverted above patches.

FYI, we found the sucker.

https://lore.kernel.org/all/YnGrbEt3oBBTly7u@qian/