panic: pool_do_get: shmpl free list modified: page 0xfffffd806c845000; item addr 0xfffffd806c8458c0; offset 0x40=0x691a7e23 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 362521 20354 32767 0x10 0 0 syz-executor *235989 20354 32767 0x10 0x4000000 1K syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8339b3d1) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839f8798,1,ffff80003c43d728) at pool_do_get+0x5df pool_get(ffffffff839f8798,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003c44fcb0,ffff80003c43d980,84,ffff80003c43d8d0) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003c44fcb0,ffff80003c43d980,ffff80003c43d8d0) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80003c43d980) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c43d980) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:765 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xf365db580c0, 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 0xfffffd806c845000; item addr 0xfffffd806c8458c0; offset 0x40=0x691a7e23 ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8339b3d1) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839f8798,1,ffff80003c43d728) at pool_do_get+0x5df pool_get(ffffffff839f8798,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003c44fcb0,ffff80003c43d980,84,ffff80003c43d8d0) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003c44fcb0,ffff80003c43d980,ffff80003c43d8d0) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80003c43d980) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c43d980) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:765 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xf365db580c0, count: -8 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff80003c43d550 rbx 0xffff8000299eee07 rdx 0xffff800001461600 rcx 0xffff80003c44fcb0 rax 0xffff8000299edff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x2162a864dca50342 r11 0x99f2968c2774c842 r12 0xffff8000299eec08 r13 0 r14 0 r15 0x1 rip 0xffffffff818939a5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c43d540 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor) tid=235989 pid=20354 tcnt=2 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=0xffff80003c44efb8,0xffffffff839f6ef8 process=0xffff80003b421d00 user=0xffff80003c438000, vmspace=0xfffffd800cb559b0 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 20354 362521 99937 32767 7 0x10 syz-executor *20354 235989 99937 32767 7 0x4000010 syz-executor 66554 330705 89472 32767 2 0x10 syz-executor 66554 322686 89472 32767 3 0x4000010 biowait syz-executor 38500 126069 42709 32767 3 0x90 nanoslp syz-executor 38500 69343 42709 32767 3 0x4000090 kqread syz-executor 38500 310498 42709 32767 3 0x4000090 fsleep syz-executor 53632 493467 34055 32767 3 0x90 nanoslp syz-executor 53632 130254 34055 32767 3 0x4000090 fsleep syz-executor 53632 27540 34055 32767 3 0x4000090 piperd syz-executor 90575 414796 44691 32767 3 0x90 nanoslp syz-executor 90575 382278 44691 32767 3 0x4000090 ttyin syz-executor 90575 384467 44691 32767 3 0x4000090 fsleep syz-executor 66070 256000 90514 32767 3 0x90 wait syz-executor 44691 10598 78152 32767 3 0x90 nanoslp syz-executor 44220 3378 51876 32767 3 0x90 wait syz-executor 12422 211119 10907 32767 3 0x90 wait syz-executor 99937 294740 6649 32767 3 0x90 nanoslp syz-executor 89472 330662 60658 32767 3 0x90 nanoslp syz-executor 34055 340680 10065 32767 3 0x90 nanoslp syz-executor 42709 284468 95670 32767 3 0x90 nanoslp syz-executor 6649 8305 12541 0 3 0x82 wait syz-executor 95670 459257 12541 0 3 0x82 wait syz-executor 51876 41545 12541 0 3 0x82 wait syz-executor 78152 213181 12541 0 3 0x82 wait syz-executor 60658 326518 12541 0 3 0x82 wait syz-executor 10065 418947 12541 0 3 0x82 wait syz-executor 90514 329790 12541 0 3 0x82 wait syz-executor 10907 492413 12541 0 3 0x82 wait syz-executor 12541 434023 27035 0 3 0x82 kqread syz-executor 27035 491505 9650 0 3 0x10008a sigsusp ksh 9650 364969 80745 0 3 0x98 kqread sshd-session 80745 162578 57919 0 3 0x92 kqread sshd-session 11530 258116 1 0 3 0x100083 ttyin getty 57919 158181 1 0 3 0x88 kqread sshd 96238 37861 15817 73 3 0x1100090 kqread syslogd 15817 139758 1 0 3 0x100082 sbwait syslogd 12937 204901 1 0 3 0x100080 kqread resolvd 34712 81236 20255 77 3 0x100092 kqread dhcpleased 31785 89984 20255 77 3 0x100092 kqread dhcpleased 20255 370772 1 0 3 0x80 kqread dhcpleased 54629 377642 0 0 3 0x14200 bored smr 97490 258169 0 0 3 0x14200 pgzero zerothread 50884 134268 0 0 3 0x14200 aiodoned aiodoned 23987 308935 0 0 3 0x14200 syncer update 58275 166602 0 0 3 0x14200 cleaner cleaner 390 23565 0 0 3 0x14200 reaper reaper 97826 441709 0 0 3 0x14200 pgdaemon pagedaemon 14971 49038 0 0 3 0x14200 bored viomb 93249 523509 0 0 3 0x40014200 acpi0 acpi0 72387 219183 0 0 3 0x40014200 idle1 50312 381767 0 0 3 0x14200 bored softnet1 32786 92070 0 0 2 0x14200 softnet0 60905 156302 0 0 3 0x14200 bored systqmp 95881 128544 0 0 3 0x14200 bored systq 23312 265343 0 0 3 0x14200 tmoslp softclockmp 61486 114714 0 0 3 0x40014200 tmoslp softclock 7720 353047 0 0 3 0x40014200 idle0 1 244650 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 (0xffffffff839f87b0) #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:581 #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:765 #6 Xsyscall+0x128 Process 20354 (syz-executor) thread 0xffff80003c44fcb0 (235989) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff83948048) #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:765 #2 Xsyscall+0x128 exclusive mutex shmpl r = 0 (0xffffffff839f87b0) #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:581 #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:765 #6 Xsyscall+0x128 Process 66554 (syz-executor) thread 0xffff80003c44f780 (322686) exclusive rrwlock inode r = 0 (0xfffffd806c805a20) #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:570 #5 vn_write+0x18f sys/kern/vfs_vnops.c:405 #6 dofilewritev+0x242 sys/kern/sys_generic.c:380 #7 sys_write+0xa2 sys/kern/sys_generic.c:300 #8 syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] #8 syscall+0xbd4 sys/arch/amd64/amd64/trap.c:765 #9 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10194 10958K 10973K 166960K 11285 0 pcb 17 12K 12K 166960K 17 0 rtable 241 6K 7K 166960K 357 0 pf 31 16K 16K 166960K 31 0 ifaddr 42 7K 7K 166960K 44 0 ifgroup 50 2K 2K 166960K 50 0 sysctl 3 1K 9K 166960K 7 0 counters 68 36K 36K 166960K 68 0 ioctlops 0 0K 2K 166960K 33 0 iov 1 12K 24K 166960K 86 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1335 84K 84K 166960K 1364 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 62 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 26 97K 125K 166960K 336 0 sigio 0 0K 0K 166960K 3 0 proc 61 115K 147K 166960K 504 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 0 0K 0K 166960K 43 0 in_multi 99 7K 7K 166960K 106 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 97 440K 440K 166960K 97 0 exec 0 0K 1K 166960K 377 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 276 168K 181K 166960K 4821 0 UVM aobj 10 3K 4K 166960K 13 0 pinsyscall 47 94K 111K 166960K 1402 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 32 0 NDP 11 0K 2K 166960K 27 0 temp 52 8662K 8726K 166960K 4655 0 kqueue 14 22K 28K 166960K 53 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 26 0 0 1 0 1 1 0 8 0 rtpcb 120 47 0 43 1 0 1 1 0 8 0 rtentry 176 113 0 1 6 0 6 6 0 8 0 unpcb 144 283 0 267 6 0 6 6 0 8 5 syncache 336 8 0 8 1 0 1 1 0 8 1 tcpqe 32 1 0 1 1 0 1 1 0 8 1 tcpcb 736 88 0 83 2 0 2 2 0 8 1 arp 136 18 0 0 1 0 1 1 0 8 0 ipq 40 1 0 0 1 0 1 1 0 8 0 ipqe 40 2 0 0 1 0 1 1 0 8 0 inpcb 328 265 0 257 4 0 4 4 0 8 3 ip6q 72 5 0 3 1 0 1 1 0 8 0 ip6af 40 9 0 7 1 0 1 1 0 8 0 nd6 152 26 0 0 1 0 1 1 0 8 0 kcovpl 48 8 0 0 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 456 0 0 29 0 29 29 0 8 0 art_table 40 457 0 0 5 0 5 5 0 8 0 art_node 32 113 0 11 1 0 1 1 0 8 0 sysvmsgpl 40 43 0 3 1 0 1 1 0 8 0 semupl 112 1 0 1 1 0 1 1 0 8 1 semapl 112 57 0 47 1 0 1 1 0 8 0 shmpl 112 10 0 3 1 0 1 1 0 8 0 pool(0xffffffff839f8798:shmpl): page inconsistency: page 0xfffffd806c845000; 27 on list, 7 missing, 35 items per page dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1816 0 309 95 0 95 95 0 8 0 ffsino 296 1816 0 309 117 0 117 117 0 8 0 nchpl 144 2275 0 588 63 0 63 63 0 8 0 vnodes 216 1897 0 0 106 0 106 106 0 8 0 namei 1024 6824 0 6824 1 0 1 1 0 8 1 percpumem 16 49 0 0 1 0 1 1 0 8 0 kstatmem 264 24 0 0 2 0 2 2 0 8 0 scxspl 216 7578 0 7577 7 1 6 6 1 8 5 plimitpl 152 67 0 39 2 0 2 2 0 8 0 sigapl 424 622 0 568 7 0 7 7 0 8 0 knotepl 120 557 0 0 17 0 17 17 0 8 0 kqueuepl 224 75 0 65 1 0 1 1 0 8 0 pipepl 344 131 0 103 3 0 3 3 0 8 0 fdescpl 528 606 0 568 4 0 4 4 0 8 0 filepl 160 2578 0 2351 15 0 15 15 0 8 5 lockfpl 104 34 0 31 1 0 1 1 0 8 0 lockfspl 48 17 0 14 1 0 1 1 0 8 0 sessionpl 144 26 0 10 1 0 1 1 0 8 0 pgrppl 48 35 0 11 1 0 1 1 0 8 0 ucredpl 104 339 0 320 1 0 1 1 0 8 0 zombiepl 144 571 0 568 1 0 1 1 0 8 0 processpl 1232 622 0 568 5 0 5 5 0 8 0 procpl 664 957 0 895 6 0 6 6 0 8 0 sosppl 176 4 0 4 1 0 1 1 0 8 1 sockpl 752 596 0 568 16 0 16 16 0 8 12 mcl64k 65536 3 0 0 1 0 1 1 0 8 0 mcl8k 8192 2 0 0 1 0 1 1 0 8 0 mcl4k 4096 114 0 0 15 0 15 15 0 8 0 mcl2k 2048 21 0 0 3 0 3 3 0 8 0 mtagpl 96 1 0 0 1 0 1 1 0 8 0 mbufpl 256 1459 0 0 92 0 92 92 0 8 0 bufpl 280 2615 0 120 179 0 179 179 0 8 0 anonpl 32 5376 0 0 44 0 44 44 0 246 0 amapchunkpl 152 14488 0 13879 30 0 30 30 0 158 4 amappl16 200 2230 0 2198 5 3 2 5 0 8 0 amappl15 192 7 0 7 1 1 0 1 0 8 0 amappl14 184 16 0 16 1 1 0 1 0 8 0 amappl13 176 400 0 399 1 0 1 1 0 8 0 amappl12 168 969 0 922 3 0 3 3 0 8 0 amappl11 160 5 0 5 1 1 0 1 0 8 0 amappl10 152 47 0 36 1 0 1 1 0 8 0 amappl9 144 250 0 250 1 1 0 1 0 8 0 amappl8 136 20 0 19 1 0 1 1 0 8 0 amappl7 128 76 0 75 1 0 1 1 0 8 0 amappl6 120 353 0 342 1 0 1 1 0 8 0 amappl5 112 89 0 82 1 0 1 1 0 8 0 amappl4 104 396 0 370 1 0 1 1 0 8 0 amappl3 96 2410 0 2296 4 0 4 4 0 8 1 amappl2 88 746 0 668 2 0 2 2 0 8 0 amappl1 80 10866 0 10295 15 1 14 14 0 8 0 amappl 88 4076 0 3872 5 0 5 5 0 92 0 uvmvnodes 80 103 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 12 0 3 1 0 1 1 0 8 0 uaddrrnd 24 606 0 568 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 606 0 568 1 0 1 1 0 8 0 vmmpekpl 168 6966 0 6933 2 0 2 2 0 8 0 vmmpepl 168 47678 0 45547 99 0 99 99 0 357 1 vmsppl 488 605 0 568 7 1 6 6 0 8 1 rwobjpl 80 16434 0 15454 22 0 22 22 0 8 0 pdppl 4096 1220 0 1136 108 22 86 98 0 8 2 pvpl 32 12776 0 0 104 0 104 104 0 265 0 pmappl 256 605 0 568 4 1 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 359 0 25 10 0 10 10 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp x86_ipi_db(ffffffff837beff0) 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 __mp_lock(ffffffff83947e40) at __mp_lock+0x199 __mp_lock_spin sys/kern/kern_lock.c:142 [inline] __mp_lock(ffffffff83947e40) at __mp_lock+0x199 sys/kern/kern_lock.c:173 intr_handler(ffff80003980c630,ffff80000006b400) at intr_handler+0xe9 sys/arch/amd64/amd64/intr.c:560 Xintr_ioapic_edge23_untramp() at Xintr_ioapic_edge23_untramp+0x18f end of kernel end trace frame: 0x7a1fd1a68f70, count: 9 ddb{0}> trace x86_ipi_db(ffffffff837beff0) 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 __mp_lock(ffffffff83947e40) at __mp_lock+0x199 __mp_lock_spin sys/kern/kern_lock.c:142 [inline] __mp_lock(ffffffff83947e40) at __mp_lock+0x199 sys/kern/kern_lock.c:173 intr_handler(ffff80003980c630,ffff80000006b400) at intr_handler+0xe9 sys/arch/amd64/amd64/intr.c:560 Xintr_ioapic_edge23_untramp() at Xintr_ioapic_edge23_untramp+0x18f end of kernel end trace frame: 0x7a1fd1a68f70, 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:438 panic(ffffffff8339b3d1) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839f8798,1,ffff80003c43d728) at pool_do_get+0x5df pool_get(ffffffff839f8798,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003c44fcb0,ffff80003c43d980,84,ffff80003c43d8d0) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003c44fcb0,ffff80003c43d980,ffff80003c43d8d0) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80003c43d980) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c43d980) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:765 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xf365db580c0, count: 7 ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8339b3d1) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839f8798,1,ffff80003c43d728) at pool_do_get+0x5df pool_get(ffffffff839f8798,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003c44fcb0,ffff80003c43d980,84,ffff80003c43d8d0) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003c44fcb0,ffff80003c43d980,ffff80003c43d8d0) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80003c43d980) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c43d980) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:765 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xf365db580c0, count: -8