panic: pool_do_get: shmpl free list modified: page 0xfffffd806bd91000; item addr 0xfffffd806bd917e0; offset 0x40=0x683b4818 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 273493 90351 32767 0x10 0 0 syz-executor *300593 90351 32767 0x10 0x4000000 1K syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff833d2a48) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff838fec00,1,ffff80003b002cb8) at pool_do_get+0x5ea sys/kern/subr_pool.c:-1 pool_get(ffffffff838fec00,1) at pool_get+0x149 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff8000fffe9c58,ffff80003b002f10,0,ffff80003b002e60) at shmget_allocate_segment+0x1a7 sys/kern/sysv_shm.c:-1 sys_shmget(ffff8000fffe9c58,ffff80003b002f10,ffff80003b002e60) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 syscall(ffff80003b002f10) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003b002f10) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:579 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x48f5f3e0660, 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 0xfffffd806bd91000; item addr 0xfffffd806bd917e0; offset 0x40=0x683b4818 ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff833d2a48) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff838fec00,1,ffff80003b002cb8) at pool_do_get+0x5ea sys/kern/subr_pool.c:-1 pool_get(ffffffff838fec00,1) at pool_get+0x149 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff8000fffe9c58,ffff80003b002f10,0,ffff80003b002e60) at shmget_allocate_segment+0x1a7 sys/kern/sysv_shm.c:-1 sys_shmget(ffff8000fffe9c58,ffff80003b002f10,ffff80003b002e60) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 syscall(ffff80003b002f10) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003b002f10) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:579 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x48f5f3e0660, count: -8 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff80003b002af0 rbx 0xffff8000299dedcf rdx 0xffff800001436e80 rcx 0xffff8000fffe9c58 rax 0xffff8000299ddff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x6bf7ab591ed4914d r11 0xb79ecd3acb5328bf r12 0xffff8000299debd0 r13 0 r14 0 r15 0x1 rip 0xffffffff81fc9f65 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003b002ae0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor) tid=300593 pid=90351 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=0xffff8000fffe8cf8,0xffff8000fffe99d8 process=0xffff8000fffe4ea8 user=0xffff80003affd000, vmspace=0xfffffd806c4ac5c0 estcpu=28, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 34331 142947 51051 0 2 0x2 sshd-session 90351 273493 47258 32767 7 0x10 syz-executor *90351 300593 47258 32767 7 0x4000010 syz-executor 66721 78824 26255 32767 2 0x10 syz-executor 66721 132034 26255 32767 2 0x4000010 syz-executor 66107 150455 28712 32767 2 0x10 syz-executor 66107 325752 28712 32767 3 0x4000090 fsleep syz-executor 66107 106944 28712 32767 3 0x4000090 fsleep syz-executor 88851 401624 8938 32767 3 0x90 nanoslp syz-executor 88851 362118 8938 32767 3 0x4000090 msgwait syz-executor 88851 154124 8938 32767 3 0x4000090 fsleep syz-executor 3969 162703 0 0 3 0x14200 bored sosplice 244 480268 67104 32767 3 0x90 nanoslp syz-executor 29963 144765 81088 32767 3 0x90 wait syz-executor 31336 82617 94619 32767 3 0x90 nanoslp syz-executor 26255 166981 73436 32767 3 0x90 nanoslp syz-executor 8938 330777 3855 32767 3 0x90 nanoslp syz-executor 47258 44311 42977 32767 3 0x90 nanoslp syz-executor 28712 260643 428 32767 3 0x90 nanoslp syz-executor 67104 257460 15762 0 3 0x82 wait syz-executor 81088 294018 15762 0 3 0x82 wait syz-executor 73436 390204 15762 0 3 0x82 wait syz-executor 3855 130590 15762 0 3 0x82 wait syz-executor 94619 114342 15762 0 3 0x82 wait syz-executor 42977 178981 15762 0 3 0x82 wait syz-executor 428 100177 15762 0 3 0x82 wait syz-executor 15762 121521 82097 0 3 0x82 nanoslp syz-executor 82097 492835 60398 0 3 0x10008a sigsusp ksh 60398 512818 36141 0 3 0x98 kqread sshd-session 36141 486110 51051 0 3 0x92 kqread sshd-session 41993 147675 1 0 3 0x100083 ttyin getty 51051 268735 1 0 3 0x88 kqread sshd 27848 490058 15359 73 3 0x1100090 kqread syslogd 15359 390142 1 0 3 0x100082 sbwait syslogd 91527 397717 1 0 3 0x100080 kqread resolvd 15580 283238 38728 77 3 0x100092 kqread dhcpleased 44893 408746 38728 77 3 0x100092 kqread dhcpleased 38728 28432 1 0 3 0x80 kqread dhcpleased 91237 270090 0 0 3 0x14200 bored smr 13341 142602 0 0 2 0x14200 zerothread 85336 330282 0 0 3 0x14200 aiodoned aiodoned 16618 488256 0 0 3 0x14200 syncer update 99975 494961 0 0 3 0x14200 cleaner cleaner 31292 395616 0 0 3 0x14200 reaper reaper 7031 26147 0 0 3 0x14200 pgdaemon pagedaemon 66362 373210 0 0 3 0x14200 bored viomb 53670 433187 0 0 3 0x40014200 acpi0 acpi0 14057 470319 0 0 3 0x40014200 idle1 22285 404036 0 0 3 0x14200 bored softnet3 37896 457542 0 0 3 0x14200 bored softnet2 99491 415300 0 0 3 0x14200 bored softnet1 85655 265288 0 0 3 0x14200 bored softnet0 28627 499676 0 0 3 0x14200 bored systqmp 28732 516485 0 0 3 0x14200 bored systq 84365 307111 0 0 3 0x14200 tmoslp softclockmp 33143 421286 0 0 3 0x40014200 tmoslp softclock 87688 285065 0 0 3 0x40014200 idle0 1 375904 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 (0xffffffff838fec18) #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 90351 (syz-executor) thread 0xffff8000fffe9c58 (300593) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff838fce30) #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 (0xffffffff838fec18) #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 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10194 10954K 10966K 166960K 11274 0 pcb 17 12K 12K 166960K 17 0 rtable 218 6K 7K 166960K 366 0 pf 29 16K 16K 166960K 31 0 ifaddr 38 6K 7K 166960K 44 0 ifgroup 46 2K 2K 166960K 50 0 sysctl 2 1K 9K 166960K 6 0 counters 66 36K 36K 166960K 68 0 ioctlops 0 0K 2K 166960K 33 0 iov 0 0K 12K 166960K 5 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1334 84K 84K 166960K 1437 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 11 0 VM map 2 1K 1K 166960K 2 0 sem 11 0K 0K 166960K 13 0 dirhash 12 2K 2K 166960K 15 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 23 85K 125K 166960K 346 0 sigio 0 0K 0K 166960K 2 0 proc 58 79K 115K 166960K 503 0 subproc 63 3K 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 61 0 in_multi 88 6K 7K 166960K 107 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 109 493K 493K 166960K 109 0 exec 0 0K 1K 166960K 386 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 253 152K 186K 166960K 4769 0 UVM aobj 11 2K 2K 166960K 14 0 pinsyscall 45 90K 114K 166960K 1392 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 14 0 NDP 10 0K 2K 166960K 27 0 temp 44 8689K 8753K 166960K 4654 0 kqueue 13 20K 26K 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 54 0 51 1 0 1 1 0 8 0 rtentry 176 114 0 12 6 0 6 6 0 8 0 unpcb 144 176 0 156 1 0 1 1 0 8 0 syncache 336 6 0 6 1 0 1 1 0 8 1 tcpcb 808 77 0 69 2 0 2 2 0 8 1 arp 128 20 0 2 1 0 1 1 0 8 0 ipq 40 1 0 0 1 0 1 1 0 8 0 ipqe 40 1 0 0 1 0 1 1 0 8 0 inpcb 384 337 0 324 8 0 8 8 0 8 6 nd6 144 25 0 3 1 0 1 1 0 8 0 kcovpl 48 12 0 5 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 455 0 44 29 0 29 29 0 8 2 art_table 32 456 0 44 4 0 4 4 0 8 0 art_node 16 113 0 20 1 0 1 1 0 8 0 sysvmsgpl 40 7 0 2 1 0 1 1 0 8 0 semupl 112 1 0 1 1 0 1 1 0 8 1 semapl 112 11 0 2 1 0 1 1 0 8 0 shmpl 112 11 0 3 1 0 1 1 0 8 0 pool(0xffffffff838fec00:shmpl): page inconsistency: page 0xfffffd806bd91000; 26 on list, 8 missing, 35 items per page dirhash 1024 19 0 2 3 0 3 3 0 8 0 dino2pl 256 1867 0 357 95 0 95 95 0 8 0 ffsino 288 1867 0 357 109 0 109 109 0 8 0 nchpl 144 2313 0 630 63 0 63 63 0 8 0 uvmvnodes 80 1984 0 0 41 0 41 41 0 8 0 vnodes 216 1984 0 0 111 0 111 111 0 8 0 namei 1024 7343 0 7343 1 0 1 1 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 7560 0 7560 3 2 1 2 1 8 1 plimitpl 152 86 0 62 2 0 2 2 0 8 0 sigapl 424 624 0 569 8 0 8 8 0 8 1 knotepl 120 309 0 0 10 0 10 10 0 8 0 kqueuepl 224 138 0 129 5 0 5 5 0 8 4 pipepl 336 132 0 105 3 0 3 3 0 8 0 fdescpl 520 605 0 569 4 0 4 4 0 8 0 filepl 160 2993 0 2783 15 0 15 15 0 8 3 lockfpl 104 73 0 71 1 0 1 1 0 8 0 lockfspl 48 28 0 26 1 0 1 1 0 8 0 sessionpl 144 28 0 12 1 0 1 1 0 8 0 pgrppl 48 43 0 20 1 0 1 1 0 8 0 ucredpl 104 441 0 423 1 0 1 1 0 8 0 zombiepl 144 572 0 569 1 0 1 1 0 8 0 processpl 1240 624 0 569 5 0 5 5 0 8 0 procpl 656 956 0 895 6 0 6 6 0 8 0 sosppl 168 1 0 1 1 0 1 1 0 8 1 sockpl 728 568 0 533 10 0 10 10 0 8 6 mcl64k 65536 5 0 0 1 0 1 1 0 8 0 mcl16k 16384 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 128 0 0 16 0 16 16 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 280 0 0 18 0 18 18 0 8 0 bufpl 280 2664 0 116 182 0 182 182 0 8 0 anonpl 32 7390 0 0 60 0 60 60 0 246 0 amapchunkpl 152 14904 0 14348 30 0 30 30 0 158 4 amappl16 200 2151 0 2126 11 0 11 11 0 8 7 amappl15 192 8 0 8 1 1 0 1 0 8 0 amappl14 184 109 0 99 1 0 1 1 0 8 0 amappl13 176 10 0 10 1 1 0 1 0 8 0 amappl12 168 1217 0 1182 3 0 3 3 0 8 1 amappl11 160 43 0 33 1 0 1 1 0 8 0 amappl10 152 4 0 4 1 1 0 1 0 8 0 amappl9 144 247 0 246 1 0 1 1 0 8 0 amappl8 136 28 0 26 1 0 1 1 0 8 0 amappl7 128 103 0 93 1 0 1 1 0 8 0 amappl6 120 183 0 179 1 0 1 1 0 8 0 amappl5 112 116 0 110 1 0 1 1 0 8 0 amappl4 104 299 0 283 1 0 1 1 0 8 0 amappl3 96 2522 0 2394 4 0 4 4 0 8 0 amappl2 88 627 0 572 2 0 2 2 0 8 0 amappl1 80 9211 0 8646 15 0 15 15 0 8 1 amappl 88 4064 0 3876 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 13 0 3 1 0 1 1 0 8 0 uaddrrnd 24 605 0 569 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 605 0 569 1 0 1 1 0 8 0 vmmpekpl 168 6640 0 6601 3 0 3 3 0 8 0 vmmpepl 168 44805 0 42732 103 0 103 103 0 357 4 vmsppl 480 604 0 569 7 1 6 6 0 8 1 rwobjpl 72 16823 0 13990 52 0 52 52 0 8 0 pdppl 4096 1218 0 1138 112 28 84 98 0 8 4 pvpl 32 15436 0 0 126 1 125 125 0 265 0 pmappl 256 604 0 569 4 1 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 403 0 31 11 0 11 11 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp x86_ipi_db(ffffffff837dfff0) 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(ffffffff838fcc28) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:128 [inline] __mp_lock(ffffffff838fcc28) at __mp_lock+0x192 sys/kern/kern_lock.c:159 softintr_dispatch(0) at softintr_dispatch+0x12a sys/kern/kern_softintr.c:83 dosoftint(0) at dosoftint+0x54 sys/arch/amd64/amd64/intr.c:840 Xsoftclock() at Xsoftclock+0x27 end of kernel end trace frame: 0x7273986ddbd0, count: 8 ddb{0}> trace x86_ipi_db(ffffffff837dfff0) 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(ffffffff838fcc28) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:128 [inline] __mp_lock(ffffffff838fcc28) at __mp_lock+0x192 sys/kern/kern_lock.c:159 softintr_dispatch(0) at softintr_dispatch+0x12a sys/kern/kern_softintr.c:83 dosoftint(0) at dosoftint+0x54 sys/arch/amd64/amd64/intr.c:840 Xsoftclock() at Xsoftclock+0x27 end of kernel end trace frame: 0x7273986ddbd0, count: -7 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(ffffffff833d2a48) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff838fec00,1,ffff80003b002cb8) at pool_do_get+0x5ea sys/kern/subr_pool.c:-1 pool_get(ffffffff838fec00,1) at pool_get+0x149 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff8000fffe9c58,ffff80003b002f10,0,ffff80003b002e60) at shmget_allocate_segment+0x1a7 sys/kern/sysv_shm.c:-1 sys_shmget(ffff8000fffe9c58,ffff80003b002f10,ffff80003b002e60) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 syscall(ffff80003b002f10) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003b002f10) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:579 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x48f5f3e0660, count: 7 ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff833d2a48) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff838fec00,1,ffff80003b002cb8) at pool_do_get+0x5ea sys/kern/subr_pool.c:-1 pool_get(ffffffff838fec00,1) at pool_get+0x149 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff8000fffe9c58,ffff80003b002f10,0,ffff80003b002e60) at shmget_allocate_segment+0x1a7 sys/kern/sysv_shm.c:-1 sys_shmget(ffff8000fffe9c58,ffff80003b002f10,ffff80003b002e60) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 syscall(ffff80003b002f10) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003b002f10) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:579 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x48f5f3e0660, count: -8