panic: pool_do_get: shmpl free list modified: page 0xfffffd806a7e7000; item addr 0xfffffd806a7e7690; offset 0x40=0x69d774dd Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 343001 16756 32767 0x10 0 1 syz-executor *517227 96383 32767 0x10 0x4000000 0K syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8344417b) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839afa30,1,ffff80003c41b738) at pool_do_get+0x5df pool_get(ffffffff839afa30,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003a3d8fb0,ffff80003c41b990,194,ffff80003c41b8e0) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003a3d8fb0,ffff80003c41b990,ffff80003c41b8e0) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80003c41b990) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c41b990) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x4f5d044b4d0, 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 0xfffffd806a7e7000; item addr 0xfffffd806a7e7690; offset 0x40=0x69d774dd ddb{0}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8344417b) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839afa30,1,ffff80003c41b738) at pool_do_get+0x5df pool_get(ffffffff839afa30,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003a3d8fb0,ffff80003c41b990,194,ffff80003c41b8e0) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003a3d8fb0,ffff80003c41b990,ffff80003c41b8e0) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80003c41b990) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c41b990) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x4f5d044b4d0, count: -8 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80003c41b560 rbx 0xffffffff838cbe07 cpu_info_full_primary+0x2e07 rdx 0 rcx 0xffff80003a3d8fb0 rax 0xffffffff838caff0 cpu_info_full_primary+0x1ff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x180956a7793f3771 r11 0x1fdc8dc9fc55f9b9 r12 0xffffffff838cbc08 cpu_info_full_primary+0x2c08 r13 0 r14 0 r15 0x1 rip 0xffffffff82c2dfb5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c41b550 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor) tid=517227 pid=96383 tcnt=4 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=0xffff80003a3d9ca8,0xffff80003a3d9a20 process=0xffff80003b3f44f0 user=0xffff80003c416000, vmspace=0xfffffd807066c9a0 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 16756 343001 98286 32767 7 0x10 syz-executor 16756 472611 98286 32767 3 0x4000090 nanoslp syz-executor 50870 345833 574 32767 2 0x10 syz-executor 39378 396876 78019 32767 2 0x10 syz-executor 39378 141140 78019 32767 2 0x4000010 syz-executor 93907 110555 13249 32767 2 0x10 syz-executor 93907 84799 13249 32767 3 0x4000090 fsleep syz-executor 93907 401006 13249 32767 3 0x4000090 fsleep syz-executor 96383 214093 30975 32767 2 0x10 syz-executor *96383 517227 30975 32767 7 0x4000010 syz-executor 96383 362568 30975 32767 3 0x4000090 fsleep syz-executor 96383 311811 30975 32767 3 0x4000090 fsleep syz-executor 46836 401443 76740 0 2 0x2 syz-executor 39647 348508 1156 0 3 0x100082 sbwait arp 1156 161471 77253 0 3 0x10008a sigsusp sh 574 428841 54707 32767 3 0x90 nanoslp syz-executor 78019 473431 54073 32767 3 0x90 nanoslp syz-executor 98286 73934 88093 32767 3 0x90 nanoslp syz-executor 21229 467184 56784 32767 3 0x10 biowait syz-executor 77253 76420 87122 0 3 0x80 wait syz-executor 30975 306579 33078 32767 3 0x90 nanoslp syz-executor 13249 397776 85575 32767 3 0x90 nanoslp syz-executor 54707 1423 76740 0 3 0x82 wait syz-executor 54073 210432 76740 0 3 0x82 wait syz-executor 88093 480939 76740 0 3 0x82 wait syz-executor 56784 330384 76740 0 3 0x82 wait syz-executor 85575 270939 76740 0 3 0x82 wait syz-executor 87122 456467 76740 0 3 0x82 wait syz-executor 33078 347054 76740 0 3 0x82 wait syz-executor 76740 40839 74950 0 3 0x82 kqread syz-executor 74950 160335 6618 0 3 0x10008a sigsusp ksh 6618 243589 98375 0 3 0x98 kqread sshd-session 98375 378465 29401 0 3 0x92 kqread sshd-session 3452 263150 1 0 3 0x100083 ttyin getty 29401 205439 1 0 3 0x88 kqread sshd 10697 406139 51162 73 3 0x1100090 kqread syslogd 51162 475201 1 0 3 0x100082 sbwait syslogd 51754 436790 1 0 3 0x100080 kqread resolvd 43819 493516 69557 77 3 0x100092 kqread dhcpleased 56468 99988 69557 77 3 0x100092 kqread dhcpleased 69557 194974 1 0 3 0x80 kqread dhcpleased 53316 439790 0 0 3 0x14200 bored smr 40399 213290 0 0 2 0x14200 zerothread 74926 51532 0 0 3 0x14200 aiodoned aiodoned 43145 426723 0 0 3 0x14200 syncer update 20142 346191 0 0 3 0x14200 cleaner cleaner 52208 51278 0 0 3 0x14200 reaper reaper 79296 516374 0 0 3 0x14200 pgdaemon pagedaemon 73983 316713 0 0 3 0x14200 bored viomb 80569 220832 0 0 3 0x40014200 acpi0 acpi0 32430 101003 0 0 3 0x40014200 idle1 95820 269298 0 0 3 0x14200 bored softnet1 26479 70125 0 0 3 0x14200 bored softnet0 78863 174086 0 0 3 0x14200 bored systqmp 27193 229041 0 0 3 0x14200 bored systq 22418 1 0 0 3 0x14200 tmoslp softclockmp 59495 408277 0 0 3 0x40014200 tmoslp softclock 99151 311548 0 0 3 0x40014200 idle0 1 259017 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 (0xffffffff839afa48) #0 witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5f1 sys/kern/subr_witness.c:1160 #1 mtx_enter+0x4b4 sys/kern/kern_lock.c:487 #2 pool_get+0x124 sys/kern/subr_pool.c:585 #3 shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 #4 sys_shmget+0x195 sys/kern/sysv_shm.c:482 #5 syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] #5 syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 #6 Xsyscall+0x128 Process 96383 (syz-executor) thread 0xffff80003a3d8fb0 (517227) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff839f8180) #0 witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5f1 sys/kern/subr_witness.c:1160 #1 syscall+0xaf4 mi_syscall sys/sys/syscall_mi.h:175 [inline] #1 syscall+0xaf4 sys/arch/amd64/amd64/trap.c:783 #2 Xsyscall+0x128 exclusive mutex shmpl r = 0 (0xffffffff839afa48) #0 witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5f1 sys/kern/subr_witness.c:1160 #1 mtx_enter+0x4b4 sys/kern/kern_lock.c:487 #2 pool_get+0x124 sys/kern/subr_pool.c:585 #3 shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 #4 sys_shmget+0x195 sys/kern/sysv_shm.c:482 #5 syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] #5 syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 #6 Xsyscall+0x128 Process 21229 (syz-executor) thread 0xffff8000fffeed10 (467184) exclusive rrwlock inode r = 0 (0xfffffd806bb01688) #0 witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5f1 sys/kern/subr_witness.c:1160 #1 rw_do_enter_write+0x419 sys/kern/kern_rwlock.c:320 #2 rrw_enter+0xc6 sys/kern/kern_rwlock.c:621 #3 VOP_LOCK+0xbd sys/kern/vfs_vops.c:527 #4 ufs_ihashins+0x4f ufs_ihash sys/ufs/ufs/ufs_ihash.c:-1 [inline] #4 ufs_ihashins+0x4f sys/ufs/ufs/ufs_ihash.c:159 #5 ffs_vget+0x187 sys/ufs/ffs/ffs_vfsops.c:1232 #6 ffs_inode_alloc+0x279 sys/ufs/ffs/ffs_alloc.c:393 #7 ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1112 #8 VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 #9 domkdirat+0x179 sys/kern/vfs_syscalls.c:3143 #10 syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] #10 syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 #11 Xsyscall+0x128 exclusive rrwlock inode r = 0 (0xfffffd806d51c1d8) #0 witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5f1 sys/kern/subr_witness.c:1160 #1 rw_do_enter_write+0x419 sys/kern/kern_rwlock.c:320 #2 rrw_enter+0xc6 sys/kern/kern_rwlock.c:621 #3 VOP_LOCK+0xbd sys/kern/vfs_vops.c:527 #4 vn_lock+0xa4 sys/kern/vfs_vnops.c:576 #5 vfs_lookup+0x11c sys/kern/vfs_lookup.c:-1 #6 namei+0x7ca sys/kern/vfs_lookup.c:250 #7 domkdirat+0x8b sys/kern/vfs_syscalls.c:3128 #8 syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] #8 syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 #9 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 11081 12020K 12034K 166960K 12177 0 pcb 17 12K 12K 166960K 17 0 rtable 205 5K 6K 166960K 349 0 pf 29 16K 16K 166960K 31 0 ifaddr 36 6K 7K 166960K 42 0 ifgroup 46 2K 2K 166960K 50 0 sysctl 2 1K 9K 166960K 8 0 counters 68 36K 37K 166960K 70 0 ioctlops 0 0K 2K 166960K 104 0 iov 0 0K 16K 166960K 149 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1287 81K 81K 166960K 1504 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 12 0 VM map 2 1K 1K 166960K 2 0 sem 12 1K 1K 166960K 24 0 dirhash 12 2K 2K 166960K 24 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 24 89K 121K 166960K 464 0 sigio 0 0K 0K 166960K 3 0 proc 58 99K 180K 166960K 519 0 subproc 72 4K 4K 166960K 144 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 114 0 in_multi 78 5K 6K 166960K 109 0 ether_multi 1 0K 0K 166960K 5 0 mrt 1 0K 0K 166960K 16 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 247 1102K 1102K 166960K 247 0 exec 0 0K 1K 166960K 452 0 fusefs mount 1 32K 32K 166960K 1 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 235 162K 184K 166960K 5706 0 UVM aobj 14 2K 3K 166960K 16 0 pinsyscall 46 92K 116K 166960K 1526 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 16 0 NDP 10 0K 1K 166960K 25 0 temp 75 9088K 9152K 166960K 5362 0 kqueue 14 22K 29K 166960K 77 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 26 0 0 1 0 1 1 0 8 0 rtpcb 120 61 0 54 1 0 1 1 0 8 0 rtentry 176 109 0 15 5 0 5 5 0 8 0 unpcb 144 416 0 401 3 0 3 3 0 8 2 syncache 336 5 0 5 1 1 0 1 0 8 0 tcpcb 736 120 0 115 1 0 1 1 0 8 0 arp 136 18 0 2 1 0 1 1 0 8 0 ipq 40 3 0 0 1 0 1 1 0 8 0 ipqe 40 9 0 3 1 0 1 1 0 8 0 inpcb 328 320 0 310 4 2 2 4 0 8 1 ip6q 72 3 0 1 1 0 1 1 0 8 0 ip6af 40 4 0 2 1 0 1 1 0 8 0 nd6 152 26 0 6 1 0 1 1 0 8 0 kcovpl 48 16 0 8 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 423 0 50 27 0 27 27 0 8 3 art_table 40 424 0 50 5 0 5 5 0 8 0 art_node 32 109 0 23 1 0 1 1 0 8 0 sysvmsgpl 40 31 0 31 1 0 1 1 0 8 1 semapl 112 21 0 11 1 0 1 1 0 8 0 shmpl 112 13 0 2 1 0 1 1 0 8 0 pool(0xffffffff839afa30:shmpl): page inconsistency: page 0xfffffd806a7e7000; 23 on list, 11 missing, 35 items per page dirhash 1024 25 0 8 3 0 3 3 0 8 0 dino2pl 256 2092 0 617 93 0 93 93 0 8 0 ffsino 296 2092 0 617 114 0 114 114 0 8 0 nchpl 144 2694 0 999 63 0 63 63 0 8 0 vnodes 216 2245 0 0 125 0 125 125 0 8 0 namei 1024 9118 0 9117 1 0 1 1 0 8 0 percpumem 16 50 0 1 1 0 1 1 0 8 0 kstatmem 264 24 0 2 2 0 2 2 0 8 0 scxspl 216 8984 0 8983 4 3 1 3 1 8 0 plimitpl 152 234 0 211 2 0 2 2 0 8 1 sigapl 424 736 0 684 7 0 7 7 0 8 0 knotepl 120 296 0 0 9 0 9 9 0 8 0 kqueuepl 224 139 0 129 3 0 3 3 0 8 2 pipepl 344 164 0 137 3 0 3 3 0 8 0 fdescpl 528 720 0 684 4 0 4 4 0 8 1 filepl 160 4061 0 3847 13 0 13 13 0 8 4 lockfpl 104 100 0 98 1 0 1 1 0 8 0 lockfspl 48 43 0 41 1 0 1 1 0 8 0 sessionpl 144 45 0 30 1 0 1 1 0 8 0 pgrppl 48 64 0 41 1 0 1 1 0 8 0 ucredpl 104 945 0 928 1 0 1 1 0 8 0 zombiepl 144 684 0 684 1 0 1 1 0 8 1 processpl 1232 736 0 684 5 0 5 5 0 8 0 procpl 664 1258 0 1199 6 0 6 6 0 8 0 sosppl 176 4 0 4 1 0 1 1 0 8 1 sockpl 752 800 0 768 10 0 10 10 0 8 6 mcl64k 65536 4 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 30 0 0 4 0 4 4 0 8 0 mtagpl 96 2 0 0 1 0 1 1 0 8 0 mbufpl 256 227 0 0 14 0 14 14 0 8 0 bufpl 280 2935 0 102 203 0 203 203 0 8 0 anonpl 32 7783 0 0 63 0 63 63 0 246 0 amapchunkpl 152 17922 0 17433 29 1 28 29 0 158 8 amappl16 200 3470 0 3450 18 5 13 15 0 8 8 amappl15 192 4 0 4 1 1 0 1 0 8 0 amappl14 184 402 0 400 1 0 1 1 0 8 0 amappl13 176 141 0 130 1 0 1 1 0 8 0 amappl12 168 951 0 917 2 0 2 2 0 8 0 amappl11 160 6 0 6 2 2 0 1 0 8 0 amappl10 152 58 0 48 1 0 1 1 0 8 0 amappl9 144 277 0 277 2 1 1 1 0 8 1 amappl8 136 123 0 121 1 0 1 1 0 8 0 amappl7 128 139 0 127 1 0 1 1 0 8 0 amappl6 120 154 0 152 1 0 1 1 0 8 0 amappl5 112 117 0 109 1 0 1 1 0 8 0 amappl4 104 264 0 246 1 0 1 1 0 8 0 amappl3 96 3417 0 3299 5 1 4 4 0 8 0 amappl2 88 511 0 455 2 0 2 2 0 8 0 amappl1 80 11120 0 10523 17 1 16 17 0 8 0 amappl 88 4975 0 4809 5 0 5 5 0 92 1 uvmvnodes 80 109 0 0 3 0 3 3 0 8 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 15 0 2 1 0 1 1 0 8 0 uaddrrnd 24 720 0 684 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 720 0 684 1 0 1 1 0 8 0 vmmpekpl 168 7750 0 7708 3 0 3 3 0 8 0 vmmpepl 168 55168 0 53177 107 2 105 107 0 357 14 vmsppl 488 719 0 684 7 1 6 6 0 8 0 rwobjpl 80 18821 0 17821 27 0 27 27 0 8 1 pdppl 4096 1447 0 1368 111 28 83 97 0 8 4 pvpl 32 15329 0 0 124 0 124 124 0 265 0 pmappl 256 719 0 684 4 1 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 279 0 32 8 0 8 8 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:438 panic(ffffffff8344417b) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839afa30,1,ffff80003c41b738) at pool_do_get+0x5df pool_get(ffffffff839afa30,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003a3d8fb0,ffff80003c41b990,194,ffff80003c41b8e0) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003a3d8fb0,ffff80003c41b990,ffff80003c41b8e0) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80003c41b990) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c41b990) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x4f5d044b4d0, count: -8 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp x86_ipi_db(ffff8000299bdff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:394 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: 0x756c5f0c3520, count: 12 ddb{1}> trace x86_ipi_db(ffff8000299bdff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:394 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: 0x756c5f0c3520, count: -3