Subject: linux-next: boot failure after merge of the bitmap tree

From: Stephen Rothwell <[email-masked]>
Date: Tue, 29 Aug 2023 15:58:24 +1000

Hi all,

After merging the bitmap tree, today's linux-next boot test (powerpc
pseries_le_defconfig) failed like this:

Running code patching self-tests ...
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at arch/powerpc/sysdev/msi_bitmap.c:260 test_of_node+0x234/0x280
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.5.0-13305-g081ae3a78176 #1
Hardware name: IBM pSeries (emulated by qemu) POWER8 (raw) 0x4d0200 0xf000004 of:SLOF,HEAD pSeries
NIP:  c00000000201d6a4 LR: c00000000201d630 CTR: 0000000000000002
REGS: c00000000478b730 TRAP: 0700   Not tainted  (6.5.0-13305-g081ae3a78176)
MSR:  8000000002029033 <SF,VEC,EE,ME,IR,DR,RI,LE>  CR: 44000448  XER: 20000000
CFAR: c00000000201d674 IRQMASK: 0 
GPR00: c00000000201d630 c00000000478b9d0 c000000001588a00 0000000000000000 
GPR04: c000000004ef6340 ff03f0f1fffeffff ffffffff0f000000 0000feff0f000000 
GPR08: 0000000000000010 0000000000000001 0000000000000000 0000000000000000 
GPR12: 0000000000000008 c000000002b00000 c000000000011188 0000000000000000 
GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 
GPR20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 
GPR24: 0000000000000000 c00000000200343c cccccccccccccccd c000000002090868 
GPR28: 0000000000000000 c0000000020908a8 c00000000478b9f8 c00000000478bb50 
NIP [c00000000201d6a4] test_of_node+0x234/0x280
LR [c00000000201d630] test_of_node+0x1c0/0x280
Call Trace:
[c00000000478b9d0] [c00000000201d630] test_of_node+0x1c0/0x280 (unreliable)
[c00000000478bbb0] [c00000000201d9c4] msi_bitmap_selftest+0x2d4/0x308
[c00000000478bc50] [c000000000010bc0] do_one_initcall+0x80/0x300
[c00000000478bd20] [c000000002004998] kernel_init_freeable+0x30c/0x3b4
[c00000000478bdf0] [c0000000000111b0] kernel_init+0x30/0x1a0
[c00000000478be50] [c00000000000debc] ret_from_kernel_user_thread+0x14/0x1c
--- interrupt: 0 at 0x0
NIP:  0000000000000000 LR: 0000000000000000 CTR: 0000000000000000
REGS: c00000000478be80 TRAP: 0000   Not tainted  (6.5.0-13305-g081ae3a78176)
MSR:  0000000000000000 <>  CR: 00000000  XER: 00000000
CFAR: 0000000000000000 IRQMASK: 0 
GPR00: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 
GPR04: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 
GPR08: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 
GPR12: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 
GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 
GPR20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 
GPR24: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 
GPR28: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 
NIP [0000000000000000] 0x0
LR [0000000000000000] 0x0
--- interrupt: 0
Code: 40820018 7d273011 4102ffdc 4082000c 39200000 48000010 7d2903f4 7d4a5110 7d295378 7d290034 5529d97e 69290001 <0b090000> 38610160 4a0a01dd e8610168 
---[ end trace 0000000000000000 ]---
registered taskstats version 1
	.
	.
	.
printk: console [netcon0] enabled
netconsole: network logging started
BUG: Unable to handle kernel data access at 0xc02a49fa823a5e63
Faulting instruction address: 0xc0000000004ff95c
Oops: Kernel access of bad area, sig: 11 [#1]
LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Tainted: G        W          6.5.0-13305-g081ae3a78176 #1
Hardware name: IBM pSeries (emulated by qemu) POWER8 (raw) 0x4d0200 0xf000004 of:SLOF,HEAD pSeries
NIP:  c0000000004ff95c LR: c0000000004ff9e8 CTR: c0000000002cdc40
REGS: c00000000478b9a0 TRAP: 0380   Tainted: G        W           (6.5.0-13305-g081ae3a78176)
MSR:  8000000002009033 <SF,VEC,EE,ME,IR,DR,RI,LE>  CR: 24008288  XER: 00000000
CFAR: c0000000004ff7c8 IRQMASK: 0 
GPR00: c0000000004ff9e8 c00000000478bc40 c000000001588a00 0000000000000000 
GPR04: 0000000000000cc0 0000000000001be2 0000000000000018 6749a6fe823a5e93 
GPR08: 0000000000001be1 0000000000000010 000000007daa0000 0000000000002000 
GPR12: c0000000002cdc40 c000000002b00000 c000000000011188 0000000000000000 
GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 
GPR20: 0000000000000000 0000000000000000 c0000000041a1290 c0000000002d9080 
GPR24: ffffffffffffffff c0000000029225a0 0000000000000018 0000000000000cc0 
GPR28: c02a49fa823a5e53 0000000000000000 0000000000000cc0 c000000004010400 
NIP [c0000000004ff95c] __kmem_cache_alloc_node+0x2bc/0x440
LR [c0000000004ff9e8] __kmem_cache_alloc_node+0x348/0x440
Call Trace:
[c00000000478bc40] [c0000000004ff9d8] __kmem_cache_alloc_node+0x338/0x440 (unreliable)
[c00000000478bcc0] [c000000000455ce0] kmalloc_trace+0x50/0x150
[c00000000478bd10] [c0000000002d9080] ftrace_free_mem+0x3a0/0x4e0
[c00000000478bdf0] [c0000000000111d0] kernel_init+0x50/0x1a0
[c00000000478be50] [c00000000000debc] ret_from_kernel_user_thread+0x14/0x1c
--- interrupt: 0 at 0x0
NIP:  0000000000000000 LR: 0000000000000000 CTR: 0000000000000000
REGS: c00000000478be80 TRAP: 0000   Tainted: G        W           (6.5.0-13305-g081ae3a78176)
MSR:  0000000000000000 <>  CR: 00000000  XER: 00000000
CFAR: 0000000000000000 IRQMASK: 0 
GPR00: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 
GPR04: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 
GPR08: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 
GPR12: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 
GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 
GPR20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 
GPR24: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 
GPR28: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 
NIP [0000000000000000] 0x0
LR [0000000000000000] 0x0
--- interrupt: 0
Code: 60420000 78a50020 7f83e378 38800000 4bbb9e8d 60000000 4bfffee4 60000000 60420000 813f0028 e8ff00b8 38a80001 <7fdc482a> 7d3c4a14 79260022 552ac03e 
---[ end trace 0000000000000000 ]---
pstore: backend (nvram) writing error (-1)

note: swapper/0[1] exited with irqs disabled
Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

Bisection pointed at commit

  d770ef2c8299 ("bitmap: replace _reg_op(REG_OP_RELEASE) with bitmap_clear()")

I have used the bitmap tree from next-20230828 for today.

-- 
Cheers,
Stephen Rothwell