panic: pool_do_get: shmpl free list modified: page 0xfffffd806c205000; item addr 0xfffffd806c2058c0; offset 0x40=0x68423c17 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 156594 17710 32767 0x10 0 0 syz-executor *183716 17710 32767 0x10 0x4000000 1K syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff833d3f2c) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83a1c2d0,1,ffff80003c4518d8) at pool_do_get+0x5ea sys/kern/subr_pool.c:-1 pool_get(ffffffff83a1c2d0,1) at pool_get+0x149 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003c445738,ffff80003c451b30,8,ffff80003c451a80) at shmget_allocate_segment+0x1a7 sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003c445738,ffff80003c451b30,ffff80003c451a80) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 syscall(ffff80003c451b30) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c451b30) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:579 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x17718b9dd70, 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 0xfffffd806c205000; item addr 0xfffffd806c2058c0; offset 0x40=0x68423c17 ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff833d3f2c) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83a1c2d0,1,ffff80003c4518d8) at pool_do_get+0x5ea sys/kern/subr_pool.c:-1 pool_get(ffffffff83a1c2d0,1) at pool_get+0x149 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003c445738,ffff80003c451b30,8,ffff80003c451a80) at shmget_allocate_segment+0x1a7 sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003c445738,ffff80003c451b30,ffff80003c451a80) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 syscall(ffff80003c451b30) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c451b30) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:579 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x17718b9dd70, count: -8 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff80003c451710 rbx 0xffff8000299dedd7 rdx 0 rcx 0xffff80003c445738 rax 0xffff8000299ddff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0xde78b16ea80ed4bf r11 0x64252e5fdc19a0c5 r12 0xffff8000299debd8 r13 0 r14 0 r15 0x1 rip 0xffffffff81a27195 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c451700 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor) tid=183716 pid=17710 tcnt=3 stat=onproc flags process=10 proc=4000000 runpri=32, usrpri=86, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80003c444028,0xffff80003c4454b8 process=0xffff80003c4126e0 user=0xffff80003c44c000, vmspace=0xfffffd8067bd15d0 estcpu=36, cpticks=2, pctcpu=0.0, user=0, sys=2, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 17710 156594 97131 32767 7 0x10 syz-executor *17710 183716 97131 32767 7 0x4000010 syz-executor 17710 451565 97131 32767 3 0x4000090 fsleep syz-executor 25173 381741 66290 32767 3 0x90 nanoslp syz-executor 25173 195441 66290 32767 3 0x4000090 kqread syz-executor 25173 7670 66290 32767 3 0x4000090 fsleep syz-executor 34409 143671 39765 32767 3 0x90 nanoslp syz-executor 34409 12208 39765 32767 3 0x4000090 sbwait syz-executor 34409 447330 39765 32767 3 0x4000090 fsleep syz-executor 34409 214708 39765 32767 3 0x4000090 fsleep syz-executor 14404 85995 17888 32767 3 0x90 nanoslp syz-executor 14404 106016 17888 32767 3 0x4000090 kqread syz-executor 14404 372016 17888 32767 3 0x4000090 fsleep syz-executor 23965 458675 38835 32767 3 0x90 nanoslp syz-executor 23965 497619 38835 32767 3 0x4000090 msgwait syz-executor 23965 414718 38835 32767 3 0x4000090 fsleep syz-executor 59941 1387 30303 32767 3 0x90 nanoslp syz-executor 59941 371617 30303 32767 3 0x4000090 kqsel syz-executor 59941 44809 30303 32767 3 0x4000090 fsleep syz-executor 53061 430529 79964 32767 3 0x90 nanoslp syz-executor 53061 74277 79964 32767 3 0x4000090 kqsel syz-executor 53061 395036 79964 32767 3 0x4000090 fsleep syz-executor 39765 365015 30805 32767 3 0x90 nanoslp syz-executor 97131 424456 76234 32767 3 0x90 nanoslp syz-executor 30303 244207 94584 32767 3 0x90 nanoslp syz-executor 79964 140273 85646 32767 3 0x90 nanoslp syz-executor 66290 251151 47853 32767 3 0x90 nanoslp syz-executor 17888 467898 25792 32767 3 0x90 nanoslp syz-executor 38835 434117 28692 32767 3 0x90 nanoslp syz-executor 99980 14994 67998 32767 3 0x90 nanoslp syz-executor 30805 226937 12377 0 3 0x82 wait syz-executor 85646 402294 12377 0 3 0x82 wait syz-executor 76234 433647 12377 0 3 0x82 wait syz-executor 94584 120977 12377 0 3 0x82 wait syz-executor 67998 224012 12377 0 3 0x82 wait syz-executor 25792 316573 12377 0 3 0x82 wait syz-executor 28692 137343 12377 0 3 0x82 wait syz-executor 47853 108154 12377 0 3 0x82 wait syz-executor 12377 266751 41285 0 3 0x82 kqread syz-executor 41285 59867 28279 0 3 0x10008a sigsusp ksh 28279 403031 4632 0 3 0x98 kqread sshd-session 4632 328372 91190 0 3 0x92 kqread sshd-session 76422 64508 1 0 3 0x100083 ttyin getty 91190 518447 1 0 3 0x88 kqread sshd 65145 462581 93566 73 3 0x1100090 kqread syslogd 93566 261689 1 0 3 0x100082 sbwait syslogd 80710 299865 1 0 3 0x100080 kqread resolvd 92838 484076 99507 77 3 0x100092 kqread dhcpleased 67638 228842 99507 77 3 0x100092 kqread dhcpleased 99507 353023 1 0 3 0x80 kqread dhcpleased 80044 6153 0 0 3 0x14200 bored smr 64306 304177 0 0 3 0x14200 pgzero zerothread 74155 140132 0 0 3 0x14200 aiodoned aiodoned 79941 292152 0 0 3 0x14200 syncer update 42488 240597 0 0 3 0x14200 cleaner cleaner 78897 507046 0 0 3 0x14200 reaper reaper 56554 289890 0 0 3 0x14200 pgdaemon pagedaemon 34317 173237 0 0 3 0x14200 bored viomb 87328 113553 0 0 3 0x40014200 acpi0 acpi0 12667 367497 0 0 3 0x40014200 idle1 55220 125955 0 0 3 0x14200 bored softnet3 20982 160770 0 0 3 0x14200 bored softnet2 53011 404550 0 0 3 0x14200 bored softnet1 66419 216345 0 0 3 0x14200 bored softnet0 8050 244165 0 0 3 0x14200 bored systqmp 28925 123590 0 0 3 0x14200 bored systq 86988 366068 0 0 3 0x14200 tmoslp softclockmp 81171 285929 0 0 3 0x40014200 tmoslp softclock 66793 420429 0 0 3 0x40014200 idle0 1 482612 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 (0xffffffff83a1c2e8) #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:296 #2 mtx_enter+0x62 sys/kern/kern_lock.c:253 #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 17710 (syz-executor) thread 0xffff80003c445738 (183716) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff839c40f8) #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 (0xffffffff83a1c2e8) #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:296 #2 mtx_enter+0x62 sys/kern/kern_lock.c:253 #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 10193 10955K 10966K 166960K 11270 0 pcb 17 12K 12K 166960K 17 0 rtable 240 6K 7K 166960K 355 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 31 0 iov 0 0K 12K 166960K 6 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1334 84K 84K 166960K 1401 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 5 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 1K 166960K 17 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 26 97K 125K 166960K 251 0 sigio 0 0K 0K 166960K 34 0 proc 58 79K 115K 166960K 486 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 23 0 in_multi 99 7K 7K 166960K 103 0 ether_multi 1 0K 0K 166960K 3 0 mrt 1 0K 0K 166960K 1 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 91 413K 413K 166960K 91 0 exec 0 0K 1K 166960K 421 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 270 152K 161K 166960K 3718 0 UVM aobj 10 2K 4K 166960K 13 0 pinsyscall 47 94K 112K 166960K 1253 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 11 0 NDP 11 0K 2K 166960K 27 0 temp 41 8683K 8747K 166960K 4118 0 kqueue 15 24K 26K 166960K 45 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 42 0 38 1 0 1 1 0 8 0 rtentry 176 114 0 1 6 0 6 6 0 8 0 unpcb 144 189 0 164 4 0 4 4 0 8 3 syncache 336 3 0 3 1 0 1 1 0 8 1 tcpcb 808 46 0 39 1 0 1 1 0 8 0 arp 128 18 0 0 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 328 147 0 131 2 0 2 2 0 8 0 nd6 144 27 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 477 0 0 30 0 30 30 0 8 0 art_table 32 478 0 0 4 0 4 4 0 8 0 art_node 16 113 0 10 1 0 1 1 0 8 0 sysvmsgpl 40 2 0 1 1 0 1 1 0 8 0 semupl 112 1 0 1 1 0 1 1 0 8 1 semapl 112 14 0 4 1 0 1 1 0 8 0 shmpl 112 10 0 3 1 0 1 1 0 8 0 pool(0xffffffff83a1c2d0:shmpl): page inconsistency: page 0xfffffd806c205000; 27 on list, 7 missing, 35 items per page dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1735 0 232 95 0 95 95 0 8 0 ffsino 288 1735 0 232 108 0 108 108 0 8 0 nchpl 144 2090 0 413 63 0 63 63 0 8 0 uvmvnodes 80 1816 0 0 38 0 38 38 0 8 0 vnodes 216 1816 0 0 101 0 101 101 0 8 0 namei 1024 6506 0 6506 2 0 2 2 0 8 2 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 6727 0 6727 3 2 1 2 1 8 1 plimitpl 152 87 0 61 2 0 2 2 0 8 0 sigapl 424 524 0 468 8 0 8 8 0 8 1 knotepl 120 325 0 0 10 0 10 10 0 8 0 kqueuepl 224 68 0 53 2 0 2 2 0 8 0 pipepl 336 106 0 79 3 0 3 3 0 8 0 fdescpl 520 506 0 468 4 0 4 4 0 8 0 filepl 160 2325 0 2092 13 0 13 13 0 8 2 lockfpl 104 31 0 29 1 0 1 1 0 8 0 lockfspl 48 15 0 13 1 0 1 1 0 8 0 sessionpl 144 21 0 5 1 0 1 1 0 8 0 pgrppl 48 29 0 5 1 0 1 1 0 8 0 ucredpl 104 381 0 362 1 0 1 1 0 8 0 zombiepl 144 469 0 468 1 0 1 1 0 8 0 processpl 1240 524 0 468 5 0 5 5 0 8 0 procpl 656 715 0 644 7 0 7 7 0 8 0 sockpl 728 386 0 338 11 0 11 11 0 8 6 mcl64k 65536 2 0 0 1 0 1 1 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl8k 8192 1 0 0 1 0 1 1 0 8 0 mcl4k 4096 121 0 0 16 0 16 16 0 8 0 mcl2k 2048 18 0 0 3 0 3 3 0 8 0 mtagpl 96 2 0 0 1 0 1 1 0 8 0 mbufpl 256 209 0 0 14 0 14 14 0 8 0 bufpl 280 2576 0 116 176 0 176 176 0 8 0 anonpl 32 5271 0 0 43 0 43 43 0 246 0 amapchunkpl 152 11289 0 10667 26 0 26 26 0 158 2 amappl16 200 2014 0 1991 5 1 4 5 0 8 2 amappl15 192 7 0 7 1 1 0 1 0 8 0 amappl14 184 102 0 92 1 0 1 1 0 8 0 amappl13 176 3 0 3 1 1 0 1 0 8 0 amappl12 168 1101 0 1063 2 0 2 2 0 8 0 amappl11 160 46 0 36 1 0 1 1 0 8 0 amappl10 152 2 0 1 1 0 1 1 0 8 0 amappl9 144 249 0 249 1 1 0 1 0 8 0 amappl8 136 27 0 26 1 0 1 1 0 8 0 amappl7 128 94 0 82 1 0 1 1 0 8 0 amappl6 120 168 0 165 1 0 1 1 0 8 0 amappl5 112 120 0 114 1 0 1 1 0 8 0 amappl4 104 272 0 258 1 0 1 1 0 8 0 amappl3 96 1914 0 1771 4 0 4 4 0 8 0 amappl2 88 597 0 544 2 0 2 2 0 8 0 amappl1 80 8170 0 7581 14 0 14 14 0 8 0 amappl 88 3082 0 2877 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 12 0 3 1 0 1 1 0 8 0 uaddrrnd 24 506 0 468 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 506 0 468 1 0 1 1 0 8 0 vmmpekpl 168 5531 0 5501 2 0 2 2 0 8 0 vmmpepl 168 38033 0 35839 96 0 96 96 0 357 0 vmsppl 480 505 0 468 7 1 6 6 0 8 0 rwobjpl 72 14765 0 12064 50 0 50 50 0 8 0 pdppl 4096 1019 0 936 109 24 85 97 0 8 2 pvpl 32 12557 0 0 102 0 102 102 0 265 0 pmappl 256 505 0 468 4 1 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 396 0 27 11 0 11 11 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp x86_ipi_db(ffffffff83830ff0) 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(ffffffff839c3ef0) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:129 [inline] __mp_lock(ffffffff839c3ef0) at __mp_lock+0x192 sys/kern/kern_lock.c:160 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: 0x7ce03622c8d0, count: 8 ddb{0}> trace x86_ipi_db(ffffffff83830ff0) 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(ffffffff839c3ef0) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:129 [inline] __mp_lock(ffffffff839c3ef0) at __mp_lock+0x192 sys/kern/kern_lock.c:160 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: 0x7ce03622c8d0, 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(ffffffff833d3f2c) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83a1c2d0,1,ffff80003c4518d8) at pool_do_get+0x5ea sys/kern/subr_pool.c:-1 pool_get(ffffffff83a1c2d0,1) at pool_get+0x149 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003c445738,ffff80003c451b30,8,ffff80003c451a80) at shmget_allocate_segment+0x1a7 sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003c445738,ffff80003c451b30,ffff80003c451a80) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 syscall(ffff80003c451b30) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c451b30) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:579 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x17718b9dd70, count: 7 ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff833d3f2c) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83a1c2d0,1,ffff80003c4518d8) at pool_do_get+0x5ea sys/kern/subr_pool.c:-1 pool_get(ffffffff83a1c2d0,1) at pool_get+0x149 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003c445738,ffff80003c451b30,8,ffff80003c451a80) at shmget_allocate_segment+0x1a7 sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003c445738,ffff80003c451b30,ffff80003c451a80) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 syscall(ffff80003c451b30) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c451b30) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:579 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x17718b9dd70, count: -8