panic: pool_do_get: shmpl free list modified: page 0xfffffd80784ca000; item addr 0xfffffd80784ca9a0; offset 0x2c=0xdead410f Stopped at db_enter+0x1c: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 459457 83516 0 0 0 0 syz-executor.7 *461919 83516 0 0 0x4000000 1K syz-executor.7 db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82813cd5) at panic+0x17b sys/kern/subr_prf.c:198 pool_do_get(ffffffff82d8dbd0,1,ffff80002e429378) at pool_do_get+0x484 sys/kern/subr_pool.c:739 pool_get(ffffffff82d8dbd0,1) at pool_get+0xed sys/kern/subr_pool.c:582 shmget_allocate_segment(ffff8000211da818,ffff80002e429500,1a9,ffff80002e429550) at shmget_allocate_segment+0x15b sys/kern/sysv_shm.c:417 sys_shmget(ffff8000211da818,ffff80002e429500,ffff80002e429550) at sys_shmget+0x13b sys/kern/sysv_shm.c:480 syscall(ffff80002e4295d0) at syscall+0x5e2 mi_syscall sys/sys/syscall_mi.h:110 [inline] syscall(ffff80002e4295d0) at syscall+0x5e2 sys/arch/amd64/amd64/trap.c:623 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x856c12368a0, 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 0xfffffd80784ca000; item addr 0xfffffd80784ca9a0; offset 0x2c=0xdead410f ddb{1}> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82813cd5) at panic+0x17b sys/kern/subr_prf.c:198 pool_do_get(ffffffff82d8dbd0,1,ffff80002e429378) at pool_do_get+0x484 sys/kern/subr_pool.c:739 pool_get(ffffffff82d8dbd0,1) at pool_get+0xed sys/kern/subr_pool.c:582 shmget_allocate_segment(ffff8000211da818,ffff80002e429500,1a9,ffff80002e429550) at shmget_allocate_segment+0x15b sys/kern/sysv_shm.c:417 sys_shmget(ffff8000211da818,ffff80002e429500,ffff80002e429550) at sys_shmget+0x13b sys/kern/sysv_shm.c:480 syscall(ffff80002e4295d0) at syscall+0x5e2 mi_syscall sys/sys/syscall_mi.h:110 [inline] syscall(ffff80002e4295d0) at syscall+0x5e2 sys/arch/amd64/amd64/trap.c:623 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x856c12368a0, count: -8 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff80002e4291c0 rbx 0xffff800020d49ba7 rdx 0xffff800000d343c0 rcx 0xffff8000211da818 rax 0xffff800020d48ff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0xfd206507711f0924 r11 0x1289c3198f28529f r12 0xffff800020d499a8 r13 0 r14 0 r15 0x1 rip 0xffffffff814b969c db_enter+0x1c cs 0x8 rflags 0x246 rsp 0xffff80002e4291b0 ss 0x10 db_enter+0x1c: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.7) tid=461919 pid=83516 tcnt=2 stat=onproc flags process=0 proc=4000000 runpri=32, usrpri=78, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 forw=0xffffffffffffffff, list=0xffff8000211dad68,0xffff8000211ce570 process=0xffff8000ffff90c8 user=0xffff80002e424000, vmspace=0xfffffd806efc41d8 estcpu=28, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 97856 491079 54945 0 2 0 syz-executor.5 97856 457355 54945 0 3 0x4000080 fsleep syz-executor.5 27376 89829 78574 0 2 0 syz-executor.4 27376 272994 78574 0 3 0x4000080 fsleep syz-executor.4 27376 339879 78574 0 3 0x4000080 fsleep syz-executor.4 27376 361216 78574 0 3 0x4000080 fsleep syz-executor.4 64213 506628 87528 0 2 0 syz-executor.0 64213 220833 87528 0 3 0x4000080 kqread syz-executor.0 52324 78397 49103 0 2 0 syz-executor.1 52324 518221 49103 0 3 0x4000080 fsleep syz-executor.1 52324 135571 49103 0 2 0x4000000 syz-executor.1 29909 275201 94975 0 2 0 syz-executor.6 29909 160639 94975 0 3 0x4000080 fsleep syz-executor.6 83516 459457 76234 0 7 0 syz-executor.7 *83516 461919 76234 0 7 0x4000000 syz-executor.7 92088 376415 4589 0 2 0 syz-executor.2 92088 279304 4589 0 3 0x4000080 fsleep syz-executor.2 92088 239810 4589 0 3 0x4000080 fsleep syz-executor.2 88277 164962 0 0 3 0x14200 bored sosplice 49103 74924 415 0 3 0x82 nanoslp syz-executor.1 4589 498209 415 0 3 0x82 nanoslp syz-executor.2 78574 515143 415 0 3 0x82 nanoslp syz-executor.4 76234 214598 415 0 3 0x82 nanoslp syz-executor.7 94975 60021 415 0 3 0x82 nanoslp syz-executor.6 54945 485965 415 0 3 0x82 nanoslp syz-executor.5 27877 17462 415 0 3 0x82 nanoslp syz-executor.3 87528 88697 415 0 3 0x82 nanoslp syz-executor.0 415 267336 4944 0 3 0x2000082 kqread syz-fuzzer 415 263416 4944 0 3 0x6000082 nanoslp syz-fuzzer 415 518970 4944 0 3 0x6000082 thrsleep syz-fuzzer 415 200061 4944 0 3 0x6000082 wait syz-fuzzer 415 25427 4944 0 3 0x6000082 thrsleep syz-fuzzer 415 247047 4944 0 3 0x6000082 wait syz-fuzzer 415 44200 4944 0 3 0x6000082 wait syz-fuzzer 415 350181 4944 0 3 0x6000082 wait syz-fuzzer 415 237208 4944 0 3 0x6000082 thrsleep syz-fuzzer 415 139808 4944 0 3 0x6000082 thrsleep syz-fuzzer 415 300586 4944 0 3 0x6000082 thrsleep syz-fuzzer 415 218214 4944 0 3 0x6000082 wait syz-fuzzer 415 523296 4944 0 3 0x6000082 wait syz-fuzzer 415 389926 4944 0 3 0x6000082 wait syz-fuzzer 415 446670 4944 0 3 0x6000082 wait syz-fuzzer 4944 348323 35810 0 3 0x10008a sigsusp ksh 35810 491999 77068 0 3 0x9a kqread sshd 90354 112621 1 0 3 0x100083 ttyin getty 77068 286645 1 0 3 0x88 kqread sshd 30429 42944 62180 74 3 0x1100092 bpf pflogd 62180 499595 1 0 3 0x80 netio pflogd 92822 360985 67665 73 3 0x1100090 kqread syslogd 67665 29763 1 0 3 0x100082 netio syslogd 30523 54753 1 0 3 0x100080 kqread resolvd 17720 399364 66640 77 3 0x100092 kqread dhcpleased 11515 22108 66640 77 3 0x100092 kqread dhcpleased 66640 79691 1 0 3 0x80 kqread dhcpleased 31637 85186 0 0 3 0x14200 bored smr 86310 498722 0 0 2 0x14200 zerothread 23103 320960 0 0 3 0x14200 aiodoned aiodoned 39354 122000 0 0 3 0x14200 syncer update 53631 293314 0 0 3 0x14200 cleaner cleaner 70883 362172 0 0 3 0x14200 reaper reaper 49721 20420 0 0 3 0x14200 pgdaemon pagedaemon 51096 119659 0 0 3 0x14200 bored viomb 39642 309072 0 0 3 0x40014200 acpi0 acpi0 55739 65767 0 0 3 0x40014200 idle1 11736 511529 0 0 3 0x14200 bored softnet3 46572 365322 0 0 3 0x14200 bored softnet2 25889 430907 0 0 3 0x14200 bored softnet1 29445 267967 0 0 3 0x14200 bored softnet0 9903 197994 0 0 3 0x14200 bored systqmp 91992 351290 0 0 3 0x14200 bored systq 57933 472536 0 0 3 0x14200 tmoslp softclockmp 68710 29132 0 0 3 0x40014200 tmoslp softclock 34345 58313 0 0 3 0x40014200 idle0 1 457882 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 (0xffffffff82d8dbe0) #0 witness_lock+0x447 #1 mtx_enter_try+0x104 #2 mtx_enter+0x4f sys/kern/kern_lock.c:266 #3 pool_get+0xc1 sys/kern/subr_pool.c:579 #4 shmget_allocate_segment+0x15b sys/kern/sysv_shm.c:417 #5 sys_shmget+0x13b sys/kern/sysv_shm.c:480 #6 syscall+0x5e2 mi_syscall sys/sys/syscall_mi.h:110 [inline] #6 syscall+0x5e2 sys/arch/amd64/amd64/trap.c:623 #7 Xsyscall+0x128 Process 83516 (syz-executor.7) thread 0xffff8000211da818 (461919) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82d80f00) #0 witness_lock+0x447 #1 syscall+0x5cd mi_syscall sys/sys/syscall_mi.h:110 [inline] #1 syscall+0x5cd sys/arch/amd64/amd64/trap.c:623 #2 Xsyscall+0x128 exclusive mutex shmpl r = 0 (0xffffffff82d8dbe0) #0 witness_lock+0x447 #1 mtx_enter_try+0x104 #2 mtx_enter+0x4f sys/kern/kern_lock.c:266 #3 pool_get+0xc1 sys/kern/subr_pool.c:579 #4 shmget_allocate_segment+0x15b sys/kern/sysv_shm.c:417 #5 sys_shmget+0x13b sys/kern/sysv_shm.c:480 #6 syscall+0x5e2 mi_syscall sys/sys/syscall_mi.h:110 [inline] #6 syscall+0x5e2 sys/arch/amd64/amd64/trap.c:623 #7 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10192 6484K 6937K 78643K 11590 0 pcb 13 8K 8K 78643K 25 0 rtable 234 6K 6K 78643K 449 0 pf 32 9K 10K 78643K 49 0 ifaddr 45 15K 15K 78643K 59 0 ifgroup 55 2K 2K 78643K 67 0 counters 60 35K 35K 78643K 66 0 ioctlops 0 0K 4K 78643K 1503 0 iov 0 0K 14K 78643K 18 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1290 81K 81K 78643K 1417 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 5 0 VM map 2 1K 1K 78643K 2 0 sem 12 0K 0K 78643K 13 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 17 61K 93K 78643K 383 0 proc 68 91K 128K 78643K 620 0 subproc 104 6K 6K 78643K 143 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 12 0 in_multi 99 7K 7K 78643K 135 0 ether_multi 1 0K 0K 78643K 1 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 37 175K 175K 78643K 37 0 exec 0 0K 1K 78643K 433 0 tdb 3 0K 0K 78643K 3 0 pagedep 1 8K 8K 78643K 1 0 inodedep 1 32K 32K 78643K 1 0 newblk 1 0K 0K 78643K 1 0 VM swap 8 62K 64K 78643K 10 0 UVM amap 357 147K 147K 78643K 6057 0 UVM aobj 9 2K 2K 78643K 12 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 22 0 NDP 12 0K 1K 78643K 37 0 temp 33 5906K 5983K 78643K 6589 0 kqueue 12 18K 24K 78643K 38 0 SYN cache 2 16K 16K 78643K 2 0 ddb{1}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle plcache 128 22 0 0 1 0 1 1 0 8 0 rtpcb 120 55 0 52 1 0 1 1 0 8 0 rtentry 112 144 0 34 4 0 4 4 0 8 0 unpcb 144 324 0 305 4 0 4 4 0 8 3 syncache 304 4 0 4 1 1 0 1 0 8 0 tcpqe 32 503 0 503 4 4 0 3 0 8 0 tcpcb 808 29 0 23 2 0 2 2 0 8 0 arp 120 24 0 6 1 0 1 1 0 8 0 inpcb 368 130 0 120 2 0 2 2 0 8 1 nd6 136 33 0 9 1 0 1 1 0 8 0 kcovpl 48 11 0 3 1 0 1 1 0 8 0 pfosfp 40 1428 0 1005 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfstitem 24 26 0 2 1 0 1 1 0 8 0 pfstkey 128 26 0 2 1 0 1 1 0 8 0 pfstate 376 26 0 2 3 0 3 3 0 8 0 pfrule 1344 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 585 0 132 29 0 29 29 0 8 0 art_table 32 586 0 132 4 0 4 4 0 8 0 art_node 16 143 0 43 1 0 1 1 0 8 0 semupl 112 2 0 2 1 0 1 1 0 8 1 semapl 112 11 0 1 1 0 1 1 0 8 0 shmpl 112 9 0 3 1 0 1 1 0 8 0 pool(0xffffffff82d8dbd0:shmpl): page inconsistency: page 0xfffffd80784ca000; 28 on list, 6 missing, 35 items per page dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1764 0 313 91 0 91 91 0 8 0 ffsino 272 1764 0 313 97 0 97 97 0 8 0 nchpl 144 2329 0 672 63 0 63 63 0 8 0 uvmvnodes 80 1985 0 0 41 0 41 41 0 8 0 vnodes 216 1985 0 0 111 0 111 111 0 8 0 namei 1024 8583 0 8583 2 1 1 2 0 8 1 percpumem 16 46 0 3 1 0 1 1 0 8 0 vcpupl 2048 8 0 0 1 0 1 1 0 8 0 vmpool 696 8 0 0 1 0 1 1 0 8 0 kstatmem 264 30 0 6 2 0 2 2 0 8 0 scxspl 216 9295 0 9295 10 2 8 8 1 8 8 plimitpl 152 40 0 24 1 0 1 1 0 8 0 sigapl 424 704 0 654 8 1 7 7 0 8 0 futexpl 64 1991 0 1983 1 0 1 1 0 8 0 knotepl 120 116 0 0 4 0 4 4 0 8 0 kqueuepl 216 45 0 36 1 0 1 1 0 8 0 pipepl 320 292 0 264 8 0 8 8 0 8 5 fdescpl 496 685 0 655 5 1 4 5 0 8 0 filepl 152 3205 0 2956 15 0 15 15 0 8 5 lockfpl 104 75 0 73 1 0 1 1 0 8 0 lockfspl 48 35 0 33 1 0 1 1 0 8 0 sessionpl 144 27 0 10 1 0 1 1 0 8 0 pgrppl 48 27 0 10 1 0 1 1 0 8 0 ucredpl 104 116 0 103 1 0 1 1 0 8 0 zombiepl 144 655 0 654 1 0 1 1 0 8 0 processpl 1072 704 0 654 4 0 4 4 0 8 0 procpl 680 1110 0 1035 8 1 7 7 0 8 0 sockpl 488 509 0 477 12 0 12 12 0 8 8 mcl64k 65536 6 0 0 1 0 1 1 0 8 0 mcl16k 16384 6 0 0 1 0 1 1 0 8 0 mcl12k 12288 2 0 0 1 0 1 1 0 8 0 mcl9k 9216 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 5 0 0 1 0 1 1 0 8 0 mcl4k 4096 7 0 0 1 0 1 1 0 8 0 mcl2k2 2112 1 0 0 1 0 1 1 0 8 0 mcl2k 2048 365 0 0 45 0 45 45 0 8 0 mtagpl 96 36 0 0 1 0 1 1 0 8 0 mbufpl 256 378 0 0 24 0 24 24 0 8 0 bufpl 288 5593 0 141 390 0 390 390 0 8 0 anonpl 24 213821 0 201394 103 2 101 101 0 186 17 amapchunkpl 152 19516 0 18618 39 0 39 39 0 158 3 amappl16 200 5552 0 5202 31 3 28 31 0 8 8 amappl15 192 14 0 14 1 1 0 1 0 8 0 amappl14 184 170 0 157 2 1 1 2 0 8 0 amappl13 176 13 0 13 1 1 0 1 0 8 0 amappl12 168 1403 0 1372 3 1 2 2 0 8 0 amappl11 160 64 0 49 1 0 1 1 0 8 0 amappl10 152 43 0 34 1 0 1 1 0 8 0 amappl9 144 169 0 167 1 0 1 1 0 8 0 amappl8 136 206 0 157 2 0 2 2 0 8 0 amappl7 128 195 0 168 2 0 2 2 0 8 0 amappl6 120 311 0 302 1 0 1 1 0 8 0 amappl5 112 138 0 127 1 0 1 1 0 8 0 amappl4 104 470 0 440 2 1 1 2 0 8 0 amappl3 96 3918 0 3827 3 0 3 3 0 8 0 amappl2 88 1133 0 1055 3 1 2 3 0 8 0 amappl1 80 11077 0 10512 23 10 13 23 0 8 0 amappl 88 5491 0 5249 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 11 0 3 1 0 1 1 0 8 0 uaddrrnd 24 693 0 655 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 693 0 655 1 0 1 1 0 8 0 vmmpekpl 168 12009 0 11951 3 0 3 3 0 8 0 vmmpepl 168 65151 0 62835 117 6 111 117 0 357 8 vmsppl 464 692 0 655 5 0 5 5 0 8 0 rwobjpl 56 24716 0 21278 52 3 49 49 0 8 0 pdppl 4096 1394 0 1318 127 49 78 84 0 8 2 pvpl 32 476187 0 458068 358 30 328 358 0 265 166 pmappl 248 692 0 655 3 0 3 3 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 829 0 53 23 0 23 23 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x1e: addq $0x8,%rsp x86_ipi_db(ffffffff82bfdff0) at x86_ipi_db+0x1e sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 __mp_lock(ffffffff82d80cf8) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff82d80cf8) at __mp_lock+0x122 sys/kern/kern_lock.c:147 softintr_dispatch(0) at softintr_dispatch+0x52 sys/arch/amd64/amd64/softintr.c:88 Xsoftclock() at Xsoftclock+0x27 end of kernel end trace frame: 0x7606d91ecb80, count: 9 ddb{0}> trace x86_ipi_db(ffffffff82bfdff0) at x86_ipi_db+0x1e sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 __mp_lock(ffffffff82d80cf8) at __mp_lock+0x122 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff82d80cf8) at __mp_lock+0x122 sys/kern/kern_lock.c:147 softintr_dispatch(0) at softintr_dispatch+0x52 sys/arch/amd64/amd64/softintr.c:88 Xsoftclock() at Xsoftclock+0x27 end of kernel end trace frame: 0x7606d91ecb80, count: -6 ddb{0}> machine ddbcpu 1 Stopped at db_enter+0x1c: addq $0x8,%rsp db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82813cd5) at panic+0x17b sys/kern/subr_prf.c:198 pool_do_get(ffffffff82d8dbd0,1,ffff80002e429378) at pool_do_get+0x484 sys/kern/subr_pool.c:739 pool_get(ffffffff82d8dbd0,1) at pool_get+0xed sys/kern/subr_pool.c:582 shmget_allocate_segment(ffff8000211da818,ffff80002e429500,1a9,ffff80002e429550) at shmget_allocate_segment+0x15b sys/kern/sysv_shm.c:417 sys_shmget(ffff8000211da818,ffff80002e429500,ffff80002e429550) at sys_shmget+0x13b sys/kern/sysv_shm.c:480 syscall(ffff80002e4295d0) at syscall+0x5e2 mi_syscall sys/sys/syscall_mi.h:110 [inline] syscall(ffff80002e4295d0) at syscall+0x5e2 sys/arch/amd64/amd64/trap.c:623 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x856c12368a0, count: 7 ddb{1}> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82813cd5) at panic+0x17b sys/kern/subr_prf.c:198 pool_do_get(ffffffff82d8dbd0,1,ffff80002e429378) at pool_do_get+0x484 sys/kern/subr_pool.c:739 pool_get(ffffffff82d8dbd0,1) at pool_get+0xed sys/kern/subr_pool.c:582 shmget_allocate_segment(ffff8000211da818,ffff80002e429500,1a9,ffff80002e429550) at shmget_allocate_segment+0x15b sys/kern/sysv_shm.c:417 sys_shmget(ffff8000211da818,ffff80002e429500,ffff80002e429550) at sys_shmget+0x13b sys/kern/sysv_shm.c:480 syscall(ffff80002e4295d0) at syscall+0x5e2 mi_syscall sys/sys/syscall_mi.h:110 [inline] syscall(ffff80002e4295d0) at syscall+0x5e2 sys/arch/amd64/amd64/trap.c:623 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x856c12368a0, count: -8