2022-07-26 11:36:33

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: run time warning after merge of the mm tree

Hi all,

After merging the mm tree, today's linux-next qemu run (powerpc
pseries_le_defconfig) produced this warning:

[ 2.579447][ T1] Freeing unused kernel image (initmem) memory: 5120K
[ 2.597718][ T1] Run /init as init process
[ 2.725683][ T1] ------------[ cut here ]------------
[ 2.725993][ T1] WARNING: CPU: 0 PID: 1 at lib/maple_tree.c:1227 mas_alloc_nodes+0x228/0x350
[ 2.727071][ T1] Modules linked in:
[ 2.727515][ T1] CPU: 0 PID: 1 Comm: init Not tainted 5.19.0-rc8 #2
[ 2.727924][ T1] NIP: c0000000007e6d18 LR: c0000000007f5434 CTR: c0000000003bb950
[ 2.728030][ T1] REGS: c0000000034c3770 TRAP: 0700 Not tainted (5.19.0-rc8)
[ 2.728190][ T1] MSR: 8000000000029033 <SF,EE,ME,IR,DR,RI,LE> CR: 44428480 XER: 00000000
[ 2.728584][ T1] CFAR: c0000000007e6b70 IRQMASK: 0
[ 2.728584][ T1] GPR00: c000000000403ee8 c0000000034c3a10 c00000000279f400 c0000000034c3b28
[ 2.728584][ T1] GPR04: 0000000000000cc0 0000000000000cc0 0000000000000018 0000000062dfc850
[ 2.728584][ T1] GPR08: 0000000000000001 0000000000000004 0000000000000000 0000000000008000
[ 2.728584][ T1] GPR12: 0000000000000000 c000000002970000 0000000000000003 00007ffffc35fb60
[ 2.728584][ T1] GPR16: 0000000000000002 0000000100000000 00007fffa43c0130 c0000000074d03f0
[ 2.728584][ T1] GPR20: 0000000000000002 c0000000074d02d0 00007fffa4350000 0000000000000018
[ 2.728584][ T1] GPR24: 00007fffa434ffff 0000000000000002 00007fffa4330000 c0000000034c3b28
[ 2.728584][ T1] GPR28: 0000000000000004 c0000000074d0480 0000000000000000 c0000000034c3b28
[ 2.729676][ T1] NIP [c0000000007e6d18] mas_alloc_nodes+0x228/0x350
[ 2.729769][ T1] LR [c0000000007f5434] mas_preallocate+0xb4/0x190
[ 2.730100][ T1] Call Trace:
[ 2.730277][ T1] [c0000000034c3a10] [c0000000033f01a0] 0xc0000000033f01a0 (unreliable)
[ 2.730876][ T1] [c0000000034c3a70] [c0000000034c3ab0] 0xc0000000034c3ab0
[ 2.730990][ T1] [c0000000034c3ab0] [c000000000403ee8] mmap_region+0x2c8/0x880
[ 2.731102][ T1] [c0000000034c3bf0] [c00000000040494c] do_mmap+0x4ac/0x610
[ 2.731206][ T1] [c0000000034c3c90] [c0000000003c5bc8] vm_mmap_pgoff+0xc8/0x1c0
[ 2.731307][ T1] [c0000000034c3d20] [c0000000004006dc] ksys_mmap_pgoff+0x23c/0x2d0
[ 2.731408][ T1] [c0000000034c3d90] [c0000000000134f8] sys_mmap+0x48/0x90
[ 2.731539][ T1] [c0000000034c3db0] [c00000000002efc4] system_call_exception+0x184/0x370
[ 2.731639][ T1] [c0000000034c3e10] [c00000000000c53c] system_call_common+0xec/0x250

Introduced by commit

872b9f073f0a ("maple_tree: add a mas_destroy() call to mas_expected_entries() failure path")

At least reverting that commit makes the warning go away. I have done
that for today.

I am wondering if maybe the -unstable parts of the mm tree should be
dropped in the last week before the merge window opens on the
understanding that those changes may be too late for this release?
--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2022-07-26 18:51:02

by Liam R. Howlett

[permalink] [raw]
Subject: Re: linux-next: run time warning after merge of the mm tree

