panic: pool_do_get: shmpl free list modified: page 0xfffffd806c3af000; item addr 0xfffffd806c3af4d0; offset 0x40=0x6863f4b3 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 225223 93557 32767 0x10 0 1 syz-executor *426641 93557 32767 0x10 0x4000000 0K syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff833d910c) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff838ce430,1,ffff80003c425438) at pool_do_get+0x5ea sys/kern/subr_pool.c:-1 pool_get(ffffffff838ce430,1) at pool_get+0x149 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80002a2abc48,ffff80003c425690,113,ffff80003c4255e0) at shmget_allocate_segment+0x1a7 sys/kern/sysv_shm.c:-1 sys_shmget(ffff80002a2abc48,ffff80003c425690,ffff80003c4255e0) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 syscall(ffff80003c425690) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c425690) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:732 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x2a3c23091d0, 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 0xfffffd806c3af000; item addr 0xfffffd806c3af4d0; offset 0x40=0x6863f4b3 ddb{0}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff833d910c) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff838ce430,1,ffff80003c425438) at pool_do_get+0x5ea sys/kern/subr_pool.c:-1 pool_get(ffffffff838ce430,1) at pool_get+0x149 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80002a2abc48,ffff80003c425690,113,ffff80003c4255e0) at shmget_allocate_segment+0x1a7 sys/kern/sysv_shm.c:-1 sys_shmget(ffff80002a2abc48,ffff80003c425690,ffff80003c4255e0) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 syscall(ffff80003c425690) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c425690) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:732 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x2a3c23091d0, count: -8 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80003c425270 rbx 0xffffffff83830dd7 cpu_info_full_primary+0x2dd7 rdx 0 rcx 0xffff80002a2abc48 rax 0xffffffff8382fff0 cpu_info_full_primary+0x1ff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x6aa00a672be87964 r11 0x186a43ba0d310a7b r12 0xffffffff83830bd8 cpu_info_full_primary+0x2bd8 r13 0 r14 0 r15 0x1 rip 0xffffffff81dda885 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c425260 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor) tid=426641 pid=93557 tcnt=4 stat=onproc flags process=10 proc=4000000 runpri=50, usrpri=86, slppri=17, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a2ab9b8,0xffff80003c462a80 process=0xffff80003b010020 user=0xffff80003c420000, vmspace=0xfffffd806bde8b70 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 71604 216426 21493 32767 2 0x10 syz-executor 71604 406977 21493 32767 3 0x4000010 biowait syz-executor 81231 278257 26265 32767 3 0x3010 suspend syz-executor 81231 66629 26265 32767 2 0x4081010 syz-executor 93557 225223 43178 32767 7 0x10 syz-executor *93557 426641 43178 32767 7 0x4000010 syz-executor 93557 75395 43178 32767 2 0x4000010 syz-executor 93557 25110 43178 32767 2 0x4000010 syz-executor 76420 192100 43183 0 2 0 syz-executor 15021 319629 74684 32767 2 0x10 syz-executor 15021 440516 74684 32767 3 0x4000090 fsleep syz-executor 26530 48878 5395 32767 2 0x10 syz-executor 26530 44639 5395 32767 2 0x4000010 syz-executor 43183 62600 73361 0 3 0x82 wait syz-executor 1589 40703 0 0 3 0x14200 bored sosplice 52189 154047 13285 32767 3 0x90 nanoslp syz-executor 74684 308986 61546 32767 3 0x90 nanoslp syz-executor 43178 402617 49919 32767 3 0x90 nanoslp syz-executor 26265 490042 53269 32767 3 0x90 nanoslp syz-executor 5395 338260 86383 32767 3 0x90 nanoslp syz-executor 21493 441237 74695 32767 3 0x90 nanoslp syz-executor 30218 164933 28901 32767 3 0x90 nanoslp syz-executor 13285 256760 73361 0 3 0x82 wait syz-executor 61546 92736 73361 0 3 0x82 wait syz-executor 53269 357218 73361 0 3 0x82 wait syz-executor 74695 507363 73361 0 3 0x82 wait syz-executor 28901 166810 73361 0 3 0x82 wait syz-executor 86383 172334 73361 0 3 0x82 wait syz-executor 49919 359294 73361 0 3 0x82 wait syz-executor 73361 408387 13089 0 3 0x82 kqread syz-executor 13089 488089 8342 0 3 0x10008a sigsusp ksh 8342 388657 20164 0 3 0x98 kqread sshd-session 20164 347046 92246 0 3 0x92 kqread sshd-session 90171 284621 1 0 3 0x100083 ttyin getty 92246 67372 1 0 3 0x88 kqread sshd 37533 501403 25051 73 3 0x1100090 kqread syslogd 25051 136033 1 0 3 0x100082 sbwait syslogd 11760 187893 1 0 3 0x100080 kqread resolvd 79992 77631 56477 77 3 0x100092 kqread dhcpleased 86862 455076 56477 77 3 0x100092 kqread dhcpleased 56477 386625 1 0 3 0x80 kqread dhcpleased 41255 398597 0 0 3 0x14200 bored smr 20658 343232 0 0 2 0x14200 zerothread 30124 77240 0 0 3 0x14200 aiodoned aiodoned 18336 90527 0 0 3 0x14200 syncer update 70152 58908 0 0 3 0x14200 cleaner cleaner 70255 86660 0 0 3 0x14200 reaper reaper 89363 155645 0 0 3 0x14200 pgdaemon pagedaemon 35506 360028 0 0 3 0x14200 bored viomb 59528 477869 0 0 3 0x40014200 acpi0 acpi0 60502 21317 0 0 3 0x40014200 idle1 24046 341183 0 0 3 0x14200 bored softnet3 54634 6852 0 0 3 0x14200 bored softnet2 31031 327397 0 0 3 0x14200 bored softnet1 15044 310264 0 0 3 0x14200 bored softnet0 54261 140316 0 0 3 0x14200 bored systqmp 57917 355242 0 0 3 0x14200 bored systq 61166 94348 0 0 3 0x14200 tmoslp softclockmp 84395 317879 0 0 3 0x40014200 tmoslp softclock 74138 404158 0 0 3 0x40014200 idle0 1 228974 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 (0xffffffff838ce448) #0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5bb sys/kern/subr_witness.c:1160 #1 mtx_enter_try+0x1ad sys/kern/kern_lock.c:311 #2 mtx_enter+0x62 sys/kern/kern_lock.c:261 #3 pool_get+0x10b sys/kern/subr_pool.c:578 #4 shmget_allocate_segment+0x1a7 sys/kern/sysv_shm.c:-1 #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:732 #7 Xsyscall+0x128 Process 71604 (syz-executor) thread 0xffff80002a2ab9b8 (406977) exclusive rrwlock inode r = 0 (0xfffffd806a01c560) #0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5bb sys/kern/subr_witness.c:1160 #1 rw_do_enter_write+0x377 sys/kern/kern_rwlock.c:310 #2 rrw_enter+0xc6 sys/kern/kern_rwlock.c:605 #3 VOP_LOCK+0xa6 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+0x283 sys/ufs/ffs/ffs_alloc.c:393 #7 ufs_makeinode+0xcb sys/ufs/ufs/ufs_vnops.c:1732 #8 ufs_create+0x4e sys/ufs/ufs/ufs_vnops.c:147 #9 VOP_CREATE+0xff sys/kern/vfs_vops.c:103 #10 vn_open+0x491 sys/kern/vfs_vnops.c:116 #11 doopenat+0x32e sys/kern/vfs_syscalls.c:1137 #12 syscall+0xbc6 mi_syscall sys/sys/syscall_mi.h:176 [inline] #12 syscall+0xbc6 sys/arch/amd64/amd64/trap.c:732 #13 Xsyscall+0x128 exclusive rrwlock inode r = 0 (0xfffffd806a01c680) #0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5bb sys/kern/subr_witness.c:1160 #1 rw_do_enter_write+0x377 sys/kern/kern_rwlock.c:310 #2 rrw_enter+0xc6 sys/kern/kern_rwlock.c:605 #3 VOP_LOCK+0xa6 sys/kern/vfs_vops.c:527 #4 vn_lock+0xa4 sys/kern/vfs_vnops.c:570 #5 vfs_lookup+0x109 sys/kern/vfs_lookup.c:418 #6 namei+0x7aa sys/kern/vfs_lookup.c:250 #7 vn_open+0x1f4 sys/kern/vfs_vnops.c:107 #8 doopenat+0x32e sys/kern/vfs_syscalls.c:1137 #9 syscall+0xbc6 mi_syscall sys/sys/syscall_mi.h:176 [inline] #9 syscall+0xbc6 sys/arch/amd64/amd64/trap.c:732 #10 Xsyscall+0x128 Process 93557 (syz-executor) thread 0xffff80002a2abc48 (426641) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff83940238) #0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5bb sys/kern/subr_witness.c:1160 #1 syscall+0xae6 mi_syscall sys/sys/syscall_mi.h:176 [inline] #1 syscall+0xae6 sys/arch/amd64/amd64/trap.c:732 #2 Xsyscall+0x128 exclusive mutex shmpl r = 0 (0xffffffff838ce448) #0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5bb sys/kern/subr_witness.c:1160 #1 mtx_enter_try+0x1ad sys/kern/kern_lock.c:311 #2 mtx_enter+0x62 sys/kern/kern_lock.c:261 #3 pool_get+0x10b sys/kern/subr_pool.c:578 #4 shmget_allocate_segment+0x1a7 sys/kern/sysv_shm.c:-1 #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:732 #7 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10195 10954K 10967K 166960K 11276 0 pcb 17 12K 12K 166960K 17 0 rtable 214 6K 7K 166960K 361 0 pf 29 16K 16K 166960K 31 0 ifaddr 38 6K 7K 166960K 44 0 ifgroup 46 2K 2K 166960K 50 0 sysctl 1 1K 9K 166960K 9 0 counters 66 36K 36K 166960K 68 0 ioctlops 0 0K 2K 166960K 33 0 iov 0 0K 17K 166960K 16 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1334 84K 84K 166960K 1404 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 8 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 23 0 dirhash 12 2K 2K 166960K 15 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 25 93K 129K 166960K 409 0 sigio 0 0K 0K 166960K 40 0 proc 58 79K 127K 166960K 492 0 subproc 72 4K 4K 166960K 108 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 29 0 in_multi 88 6K 7K 166960K 103 0 ether_multi 1 0K 0K 166960K 1 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 115 519K 519K 166960K 115 0 exec 0 0K 1K 166960K 434 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 240 159K 175K 166960K 5207 0 UVM aobj 14 2K 2K 166960K 16 0 pinsyscall 46 92K 112K 166960K 1441 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 24 0 NDP 10 0K 2K 166960K 27 0 temp 74 8695K 8761K 166960K 5851 0 kqueue 13 20K 30K 166960K 79 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 56 0 53 1 0 1 1 0 8 0 rtentry 176 113 0 13 6 0 6 6 0 8 0 unpcb 144 368 0 353 5 0 5 5 0 8 4 syncache 336 6 0 6 1 0 1 1 0 8 1 tcpcb 736 226 0 222 7 0 7 7 0 8 6 arp 128 18 0 2 1 0 1 1 0 8 0 ipq 40 2 0 0 1 0 1 1 0 8 0 ipqe 40 3 0 0 1 0 1 1 0 8 0 inpcb 328 495 0 488 7 0 7 7 0 8 6 ip6q 72 1 0 0 1 0 1 1 0 8 0 ip6af 40 2 0 0 1 0 1 1 0 8 0 nd6 144 26 0 4 1 0 1 1 0 8 0 kcovpl 48 12 0 4 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 465 0 54 30 0 30 30 0 8 2 art_table 32 466 0 54 4 0 4 4 0 8 0 art_node 16 112 0 21 1 0 1 1 0 8 0 sysvmsgpl 40 1 0 1 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(0xffffffff838ce430:shmpl): page inconsistency: page 0xfffffd806c3af000; 23 on list, 11 missing, 35 items per page dirhash 1024 19 0 2 3 0 3 3 0 8 0 dino2pl 256 1900 0 392 95 0 95 95 0 8 0 ffsino 288 1900 0 392 108 0 108 108 0 8 0 nchpl 144 2494 0 813 63 0 63 63 0 8 0 uvmvnodes 80 2017 0 0 42 0 42 42 0 8 0 vnodes 216 2017 0 0 113 0 113 113 0 8 0 namei 1024 8058 0 8057 2 1 1 2 0 8 0 percpumem 16 49 0 1 1 0 1 1 0 8 0 kstatmem 264 24 0 2 2 0 2 2 0 8 0 scxspl 216 7869 0 7868 5 2 3 3 1 8 2 plimitpl 152 146 0 120 2 0 2 2 0 8 0 sigapl 424 683 0 627 8 1 7 8 0 8 0 knotepl 120 513 0 0 16 0 16 16 0 8 0 kqueuepl 224 95 0 86 1 0 1 1 0 8 0 pipepl 336 136 0 109 3 0 3 3 0 8 0 fdescpl 520 664 0 627 4 0 4 4 0 8 0 filepl 160 3525 0 3317 15 0 15 15 0 8 5 lockfpl 104 179 0 177 1 0 1 1 0 8 0 lockfspl 48 27 0 25 1 0 1 1 0 8 0 sessionpl 144 26 0 11 1 0 1 1 0 8 0 pgrppl 48 47 0 24 1 0 1 1 0 8 0 ucredpl 104 447 0 429 1 0 1 1 0 8 0 zombiepl 144 630 0 627 1 0 1 1 0 8 0 processpl 1240 683 0 627 5 0 5 5 0 8 0 procpl 656 1142 0 1079 7 0 7 7 0 8 1 srpgc 96 1 0 1 1 1 0 1 0 8 0 sosppl 168 1 0 1 1 0 1 1 0 8 1 sockpl 728 922 0 897 12 1 11 12 0 8 8 mcl64k 65536 5 0 0 1 0 1 1 0 8 0 mcl16k 16384 3 0 0 1 0 1 1 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 129 0 0 17 0 17 17 0 8 0 mcl2k 2048 20 0 0 3 0 3 3 0 8 0 mtagpl 96 2 0 0 1 0 1 1 0 8 0 mbufpl 256 216 0 0 14 0 14 14 0 8 0 bufpl 280 2819 0 116 194 0 194 194 0 8 0 anonpl 32 14065 0 0 114 0 114 114 0 246 0 amapchunkpl 152 19100 0 18566 35 0 35 35 0 158 10 amappl16 200 3340 0 3317 26 13 13 26 0 8 8 amappl15 192 3 0 3 1 1 0 1 0 8 0 amappl14 184 106 0 96 1 0 1 1 0 8 0 amappl13 176 7 0 7 1 1 0 1 0 8 0 amappl12 168 1281 0 1244 2 0 2 2 0 8 0 amappl11 160 55 0 45 1 0 1 1 0 8 0 amappl10 152 16 0 16 1 1 0 1 0 8 0 amappl9 144 272 0 271 1 0 1 1 0 8 0 amappl8 136 24 0 21 1 0 1 1 0 8 0 amappl7 128 98 0 88 1 0 1 1 0 8 0 amappl6 120 174 0 171 1 0 1 1 0 8 0 amappl5 112 116 0 110 1 0 1 1 0 8 0 amappl4 104 325 0 310 1 0 1 1 0 8 0 amappl3 96 2917 0 2796 4 0 4 4 0 8 0 amappl2 88 623 0 570 2 0 2 2 0 8 0 amappl1 80 9421 0 8834 14 0 14 14 0 8 0 amappl 88 4514 0 4340 6 0 6 6 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 15 0 2 1 0 1 1 0 8 0 uaddrrnd 24 664 0 627 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 664 0 627 1 0 1 1 0 8 0 vmmpekpl 168 7087 0 7047 3 0 3 3 0 8 0 vmmpepl 168 49373 0 47243 117 0 117 117 0 357 20 vmsppl 480 663 0 627 7 1 6 6 0 8 0 rwobjpl 72 18545 0 15677 56 0 56 56 0 8 1 pdppl 4096 1336 0 1254 118 36 82 100 0 8 0 pvpl 32 21806 0 0 177 1 176 176 0 265 0 pmappl 256 663 0 627 4 1 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 412 0 40 11 0 11 11 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(ffffffff833d910c) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff838ce430,1,ffff80003c425438) at pool_do_get+0x5ea sys/kern/subr_pool.c:-1 pool_get(ffffffff838ce430,1) at pool_get+0x149 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80002a2abc48,ffff80003c425690,113,ffff80003c4255e0) at shmget_allocate_segment+0x1a7 sys/kern/sysv_shm.c:-1 sys_shmget(ffff80002a2abc48,ffff80003c425690,ffff80003c4255e0) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 syscall(ffff80003c425690) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c425690) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:732 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x2a3c23091d0, count: -8 ddb{0}> machine ddbcpu 1