panic: pool_do_get: shmpl free list modified: page 0xfffffd8067d77000; item addr 0xfffffd8067d777e0; offset 0x2c=0xdeaf4151 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 392260 20610 32767 0x10 0 1 syz-executor *159154 20610 32767 0x10 0x4000000 0K syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff83062f39) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83567e08,2,ffff80002a160438) at pool_do_get+0x5e6 pool_get(ffffffff83567e08,2) at pool_get+0x141 shmget_allocate_segment(ffff80003724ece0,ffff80002a160690,4,ffff80002a1605e0) at shmget_allocate_segment+0x1a7 sys_shmget(ffff80003724ece0,ffff80002a160690,ffff80002a1605e0) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:480 syscall(ffff80002a160690) at syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:179 [inline] syscall(ffff80002a160690) at syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x3414faa8530, 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{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic *cpu0: pool_do_get: shmpl free list modified: page 0xfffffd8067d77000; item addr 0xfffffd8067d777e0; offset 0x2c=0xdeaf4151 ddb{0}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff83062f39) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83567e08,2,ffff80002a160438) at pool_do_get+0x5e6 pool_get(ffffffff83567e08,2) at pool_get+0x141 shmget_allocate_segment(ffff80003724ece0,ffff80002a160690,4,ffff80002a1605e0) at shmget_allocate_segment+0x1a7 sys_shmget(ffff80003724ece0,ffff80002a160690,ffff80002a1605e0) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:480 syscall(ffff80002a160690) at syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:179 [inline] syscall(ffff80002a160690) at syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x3414faa8530, count: -8 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80002a160280 rbx 0xffffffff83486dbf cpu_info_full_primary+0x2dbf rdx 0 rcx 0xffff80003724ece0 rax 0xffffffff83485ff0 cpu_info_full_primary+0x1ff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0xe1e95e22a8810d3e r11 0x5886d40d3fdeb32 r12 0xffffffff83486bc0 cpu_info_full_primary+0x2bc0 r13 0 r14 0 r15 0x1 rip 0xffffffff829fa335 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002a160270 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor) tid=159154 pid=20610 tcnt=3 stat=onproc flags process=10 proc=4000000 runpri=32, usrpri=50, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80003724e038,0xffff80003724ea68 process=0xffff8000339a44a8 user=0xffff80002a15b000, vmspace=0xfffffd806c89edd0 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 48447 133500 19780 32767 2 0x10 syz-executor 48447 262047 19780 32767 3 0x4000090 fsleep syz-executor 20610 392260 66428 32767 7 0x10 syz-executor *20610 159154 66428 32767 7 0x4000010 syz-executor 20610 269337 66428 32767 3 0x4000090 fsleep syz-executor 68973 280635 94419 32767 3 0x90 nanoslp syz-executor 68973 295664 94419 32767 3 0x4000090 kqsel syz-executor 68973 222233 94419 32767 3 0x4000090 fsleep syz-executor 7287 392179 54685 32767 3 0x90 nanoslp syz-executor 7287 402327 54685 32767 3 0x4000090 ttyout syz-executor 7287 386250 54685 32767 3 0x4000090 fsleep syz-executor 47795 505614 52426 32767 3 0x90 nanoslp syz-executor 47795 132756 52426 32767 3 0x4000090 msgwait syz-executor 47795 210976 52426 32767 3 0x4000090 fsleep syz-executor 22416 207512 87335 32767 3 0x90 nanoslp syz-executor 22416 194512 87335 32767 3 0x4000090 lockf syz-executor 22416 94124 87335 32767 3 0x4000090 lockf syz-executor 22416 260535 87335 32767 3 0x4000090 fsleep syz-executor 66428 21458 82022 32767 3 0x90 nanoslp syz-executor 82022 73679 13257 0 3 0x82 wait syz-executor 87335 208312 83875 32767 3 0x90 nanoslp syz-executor 54685 428849 32101 32767 3 0x90 nanoslp syz-executor 32101 199098 13257 0 3 0x82 wait syz-executor 83875 162156 13257 0 3 0x82 wait syz-executor 94419 187060 84149 32767 3 0x90 nanoslp syz-executor 19780 177285 3386 32767 3 0x90 nanoslp syz-executor 3386 154606 13257 0 3 0x82 wait syz-executor 84149 96582 13257 0 3 0x82 wait syz-executor 18811 296340 76585 32767 3 0x90 nanoslp syz-executor 52426 120084 96748 32767 3 0x90 nanoslp syz-executor 76585 199117 13257 0 3 0x82 wait syz-executor 96748 208751 13257 0 3 0x82 wait syz-executor 9966 302035 44166 32767 3 0x90 nanoslp syz-executor 44166 436187 13257 0 3 0x82 wait syz-executor 20837 439923 15540 0 3 0x82 netio sshd-session 51584 334668 0 0 3 0x14200 bored sosplice 13257 473523 29706 0 3 0x82 kqread syz-executor 29706 17222 59041 0 3 0x10008a sigsusp ksh 59041 44382 57688 0 3 0x98 kqread sshd-session 57688 154346 15540 0 3 0x92 kqread sshd-session 78456 462192 1 0 3 0x100083 ttyin getty 15540 28197 1 0 3 0x88 kqread sshd 82483 12144 60603 73 3 0x1100010 ffs_fsync syslogd 60603 31047 1 0 3 0x100082 sbwait syslogd 1399 369207 1 0 3 0x100080 kqread resolvd 54737 182391 88428 77 3 0x100092 kqread dhcpleased 83136 355713 88428 77 3 0x100092 kqread dhcpleased 88428 486146 1 0 3 0x80 kqread dhcpleased 27777 178681 0 0 3 0x14200 bored smr 304 481097 0 0 3 0x14200 pgzero zerothread 99088 431805 0 0 3 0x14200 aiodoned aiodoned 53960 280892 0 0 3 0x14200 syncer update 25092 61318 0 0 3 0x14200 cleaner cleaner 32515 150572 0 0 3 0x14200 reaper reaper 51997 490124 0 0 3 0x14200 pgdaemon pagedaemon 2342 473695 0 0 3 0x14200 bored viomb 85023 216433 0 0 3 0x40014200 acpi0 acpi0 92762 123393 0 0 3 0x40014200 idle1 93742 200632 0 0 3 0x14200 bored softnet3 18860 254595 0 0 3 0x14200 bored softnet2 19737 17377 0 0 3 0x14200 bored softnet1 11290 506443 0 0 3 0x14200 bored softnet0 11062 235735 0 0 3 0x14200 bored systqmp 12710 93451 0 0 3 0x14200 bored systq 50430 309384 0 0 3 0x14200 tmoslp softclockmp 70562 198604 0 0 3 0x40014200 tmoslp softclock 27225 142783 0 0 3 0x40014200 idle0 1 403556 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks CPU 0: exclusive mutex shmpl r = 0 (0xffffffff83567e18) #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+0x103 sys/kern/subr_pool.c:579 #4 shmget_allocate_segment+0x1a7 #5 sys_shmget+0x1b2 sys/kern/sysv_shm.c:480 #6 syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:179 [inline] #6 syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 #7 Xsyscall+0x128 Process 20610 (syz-executor) thread 0xffff80003724ece0 (159154) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff83566700) #0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5bb sys/kern/subr_witness.c:1155 #1 syscall+0xad6 mi_syscall sys/sys/syscall_mi.h:179 [inline] #1 syscall+0xad6 sys/arch/amd64/amd64/trap.c:577 #2 Xsyscall+0x128 exclusive mutex shmpl r = 0 (0xffffffff83567e18) #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+0x103 sys/kern/subr_pool.c:579 #4 shmget_allocate_segment+0x1a7 #5 sys_shmget+0x1b2 sys/kern/sysv_shm.c:480 #6 syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:179 [inline] #6 syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 #7 Xsyscall+0x128 Process 82483 (syslogd) thread 0xffff8000ffffdbe8 (12144) exclusive rrwlock inode r = 0 (0xfffffd806e2cab40) #0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5bb sys/kern/subr_witness.c:1155 #1 rw_enter+0x41b sys/kern/kern_rwlock.c:309 #2 rrw_enter+0xbe sys/kern/kern_rwlock.c:464 #3 VOP_LOCK+0xa6 sys/kern/vfs_vops.c:524 #4 vn_lock+0xa4 sys/kern/vfs_vnops.c:564 #5 sys_fsync+0x152 sys/kern/vfs_syscalls.c:2926 #6 syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:179 [inline] #6 syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 #7 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10190 11048K 11059K 166960K 11418 0 pcb 17 12K 12K 166960K 17 0 rtable 240 6K 7K 166960K 1963 0 pf 31 16K 16K 166960K 133 0 ifaddr 42 7K 7K 166960K 245 0 ifgroup 50 2K 2K 166960K 252 0 sysctl 3 0K 1K 166960K 5 0 counters 64 36K 36K 166960K 164 0 ioctlops 0 0K 2K 166960K 94 0 iov 0 0K 16K 166960K 57 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1468 92K 92K 166960K 2291 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 17 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 30 0 dirhash 15 2K 2K 166960K 33 0 ACPI 1690 195K 286K 166960K 12468 0 file desc 26 97K 157K 166960K 1811 0 sigio 0 0K 0K 166960K 13 0 proc 58 79K 176K 166960K 1940 0 subproc 104 6K 12K 166960K 936 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 358 0 in_multi 99 7K 7K 166960K 663 0 ether_multi 1 0K 0K 166960K 3 0 mrt 1 0K 0K 166960K 1 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 109 493K 493K 166960K 109 0 exec 0 0K 1K 166960K 1386 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 277 75K 131K 166960K 15137 0 UVM aobj 30 2K 4K 166960K 35 0 pinsyscall 49 98K 130K 166960K 4233 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 58 0 NDP 11 0K 2K 166960K 174 0 temp 59 6820K 6886K 166960K 14737 0 kqueue 14 22K 31K 166960K 184 0 SYN cache 2 16K 16K 166960K 2 0 ddb{0}> 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 239 0 234 1 0 1 1 0 8 0 rtentry 112 662 0 549 7 3 4 4 0 8 0 unpcb 144 1308 0 1292 14 10 4 6 0 8 3 syncache 336 29 0 29 7 6 1 1 0 8 1 tcpqe 32 7 0 7 3 3 0 1 0 8 0 tcpcb 808 674 0 665 11 9 2 8 0 8 0 arp 120 117 0 98 1 0 1 1 0 8 0 ipq 40 7 0 4 1 0 1 1 0 8 0 ipqe 40 9 0 6 1 0 1 1 0 8 0 inpcb 336 1498 0 1482 12 10 2 8 0 8 0 nd6 136 182 0 156 1 0 1 1 0 8 0 kcovpl 48 72 0 64 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 2694 0 2225 53 23 30 30 0 8 0 art_table 32 2695 0 2225 4 0 4 4 0 8 0 art_node 16 661 0 558 1 0 1 1 0 8 0 sysvmsgpl 40 19 0 12 1 0 1 1 0 8 0 semapl 112 28 0 18 1 0 1 1 0 8 0 shmpl 112 32 0 5 1 0 1 1 0 8 0 pool(0xffffffff83567e08:shmpl): page inconsistency: page 0xfffffd8067d77000; 7 on list, 27 missing, 35 items per page dirhash 1024 31 0 12 3 0 3 3 0 8 0 dino2pl 256 2881 0 1247 104 1 103 103 0 8 0 ffsino 272 2881 0 1247 110 0 110 110 0 8 0 nchpl 144 4273 0 2508 66 0 66 66 0 8 0 uvmvnodes 80 3826 0 0 79 0 79 79 0 8 0 vnodes 216 3826 0 0 213 0 213 213 0 8 0 namei 1024 19009 0 19009 7 6 1 2 0 8 1 percpumem 16 96 0 50 1 0 1 1 0 8 0 kstatmem 264 122 0 100 2 0 2 2 0 8 0 scxspl 216 32147 0 32146 15 14 1 8 1 8 0 plimitpl 152 477 0 451 2 0 2 2 0 8 0 sigapl 424 1991 0 1933 10 1 9 9 0 8 1 futexpl 64 12363 0 12357 8 7 1 1 0 8 0 knotepl 120 383 0 0 10 0 10 10 0 8 0 kqueuepl 216 405 0 393 5 3 2 3 0 8 1 pipepl 320 393 0 365 5 1 4 5 0 8 0 fdescpl 496 1972 0 1933 10 3 7 7 0 8 0 filepl 152 9749 0 9486 18 4 14 16 0 8 0 lockfpl 104 314 0 309 1 0 1 1 0 8 0 lockfspl 48 82 0 79 1 0 1 1 0 8 0 sessionpl 144 95 0 78 1 0 1 1 0 8 0 pgrppl 48 181 0 156 1 0 1 1 0 8 0 ucredpl 104 1440 0 1421 1 0 1 1 0 8 0 zombiepl 144 1935 0 1933 1 0 1 1 0 8 0 processpl 1160 1991 0 1933 7 1 6 6 0 8 0 procpl 648 3439 0 3369 8 1 7 7 0 8 0 sosppl 168 14 0 14 3 2 1 1 0 8 1 sockpl 664 3059 0 3023 29 20 9 15 0 8 4 mcl64k 65536 5 0 0 1 0 1 1 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 2 0 0 1 0 1 1 0 8 0 mcl9k 9216 2 0 0 1 0 1 1 0 8 0 mcl8k 8192 4 0 0 1 0 1 1 0 8 0 mcl4k 4096 144 0 0 17 0 17 17 0 8 1 mcl2k2 2112 1 0 0 1 0 1 1 0 8 0 mcl2k 2048 49 0 0 4 0 4 4 0 8 0 mtagpl 96 4 0 0 1 0 1 1 0 8 0 mbufpl 256 1198 0 0 74 0 74 74 0 8 0 bufpl 280 8224 0 1676 468 0 468 468 0 8 0 anonpl 24 317411 0 313465 60 8 52 55 0 185 14 amapchunkpl 152 47611 0 46985 49 20 29 42 0 158 3 amappl16 200 5932 0 5915 58 49 9 14 0 8 7 amappl15 192 10 0 10 1 1 0 1 0 8 0 amappl14 184 255 0 244 1 0 1 1 0 8 0 amappl13 176 32 0 32 1 1 0 1 0 8 0 amappl12 168 3402 0 3363 3 0 3 3 0 8 0 amappl11 160 47 0 36 1 0 1 1 0 8 0 amappl10 152 12 0 12 1 1 0 1 0 8 0 amappl9 144 134 0 134 1 1 0 1 0 8 0 amappl8 136 19 0 17 1 0 1 1 0 8 0 amappl7 128 220 0 208 1 0 1 1 0 8 0 amappl6 120 657 0 654 1 0 1 1 0 8 0 amappl5 112 358 0 349 1 0 1 1 0 8 0 amappl4 104 529 0 512 1 0 1 1 0 8 0 amappl3 96 9301 0 9162 5 1 4 4 0 8 0 amappl2 88 1636 0 1566 2 0 2 2 0 8 0 amappl1 80 21506 0 20875 18 2 16 17 0 8 0 amappl 88 14229 0 14012 7 1 6 6 0 92 1 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 34 0 5 1 0 1 1 0 8 0 uaddrrnd 24 1972 0 1933 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1972 0 1933 1 0 1 1 0 8 0 vmmpekpl 168 19731 0 19680 5 0 5 5 0 8 0 vmmpepl 168 133769 0 131581 131 28 103 109 0 357 3 vmsppl 440 1971 0 1933 6 0 6 6 0 8 0 rwobjpl 56 45241 0 40423 75 5 70 70 0 8 0 pdppl 4096 3951 0 3866 239 152 87 115 0 8 2 pvpl 32 29515 0 0 238 0 238 238 0 265 0 pmappl 248 1971 0 1933 5 1 4 4 0 8 0 extentpl 40 55 0 38 1 0 1 1 0 8 0 phpool 112 648 0 209 14 0 14 14 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff83062f39) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83567e08,2,ffff80002a160438) at pool_do_get+0x5e6 pool_get(ffffffff83567e08,2) at pool_get+0x141 shmget_allocate_segment(ffff80003724ece0,ffff80002a160690,4,ffff80002a1605e0) at shmget_allocate_segment+0x1a7 sys_shmget(ffff80003724ece0,ffff80002a160690,ffff80002a1605e0) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:480 syscall(ffff80002a160690) at syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:179 [inline] syscall(ffff80002a160690) at syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x3414faa8530, count: -8 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp x86_ipi_db(ffff800029b7bff0) 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 end of kernel end trace frame: 0x742c5b945e40, count: 12 ddb{1}> trace x86_ipi_db(ffff800029b7bff0) 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 end of kernel end trace frame: 0x742c5b945e40, count: -3