* Stephen Rothwell <[email protected]> [220726 07:23]:
> Hi all,
>
> After merging the mm tree, today's linux-next qemu run (powerpc
> pseries_le_defconfig) produced this warning:
>
> [ 2.579447][ T1] Freeing unused kernel image (initmem) memory: 5120K
> [ 2.597718][ T1] Run /init as init process
> [ 2.725683][ T1] ------------[ cut here ]------------
> [ 2.725993][ T1] WARNING: CPU: 0 PID: 1 at lib/maple_tree.c:1227 mas_alloc_nodes+0x228/0x350
> [ 2.727071][ T1] Modules linked in:
> [ 2.727515][ T1] CPU: 0 PID: 1 Comm: init Not tainted 5.19.0-rc8 #2
> [ 2.727924][ T1] NIP: c0000000007e6d18 LR: c0000000007f5434 CTR: c0000000003bb950
> [ 2.728030][ T1] REGS: c0000000034c3770 TRAP: 0700 Not tainted (5.19.0-rc8)
> [ 2.728190][ T1] MSR: 8000000000029033 <SF,EE,ME,IR,DR,RI,LE> CR: 44428480 XER: 00000000
> [ 2.728584][ T1] CFAR: c0000000007e6b70 IRQMASK: 0
> [ 2.728584][ T1] GPR00: c000000000403ee8 c0000000034c3a10 c00000000279f400 c0000000034c3b28
> [ 2.728584][ T1] GPR04: 0000000000000cc0 0000000000000cc0 0000000000000018 0000000062dfc850
> [ 2.728584][ T1] GPR08: 0000000000000001 0000000000000004 0000000000000000 0000000000008000
> [ 2.728584][ T1] GPR12: 0000000000000000 c000000002970000 0000000000000003 00007ffffc35fb60
> [ 2.728584][ T1] GPR16: 0000000000000002 0000000100000000 00007fffa43c0130 c0000000074d03f0
> [ 2.728584][ T1] GPR20: 0000000000000002 c0000000074d02d0 00007fffa4350000 0000000000000018
> [ 2.728584][ T1] GPR24: 00007fffa434ffff 0000000000000002 00007fffa4330000 c0000000034c3b28
> [ 2.728584][ T1] GPR28: 0000000000000004 c0000000074d0480 0000000000000000 c0000000034c3b28
> [ 2.729676][ T1] NIP [c0000000007e6d18] mas_alloc_nodes+0x228/0x350
> [ 2.729769][ T1] LR [c0000000007f5434] mas_preallocate+0xb4/0x190
> [ 2.730100][ T1] Call Trace:
> [ 2.730277][ T1] [c0000000034c3a10] [c0000000033f01a0] 0xc0000000033f01a0 (unreliable)
> [ 2.730876][ T1] [c0000000034c3a70] [c0000000034c3ab0] 0xc0000000034c3ab0
> [ 2.730990][ T1] [c0000000034c3ab0] [c000000000403ee8] mmap_region+0x2c8/0x880
> [ 2.731102][ T1] [c0000000034c3bf0] [c00000000040494c] do_mmap+0x4ac/0x610
> [ 2.731206][ T1] [c0000000034c3c90] [c0000000003c5bc8] vm_mmap_pgoff+0xc8/0x1c0
> [ 2.731307][ T1] [c0000000034c3d20] [c0000000004006dc] ksys_mmap_pgoff+0x23c/0x2d0
> [ 2.731408][ T1] [c0000000034c3d90] [c0000000000134f8] sys_mmap+0x48/0x90
> [ 2.731539][ T1] [c0000000034c3db0] [c00000000002efc4] system_call_exception+0x184/0x370
> [ 2.731639][ T1] [c0000000034c3e10] [c00000000000c53c] system_call_common+0xec/0x250
>
> Introduced by commit
>
> 872b9f073f0a ("maple_tree: add a mas_destroy() call to mas_expected_entries() failure path")
>
> At least reverting that commit makes the warning go away. I have done
> that for today.
>

Thanks Stephen.

Where does pseries_le_defconfig come from? I have a ppc le config that
I test, but cannot find a defconfig by that name in the git tree. I
found a pseries_defconfig which is BE that I can try to see if I hit
this issue, but it appears you are running BE here?

Thanks,
Liam

2022-07-26 19:11:55

by Andrew Morton

[permalink] [raw]
Subject: Re: linux-next: run time warning after merge of the mm tree

On Tue, 26 Jul 2022 21:23:40 +1000 Stephen Rothwell <[email protected]> wrote:

> I am wondering if maybe the -unstable parts of the mm tree should be
> dropped in the last week before the merge window opens on the
> understanding that those changes may be too late for this release?

Yes, we've been discussing that. I'll temporarily drop mapletree
today, along with some other series which are significantly dependent
upon it.

2022-07-26 21:01:45

by Liam R. Howlett

[permalink] [raw]
Subject: Re: linux-next: run time warning after merge of the mm tree

