panic: pool_do_get: shmpl free list modified: page 0xfffffd8068333000; item addr 0xfffffd8068333690; offset 0x40=0x68363f7a Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 404502 65015 32767 0x10 0 1 syz-executor *317826 15726 32767 0x10 0x4000000 0K syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff833cdb7b) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83a00c20,1,ffff80003c41f838) at pool_do_get+0x5ea sys/kern/subr_pool.c:-1 pool_get(ffffffff83a00c20,1) at pool_get+0x149 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff8000fffe94a0,ffff80003c41fa90,1d0,ffff80003c41f9e0) at shmget_allocate_segment+0x1a7 sys/kern/sysv_shm.c:-1 sys_shmget(ffff8000fffe94a0,ffff80003c41fa90,ffff80003c41f9e0) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 syscall(ffff80003c41fa90) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c41fa90) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:579 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7cd98c73900, 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 0xfffffd8068333000; item addr 0xfffffd8068333690; offset 0x40=0x68363f7a ddb{0}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff833cdb7b) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83a00c20,1,ffff80003c41f838) at pool_do_get+0x5ea sys/kern/subr_pool.c:-1 pool_get(ffffffff83a00c20,1) at pool_get+0x149 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff8000fffe94a0,ffff80003c41fa90,1d0,ffff80003c41f9e0) at shmget_allocate_segment+0x1a7 sys/kern/sysv_shm.c:-1 sys_shmget(ffff8000fffe94a0,ffff80003c41fa90,ffff80003c41f9e0) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 syscall(ffff80003c41fa90) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c41fa90) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:579 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7cd98c73900, count: -8 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80003c41f670 rbx 0xffffffff838a5dd7 cpu_info_full_primary+0x2dd7 rdx 0xffff800001436e80 rcx 0xffff8000fffe94a0 rax 0xffffffff838a4ff0 cpu_info_full_primary+0x1ff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x32aaadc18f075320 r11 0xbce53c0c8cb4d1e1 r12 0xffffffff838a5bd8 cpu_info_full_primary+0x2bd8 r13 0 r14 0 r15 0x1 rip 0xffffffff814541f5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c41f660 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor) tid=317826 pid=15726 tcnt=2 stat=onproc flags process=10 proc=4000000 runpri=74, usrpri=75, slppri=16, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff8000fffe9c50,0xffffffff8395dd58 process=0xffff80003bc066e0 user=0xffff80003c41a000, vmspace=0xfffffd806c441b68 estcpu=25, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 65015 404502 53044 32767 7 0x10 syz-executor 49000 407642 69923 32767 2 0x10 syz-executor 46838 142148 3704 32767 2 0x10 syz-executor 15726 220914 33400 32767 2 0x10 syz-executor *15726 317826 33400 32767 7 0x4000010 syz-executor 94541 51113 22851 32767 2 0x10 syz-executor 94541 472028 22851 32767 2 0x4000010 syz-executor 37272 144300 51778 32767 2 0x10 syz-executor 37272 113800 51778 32767 2 0x4000010 syz-executor 45736 297493 63229 0 2 0x2 syz-executor 82947 95173 22420 0 3 0x82 sbwait sshd-session 80281 425320 0 0 3 0x14200 bored sosplice 3704 58586 5064 32767 3 0x90 nanoslp syz-executor 19303 364610 50040 32767 3 0x10 biowait syz-executor 69923 397067 63949 32767 3 0x90 nanoslp syz-executor 22851 28116 8622 32767 2 0x10 syz-executor 33400 132713 55667 32767 3 0x90 nanoslp syz-executor 53044 168972 10465 32767 3 0x90 nanoslp syz-executor 51778 472071 90676 32767 3 0x90 nanoslp syz-executor 63949 108729 63229 0 3 0x82 wait syz-executor 5064 302179 63229 0 3 0x82 wait syz-executor 55667 152299 63229 0 3 0x82 wait syz-executor 50040 244339 63229 0 3 0x82 wait syz-executor 10465 138339 63229 0 3 0x82 wait syz-executor 90676 230158 63229 0 3 0x82 wait syz-executor 8622 235877 63229 0 3 0x82 wait syz-executor 63229 191523 8058 0 2 0x2 syz-executor 8058 296568 41300 0 3 0x10008a sigsusp ksh 41300 18820 71646 0 3 0x98 kqread sshd-session 71646 323511 22420 0 3 0x92 kqread sshd-session 5022 272144 1 0 3 0x100083 ttyin getty 22420 212872 1 0 3 0x88 kqread sshd 69084 492855 22098 73 3 0x1100090 kqread syslogd 22098 116211 1 0 3 0x100082 sbwait syslogd 66188 318434 1 0 3 0x100080 kqread resolvd 94111 174006 37837 77 3 0x100092 kqread dhcpleased 45665 69976 37837 77 3 0x100092 kqread dhcpleased 37837 351330 1 0 3 0x80 kqread dhcpleased 75062 341705 0 0 3 0x14200 bored smr 42654 662 0 0 2 0x14200 zerothread 61526 343917 0 0 3 0x14200 aiodoned aiodoned 70685 87668 0 0 3 0x14200 syncer update 63584 221854 0 0 3 0x14200 cleaner cleaner 84633 294357 0 0 3 0x14200 reaper reaper 34954 414835 0 0 3 0x14200 pgdaemon pagedaemon 40400 80622 0 0 3 0x14200 bored viomb 44643 158685 0 0 3 0x40014200 acpi0 acpi0 9881 361230 0 0 3 0x40014200 idle1 87852 420561 0 0 3 0x14200 bored softnet3 58849 377956 0 0 3 0x14200 bored softnet2 11038 514563 0 0 3 0x14200 bored softnet1 64605 5997 0 0 3 0x14200 bored softnet0 9776 324553 0 0 3 0x14200 bored systqmp 70371 491519 0 0 3 0x14200 bored systq 49128 409254 0 0 3 0x14200 tmoslp softclockmp 7616 93480 0 0 3 0x40014200 tmoslp softclock 75233 223946 0 0 3 0x40014200 idle0 1 519302 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 (0xffffffff83a00c38) #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:295 #2 mtx_enter+0x62 sys/kern/kern_lock.c:252 #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:579 #7 Xsyscall+0x128 Process 15726 (syz-executor) thread 0xffff8000fffe94a0 (317826) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff839d4468) #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:579 #2 Xsyscall+0x128 exclusive mutex shmpl r = 0 (0xffffffff83a00c38) #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:295 #2 mtx_enter+0x62 sys/kern/kern_lock.c:252 #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:579 #7 Xsyscall+0x128 Process 19303 (syz-executor) thread 0xffff8000fffe8a60 (364610) exclusive rrwlock inode r = 0 (0xfffffd806c36d0a0) #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+0x367 sys/kern/kern_rwlock.c:311 #2 rrw_enter+0xc6 sys/kern/kern_rwlock.c:606 #3 VOP_LOCK+0xa6 sys/kern/vfs_vops.c:527 #4 vn_lock+0xa4 sys/kern/vfs_vnops.c:570 #5 vget+0x2bd sys/kern/vfs_subr.c:693 #6 ufs_ihashget+0x185 sys/ufs/ufs/ufs_ihash.c:98 #7 ffs_vget+0x8c sys/ufs/ffs/ffs_vfsops.c:1201 #8 ufs_lookup+0x19f8 sys/ufs/ufs/ufs_lookup.c:478 #9 VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 #10 vfs_lookup+0x8fa sys/kern/vfs_lookup.c:566 #11 namei+0x7aa sys/kern/vfs_lookup.c:250 #12 dounlinkat+0xc1 sys/kern/vfs_syscalls.c:1864 #13 syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] #13 syscall+0xb08 sys/arch/amd64/amd64/trap.c:579 #14 Xsyscall+0x128 exclusive rrwlock inode r = 0 (0xfffffd806c36dbe0) #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+0x367 sys/kern/kern_rwlock.c:311 #2 rrw_enter+0xc6 sys/kern/kern_rwlock.c:606 #3 VOP_LOCK+0xa6 sys/kern/vfs_vops.c:527 #4 vn_lock+0xa4 sys/kern/vfs_vnops.c:570 #5 vget+0x2bd sys/kern/vfs_subr.c:693 #6 cache_lookup+0x36e sys/kern/vfs_cache.c:222 #7 ufs_lookup+0x21b sys/ufs/ufs/ufs_lookup.c:160 #8 VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 #9 vfs_lookup+0x8fa sys/kern/vfs_lookup.c:566 #10 namei+0x7aa sys/kern/vfs_lookup.c:250 #11 dounlinkat+0xc1 sys/kern/vfs_syscalls.c:1864 #12 syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] #12 syscall+0xb08 sys/arch/amd64/amd64/trap.c:579 #13 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10190 10953K 10966K 166960K 11270 0 pcb 17 12K 12K 166960K 17 0 rtable 214 6K 6K 166960K 367 0 pf 29 16K 16K 166960K 31 0 ifaddr 38 6K 7K 166960K 44 0 ifgroup 46 2K 2K 166960K 50 0 sysctl 3 1K 9K 166960K 8 0 counters 66 36K 36K 166960K 68 0 ioctlops 0 0K 2K 166960K 35 0 iov 0 0K 8K 166960K 17 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1335 84K 84K 166960K 1462 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 11 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 78 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 23 82K 121K 166960K 405 0 sigio 0 0K 0K 166960K 2 0 proc 58 79K 115K 166960K 512 0 subproc 63 3K 4K 166960K 171 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 49 0 in_multi 88 6K 7K 166960K 105 0 ether_multi 1 0K 0K 166960K 2 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 85 387K 387K 166960K 85 0 exec 0 0K 1K 166960K 379 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 219 151K 171K 166960K 4916 0 UVM aobj 14 2K 3K 166960K 16 0 pinsyscall 46 92K 108K 166960K 1429 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 10 0 NDP 10 0K 2K 166960K 27 0 temp 45 8681K 8745K 166960K 5557 0 kqueue 13 20K 26K 166960K 68 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 112 0 12 6 0 6 6 0 8 0 unpcb 144 212 0 195 2 0 2 2 0 8 1 syncache 336 9 0 9 1 0 1 1 0 8 1 tcpqe 32 4 0 4 1 0 1 1 0 8 1 tcpcb 808 77 0 68 2 0 2 2 0 8 1 arp 128 18 0 2 1 0 1 1 0 8 0 ipq 40 3 0 0 1 0 1 1 0 8 0 ipqe 40 3 0 0 1 0 1 1 0 8 0 inpcb 384 320 0 308 2 0 2 2 0 8 0 ip6q 72 1 0 1 1 1 0 1 0 8 0 ip6af 40 2 0 2 1 1 0 1 0 8 0 nd6 144 25 0 3 1 0 1 1 0 8 0 kcovpl 48 19 0 12 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 454 0 44 29 0 29 29 0 8 1 art_table 32 455 0 44 4 0 4 4 0 8 0 art_node 16 111 0 20 1 0 1 1 0 8 0 sysvmsgpl 40 7 0 3 1 0 1 1 0 8 0 semapl 112 76 0 66 1 0 1 1 0 8 0 shmpl 112 13 0 2 1 0 1 1 0 8 0 pool(0xffffffff83a00c20:shmpl): page inconsistency: page 0xfffffd8068333000; 23 on list, 11 missing, 35 items per page dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1866 0 347 96 0 96 96 0 8 0 ffsino 288 1866 0 347 109 0 109 109 0 8 0 nchpl 144 2371 0 685 63 0 63 63 0 8 0 uvmvnodes 80 2046 0 0 42 0 42 42 0 8 0 vnodes 216 2046 0 0 114 0 114 114 0 8 0 namei 1024 7186 0 7186 2 1 1 2 0 8 1 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 7955 0 7954 10 2 8 8 1 8 7 plimitpl 152 84 0 62 2 0 2 2 0 8 1 sigapl 424 661 0 606 7 0 7 7 0 8 0 knotepl 120 311 0 0 10 0 10 10 0 8 0 kqueuepl 224 90 0 81 1 0 1 1 0 8 0 pipepl 336 161 0 134 3 0 3 3 0 8 0 fdescpl 520 642 0 606 3 0 3 3 0 8 0 filepl 160 2797 0 2598 11 1 10 11 0 8 0 lockfpl 104 68 0 66 1 0 1 1 0 8 0 lockfspl 48 29 0 27 1 0 1 1 0 8 0 sessionpl 144 36 0 20 1 0 1 1 0 8 0 pgrppl 48 57 0 33 1 0 1 1 0 8 0 ucredpl 104 345 0 327 1 0 1 1 0 8 0 zombiepl 144 606 0 606 1 0 1 1 0 8 1 processpl 1240 661 0 606 5 0 5 5 0 8 0 procpl 656 1048 0 990 7 0 7 7 0 8 1 sosppl 168 4 0 3 2 1 1 1 0 8 0 sockpl 728 591 0 559 5 0 5 5 0 8 1 mcl64k 65536 4 0 0 1 0 1 1 0 8 0 mcl12k 12288 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 2 0 0 1 0 1 1 0 8 0 mcl4k 4096 122 0 0 16 0 16 16 0 8 0 mcl2k 2048 17 0 0 3 0 3 3 0 8 0 mtagpl 96 2 0 0 1 0 1 1 0 8 0 mbufpl 256 203 0 0 13 0 13 13 0 8 0 bufpl 280 2690 0 117 184 0 184 184 0 8 0 anonpl 32 9977 0 0 81 0 81 81 0 246 0 amapchunkpl 152 15163 0 14705 37 4 33 37 0 158 12 amappl16 200 2967 0 2948 28 16 12 25 0 8 8 amappl15 192 64 0 64 1 1 0 1 0 8 0 amappl14 184 108 0 97 1 0 1 1 0 8 0 amappl13 176 9 0 9 1 1 0 1 0 8 0 amappl12 168 1241 0 1207 2 0 2 2 0 8 0 amappl11 160 59 0 49 1 0 1 1 0 8 0 amappl10 152 7 0 7 1 1 0 1 0 8 0 amappl9 144 240 0 240 1 1 0 1 0 8 0 amappl8 136 28 0 26 1 0 1 1 0 8 0 amappl7 128 98 0 86 1 0 1 1 0 8 0 amappl6 120 177 0 173 1 0 1 1 0 8 0 amappl5 112 125 0 118 1 0 1 1 0 8 0 amappl4 104 289 0 274 1 0 1 1 0 8 0 amappl3 96 2756 0 2652 4 0 4 4 0 8 0 amappl2 88 632 0 568 2 0 2 2 0 8 0 amappl1 80 9679 0 9031 16 1 15 16 0 8 1 amappl 88 4221 0 4070 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 15 0 2 1 0 1 1 0 8 0 uaddrrnd 24 642 0 606 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 642 0 606 1 0 1 1 0 8 0 vmmpekpl 168 7185 0 7141 3 0 3 3 0 8 0 vmmpepl 168 48227 0 46141 113 1 112 113 0 357 18 vmsppl 480 641 0 606 7 2 5 6 0 8 0 rwobjpl 72 18196 0 15252 57 0 57 57 0 8 0 pdppl 4096 1291 0 1212 115 34 81 95 0 8 2 pvpl 32 19148 0 0 155 0 155 155 0 265 0 pmappl 256 641 0 606 4 1 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 402 0 38 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(ffffffff833cdb7b) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83a00c20,1,ffff80003c41f838) at pool_do_get+0x5ea sys/kern/subr_pool.c:-1 pool_get(ffffffff83a00c20,1) at pool_get+0x149 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff8000fffe94a0,ffff80003c41fa90,1d0,ffff80003c41f9e0) at shmget_allocate_segment+0x1a7 sys/kern/sysv_shm.c:-1 sys_shmget(ffff8000fffe94a0,ffff80003c41fa90,ffff80003c41f9e0) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 syscall(ffff80003c41fa90) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c41fa90) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:579 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7cd98c73900, count: -8 ddb{0}> machine ddbcpu 1