panic: pool_do_get: shmpl free list modified: page 0xfffffd806144e000; item addr 0xfffffd806144ed90; offset 0x40=0x4 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 26873 19252 0 0 0 0 syz-executor *444498 19252 0 0 0x4000000 1K syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830da44d) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff8362e4d0,1,ffff80003c5fc5c8) at pool_do_get+0x5da pool_get(ffffffff8362e4d0,1) at pool_get+0x149 shmget_allocate_segment(ffff80002a4376e8,ffff80003c5fc820,102,ffff80003c5fc770) at shmget_allocate_segment+0x1a7 sys_shmget(ffff80002a4376e8,ffff80003c5fc820,ffff80003c5fc770) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 syscall(ffff80003c5fc820) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c5fc820) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xac9029d5cf0, count: 7 https://www.openbsd.org/ddb.html describes the minimum info required in bug reports. Insufficient info makes it difficult to find and fix bugs. ddb{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic *cpu1: pool_do_get: shmpl free list modified: page 0xfffffd806144e000; item addr 0xfffffd806144ed90; offset 0x40=0x4 ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830da44d) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff8362e4d0,1,ffff80003c5fc5c8) at pool_do_get+0x5da pool_get(ffffffff8362e4d0,1) at pool_get+0x149 shmget_allocate_segment(ffff80002a4376e8,ffff80003c5fc820,102,ffff80003c5fc770) at shmget_allocate_segment+0x1a7 sys_shmget(ffff80002a4376e8,ffff80003c5fc820,ffff80003c5fc770) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 syscall(ffff80003c5fc820) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c5fc820) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xac9029d5cf0, count: -8 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff80003c5fc400 rbx 0xffff800029b5cdc7 rdx 0xffff80000128b9c0 rcx 0xffff80002a4376e8 rax 0xffff800029b5bff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x92f415cca8535af7 r11 0xf1d8b5765ba30af0 r12 0xffff800029b5cbc8 r13 0 r14 0 r15 0x1 rip 0xffffffff8239cdf5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c5fc3f0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor) tid=444498 pid=19252 tcnt=2 stat=onproc flags process=0 proc=4000000 runpri=32, usrpri=86, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a436a40,0xffff80002a437980 process=0xffff80002f15d928 user=0xffff80003c5f7000, vmspace=0xfffffd806bc463b0 estcpu=36, cpticks=2, pctcpu=0.0, user=0, sys=2, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 24767 326025 28175 0 2 0 syz-executor 19252 26873 65822 0 7 0 syz-executor *19252 444498 65822 0 7 0x4000000 syz-executor 57607 442312 88906 0 2 0 syz-executor 1712 280167 86215 0 2 0 syz-executor 1712 248629 86215 0 3 0x4000080 fsleep syz-executor 46167 36065 64691 0 2 0 syz-executor 46167 401403 64691 0 3 0x4000080 fsleep syz-executor 92266 351148 16894 60929 3 0x90 nanoslp syz-executor 92266 179387 16894 60929 3 0x4000090 kqread syz-executor 92266 388711 16894 60929 3 0x4000090 fsleep syz-executor 87948 239058 42904 0 2 0 syz-executor 87948 402273 42904 0 3 0x4000080 kqread syz-executor 87948 166645 42904 0 3 0x4000080 fsleep syz-executor 44316 424141 21346 0 2 0 syz-executor 44316 68489 21346 0 3 0x4000080 fsleep syz-executor 69469 203546 0 0 3 0x14200 bored sosplice 88906 138498 75703 0 3 0x82 nanoslp syz-executor 16894 465283 75703 0 3 0x82 nanoslp syz-executor 21346 34505 75703 0 3 0x82 nanoslp syz-executor 86215 455800 75703 0 3 0x82 nanoslp syz-executor 64691 266299 75703 0 3 0x82 nanoslp syz-executor 65822 359516 75703 0 3 0x82 nanoslp syz-executor 42904 440090 75703 0 3 0x82 nanoslp syz-executor 28175 61555 75703 0 3 0x82 nanoslp syz-executor 75703 241413 67499 0 3 0x82 kqread syz-executor 67499 361921 53694 0 3 0x10008a sigsusp ksh 53694 406983 552 0 3 0x98 kqread sshd-session 552 299348 30538 0 3 0x92 kqread sshd-session 15326 189209 1 0 3 0x100083 ttyin getty 30538 441777 1 0 3 0x88 kqread sshd 55153 495939 24643 74 3 0x1100092 bpf pflogd 24643 203136 1 0 3 0x80 sbwait pflogd 2321 270538 48127 73 3 0x1100090 kqread syslogd 48127 271696 1 0 3 0x100082 sbwait syslogd 18133 61855 1 0 3 0x100080 kqread resolvd 26485 333818 56857 77 3 0x100092 kqread dhcpleased 627 364596 56857 77 3 0x100092 kqread dhcpleased 56857 403320 1 0 3 0x80 kqread dhcpleased 56724 417430 0 0 3 0x14200 bored smr 91288 306212 0 0 2 0x14200 zerothread 2362 212523 0 0 3 0x14200 aiodoned aiodoned 96364 73215 0 0 3 0x14200 syncer update 58339 86147 0 0 3 0x14200 cleaner cleaner 24858 351759 0 0 3 0x14200 reaper reaper 32844 206597 0 0 3 0x14200 pgdaemon pagedaemon 19569 378993 0 0 3 0x14200 bored viomb 31759 282476 0 0 3 0x40014200 acpi0 acpi0 21031 167086 0 0 3 0x40014200 idle1 98098 195289 0 0 3 0x14200 bored softnet3 95312 17785 0 0 3 0x14200 bored softnet2 84515 501470 0 0 3 0x14200 bored softnet1 24778 336480 0 0 3 0x14200 bored softnet0 44000 398232 0 0 3 0x14200 bored systqmp 95448 13933 0 0 3 0x14200 bored systq 66664 64997 0 0 3 0x14200 tmoslp softclockmp 10315 128259 0 0 3 0x40014200 tmoslp softclock 53490 516864 0 0 3 0x40014200 idle0 1 155240 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks CPU 1: exclusive mutex shmpl r = 0 (0xffffffff8362e4e8) #0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5bb sys/kern/subr_witness.c:1155 #1 mtx_enter_try+0x178 #2 mtx_enter+0x60 sys/kern/kern_lock.c:239 #3 pool_get+0x10b sys/kern/subr_pool.c:583 #4 shmget_allocate_segment+0x1a7 #5 sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 #6 syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] #6 syscall+0xb08 sys/arch/amd64/amd64/trap.c:577 #7 Xsyscall+0x128 Process 19252 (syz-executor) thread 0xffff80002a4376e8 (444498) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff836710f8) #0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5bb sys/kern/subr_witness.c:1155 #1 syscall+0xae6 mi_syscall sys/sys/syscall_mi.h:176 [inline] #1 syscall+0xae6 sys/arch/amd64/amd64/trap.c:577 #2 Xsyscall+0x128 exclusive mutex shmpl r = 0 (0xffffffff8362e4e8) #0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5bb sys/kern/subr_witness.c:1155 #1 mtx_enter_try+0x178 #2 mtx_enter+0x60 sys/kern/kern_lock.c:239 #3 pool_get+0x10b sys/kern/subr_pool.c:583 #4 shmget_allocate_segment+0x1a7 #5 sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 #6 syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] #6 syscall+0xb08 sys/arch/amd64/amd64/trap.c:577 #7 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10218 11408K 11413K 166960K 11595 0 pcb 17 13K 14K 166960K 86 0 rtable 213 6K 6K 166960K 379 0 pf 32 17K 18K 166960K 47 0 ifaddr 38 6K 7K 166960K 46 0 ifgroup 51 2K 2K 166960K 57 0 sysctl 1 1K 1K 166960K 1 0 counters 62 36K 36K 166960K 66 0 ioctlops 0 0K 4K 166960K 1494 0 iov 0 0K 16K 166960K 8 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1368 86K 86K 166960K 1550 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 7 0 VM map 2 1K 1K 166960K 2 0 sem 8 1K 1K 166960K 11 0 dirhash 12 2K 2K 166960K 15 0 ACPI 1690 195K 286K 166960K 12468 0 file desc 18 65K 93K 166960K 308 0 proc 77 103K 128K 166960K 561 0 subproc 72 4K 4K 166960K 72 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 2 0K 0K 166960K 27 0 in_multi 87 6K 7K 166960K 103 0 ether_multi 1 0K 0K 166960K 2 0 mrt 0 0K 0K 166960K 2 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 73 334K 334K 166960K 73 0 exec 0 0K 1K 166960K 381 0 fusefs mount 1 32K 32K 166960K 1 0 pfkey data 0 0K 0K 166960K 1 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 235 73K 76K 166960K 4450 0 UVM aobj 5 2K 2K 166960K 6 0 pinsyscall 43 86K 106K 166960K 1394 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 9 0 NDP 11 0K 2K 166960K 29 0 temp 47 6892K 7019K 166960K 7278 0 kqueue 16 24K 24K 166960K 45 0 SYN cache 2 16K 16K 166960K 2 0 ddb{1}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle plcache 128 24 0 0 1 0 1 1 0 8 0 rtpcb 120 41 0 38 1 0 1 1 0 8 0 rtentry 112 117 0 19 4 0 4 4 0 8 0 unpcb 144 261 0 239 6 0 6 6 0 8 5 syncache 336 4 0 4 1 0 1 1 0 8 1 tcpcb 808 55 0 48 2 0 2 2 0 8 1 arp 120 19 0 5 1 0 1 1 0 8 0 inpcb 376 318 0 238 9 0 9 9 0 8 0 nd6 136 25 0 3 1 0 1 1 0 8 0 pkpcb 40 2 0 2 1 0 1 1 0 8 1 kcovpl 48 8 0 0 1 0 1 1 0 8 0 ppxss 1168 1 0 1 1 0 1 1 0 8 1 pffrag 232 2 0 0 1 0 1 1 0 482 0 pffrnode 88 2 0 0 1 0 1 1 0 8 0 pffrent 40 2 0 0 1 0 1 1 0 8 0 pfosfp 40 1428 0 1005 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfstitem 24 28 0 0 1 0 1 1 0 8 0 pfstkey 128 28 0 0 1 0 1 1 0 8 0 pfstate 376 28 0 0 3 0 3 3 0 8 0 pfrule 1344 24 0 18 2 1 1 2 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 455 0 50 29 0 29 29 0 8 1 art_table 32 457 0 50 4 0 4 4 0 8 0 art_node 16 116 0 27 1 0 1 1 0 8 0 sysvmsgpl 40 5 0 4 1 0 1 1 0 8 0 semapl 112 6 0 0 1 0 1 1 0 8 0 shmpl 112 3 0 1 1 0 1 1 0 8 0 pool(0xffffffff8362e4d0:shmpl): page inconsistency: page 0xfffffd806144e000; 32 on list, 2 missing, 35 items per page dirhash 1024 19 0 2 3 0 3 3 0 8 0 dino2pl 256 1908 0 409 95 0 95 95 0 8 0 ffsino 280 1908 0 409 109 0 109 109 0 8 0 nchpl 144 2323 0 635 63 0 63 63 0 8 0 uvmvnodes 80 2111 0 0 44 0 44 44 0 8 0 vnodes 216 2111 0 0 118 0 118 118 0 8 0 namei 1024 7389 0 7389 2 0 2 2 0 8 2 percpumem 16 47 0 2 1 0 1 1 0 8 0 kstatmem 264 26 0 4 2 0 2 2 0 8 0 scxspl 216 7224 0 7224 9 1 8 8 1 8 8 plimitpl 152 52 0 35 1 0 1 1 0 8 0 sigapl 424 609 0 558 7 0 7 7 0 8 1 futexpl 64 2800 0 2795 1 0 1 1 0 8 0 knotepl 120 302 0 0 10 0 10 10 0 8 0 kqueuepl 216 55 0 42 1 0 1 1 0 8 0 pipepl 328 116 0 88 3 0 3 3 0 8 0 fdescpl 504 590 0 558 5 0 5 5 0 8 0 filepl 152 2798 0 2505 14 0 14 14 0 8 1 lockfpl 104 101 0 99 1 0 1 1 0 8 0 lockfspl 48 33 0 31 1 0 1 1 0 8 0 sessionpl 144 23 0 14 1 0 1 1 0 8 0 pgrppl 48 31 0 14 1 0 1 1 0 8 0 ucredpl 104 205 0 191 1 0 1 1 0 8 0 zombiepl 144 558 0 558 1 0 1 1 0 8 1 processpl 1168 609 0 558 5 0 5 5 0 8 1 procpl 648 924 0 865 6 0 6 6 0 8 0 srpgc 96 2 0 2 1 0 1 1 0 8 1 sockpl 688 622 0 517 15 4 11 15 0 8 1 mcl64k 65536 2 0 0 1 0 1 1 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 107 0 0 14 0 14 14 0 8 0 mcl2k 2048 18 0 0 3 0 3 3 0 8 0 mtagpl 96 8 0 0 1 0 1 1 0 8 0 mbufpl 256 187 0 0 12 0 12 12 0 8 0 bufpl 280 2610 0 129 178 0 178 178 0 8 0 anonpl 24 123310 0 119543 50 3 47 47 0 185 16 amapchunkpl 152 13816 0 13274 26 0 26 26 0 158 4 amappl16 200 2575 0 2542 17 6 11 14 0 8 8 amappl15 192 7 0 6 1 0 1 1 0 8 0 amappl14 184 112 0 100 1 0 1 1 0 8 0 amappl13 176 14 0 14 1 1 0 1 0 8 0 amappl12 168 1231 0 1199 3 1 2 2 0 8 0 amappl11 160 54 0 40 1 0 1 1 0 8 0 amappl10 152 8 0 8 1 1 0 1 0 8 0 amappl9 144 246 0 245 1 0 1 1 0 8 0 amappl8 136 25 0 22 1 0 1 1 0 8 0 amappl7 128 106 0 94 1 0 1 1 0 8 0 amappl6 120 180 0 177 1 0 1 1 0 8 0 amappl5 112 128 0 118 1 0 1 1 0 8 0 amappl4 104 317 0 297 1 0 1 1 0 8 0 amappl3 96 2420 0 2300 4 0 4 4 0 8 0 amappl2 88 646 0 583 2 0 2 2 0 8 0 amappl1 80 8433 0 7866 15 1 14 14 0 8 1 amappl 88 4065 0 3886 5 0 5 5 0 92 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma1024 1024 1 0 0 1 0 1 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma128 128 253 0 253 1 1 0 1 0 8 0 dma64 64 6 0 6 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 18 0 17 1 0 1 1 0 8 0 aobjpl 72 5 0 1 1 0 1 1 0 8 0 uaddrrnd 24 590 0 558 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 590 0 558 1 0 1 1 0 8 0 vmmpekpl 168 6624 0 6590 2 0 2 2 0 8 0 vmmpepl 168 43122 0 41208 93 0 93 93 0 357 7 vmsppl 456 589 0 558 5 0 5 5 0 8 1 rwobjpl 64 17282 0 14229 52 1 51 51 0 8 0 pdppl 4096 1187 0 1116 99 26 73 85 0 8 2 pvpl 32 14632 0 0 119 1 118 118 0 265 0 pmappl 248 589 0 558 3 0 3 3 0 8 0 extentpl 40 55 0 38 1 0 1 1 0 8 0 phpool 112 278 0 28 8 0 8 8 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp x86_ipi_db(ffffffff834e3ff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xd9 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 __mp_lock(ffffffff83670ef0) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:113 [inline] __mp_lock(ffffffff83670ef0) at __mp_lock+0x192 sys/kern/kern_lock.c:144 softintr_dispatch(0) at softintr_dispatch+0x5b sys/arch/amd64/amd64/softintr.c:88 Xsoftclock() at Xsoftclock+0x27 end of kernel end trace frame: 0x7e8f69e17360, count: 9 ddb{0}> trace x86_ipi_db(ffffffff834e3ff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xd9 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 __mp_lock(ffffffff83670ef0) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:113 [inline] __mp_lock(ffffffff83670ef0) at __mp_lock+0x192 sys/kern/kern_lock.c:144 softintr_dispatch(0) at softintr_dispatch+0x5b sys/arch/amd64/amd64/softintr.c:88 Xsoftclock() at Xsoftclock+0x27 end of kernel end trace frame: 0x7e8f69e17360, count: -6 ddb{0}> machine ddbcpu 1 Stopped at db_enter+0x25: addq $0x8,%rsp db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830da44d) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff8362e4d0,1,ffff80003c5fc5c8) at pool_do_get+0x5da pool_get(ffffffff8362e4d0,1) at pool_get+0x149 shmget_allocate_segment(ffff80002a4376e8,ffff80003c5fc820,102,ffff80003c5fc770) at shmget_allocate_segment+0x1a7 sys_shmget(ffff80002a4376e8,ffff80003c5fc820,ffff80003c5fc770) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 syscall(ffff80003c5fc820) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c5fc820) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xac9029d5cf0, count: 7 ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830da44d) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff8362e4d0,1,ffff80003c5fc5c8) at pool_do_get+0x5da pool_get(ffffffff8362e4d0,1) at pool_get+0x149 shmget_allocate_segment(ffff80002a4376e8,ffff80003c5fc820,102,ffff80003c5fc770) at shmget_allocate_segment+0x1a7 sys_shmget(ffff80002a4376e8,ffff80003c5fc820,ffff80003c5fc770) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 syscall(ffff80003c5fc820) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c5fc820) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xac9029d5cf0, count: -8