* Liam R. Howlett <[email protected]> [220726 14:32]:
> * Stephen Rothwell <[email protected]> [220726 07:23]:
> > Hi all,
> >
> > After merging the mm tree, today's linux-next qemu run (powerpc
> > pseries_le_defconfig) produced this warning:
> >
> > [ 2.579447][ T1] Freeing unused kernel image (initmem) memory: 5120K
> > [ 2.597718][ T1] Run /init as init process
> > [ 2.725683][ T1] ------------[ cut here ]------------
> > [ 2.725993][ T1] WARNING: CPU: 0 PID: 1 at lib/maple_tree.c:1227 mas_alloc_nodes+0x228/0x350
> > [ 2.727071][ T1] Modules linked in:
> > [ 2.727515][ T1] CPU: 0 PID: 1 Comm: init Not tainted 5.19.0-rc8 #2
> > [ 2.727924][ T1] NIP: c0000000007e6d18 LR: c0000000007f5434 CTR: c0000000003bb950
> > [ 2.728030][ T1] REGS: c0000000034c3770 TRAP: 0700 Not tainted (5.19.0-rc8)
> > [ 2.728190][ T1] MSR: 8000000000029033 <SF,EE,ME,IR,DR,RI,LE> CR: 44428480 XER: 00000000
> > [ 2.728584][ T1] CFAR: c0000000007e6b70 IRQMASK: 0
> > [ 2.728584][ T1] GPR00: c000000000403ee8 c0000000034c3a10 c00000000279f400 c0000000034c3b28
> > [ 2.728584][ T1] GPR04: 0000000000000cc0 0000000000000cc0 0000000000000018 0000000062dfc850
> > [ 2.728584][ T1] GPR08: 0000000000000001 0000000000000004 0000000000000000 0000000000008000
> > [ 2.728584][ T1] GPR12: 0000000000000000 c000000002970000 0000000000000003 00007ffffc35fb60
> > [ 2.728584][ T1] GPR16: 0000000000000002 0000000100000000 00007fffa43c0130 c0000000074d03f0
> > [ 2.728584][ T1] GPR20: 0000000000000002 c0000000074d02d0 00007fffa4350000 0000000000000018
> > [ 2.728584][ T1] GPR24: 00007fffa434ffff 0000000000000002 00007fffa4330000 c0000000034c3b28
> > [ 2.728584][ T1] GPR28: 0000000000000004 c0000000074d0480 0000000000000000 c0000000034c3b28
> > [ 2.729676][ T1] NIP [c0000000007e6d18] mas_alloc_nodes+0x228/0x350
> > [ 2.729769][ T1] LR [c0000000007f5434] mas_preallocate+0xb4/0x190
> > [ 2.730100][ T1] Call Trace:
> > [ 2.730277][ T1] [c0000000034c3a10] [c0000000033f01a0] 0xc0000000033f01a0 (unreliable)
> > [ 2.730876][ T1] [c0000000034c3a70] [c0000000034c3ab0] 0xc0000000034c3ab0
> > [ 2.730990][ T1] [c0000000034c3ab0] [c000000000403ee8] mmap_region+0x2c8/0x880
> > [ 2.731102][ T1] [c0000000034c3bf0] [c00000000040494c] do_mmap+0x4ac/0x610
> > [ 2.731206][ T1] [c0000000034c3c90] [c0000000003c5bc8] vm_mmap_pgoff+0xc8/0x1c0
> > [ 2.731307][ T1] [c0000000034c3d20] [c0000000004006dc] ksys_mmap_pgoff+0x23c/0x2d0
> > [ 2.731408][ T1] [c0000000034c3d90] [c0000000000134f8] sys_mmap+0x48/0x90
> > [ 2.731539][ T1] [c0000000034c3db0] [c00000000002efc4] system_call_exception+0x184/0x370
> > [ 2.731639][ T1] [c0000000034c3e10] [c00000000000c53c] system_call_common+0xec/0x250
> >
> > Introduced by commit
> >
> > 872b9f073f0a ("maple_tree: add a mas_destroy() call to mas_expected_entries() failure path")
> >
> > At least reverting that commit makes the warning go away. I have done
> > that for today.
> >
>
> Thanks Stephen.
>
> Where does pseries_le_defconfig come from? I have a ppc le config that
> I test, but cannot find a defconfig by that name in the git tree. I
> found a pseries_defconfig which is BE that I can try to see if I hit
> this issue, but it appears you are running BE here?

Andrew,

This is the result of a bad merge. Can you please apply "maple_tree:
Add a mas_destroy() call to mas_expected_entries() failure path" before
"maple_tree: fix mas_expected_entries() off by one"

There is a change in the mas_destroy() which was lost, clearing a flag:
- mas->mas_flags &= ~MA_STATE_BULK;
+ mas->mas_flags &= ~(MA_STATE_BULK|MA_STATE_PREALLOC);


This is probably due to me missing the Fixes line off that patch.

Thanks,
Liam

2022-07-26 22:43:27

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: run time warning after merge of the mm tree

Hi Liam,

On Tue, 26 Jul 2022 18:32:23 +0000 Liam Howlett <[email protected]> wrote:
>
> Where does pseries_le_defconfig come from? I have a ppc le config that
> I test, but cannot find a defconfig by that name in the git tree. I
> found a pseries_defconfig which is BE that I can try to see if I hit
> this issue, but it appears you are running BE here?

If you do "make ARCH=powerpc pseries_le_defconfig", it is constructed
from pseries_defconfig. My build and boot test architecture is ppc64le.

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature