panic: pool_do_get: shmpl free list modified: page 0xfffffd805f3a8000; item addr 0xfffffd805f3a8010; offset 0x40=0xfe1ecc88 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 237 29830 0 0 0x4000000 0 syz-executor * 42461 58954 0 0 0x4000000 1K syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff83072b76) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83636800,2,ffff8000371b5838) at pool_do_get+0x5e6 pool_get(ffffffff83636800,2) at pool_get+0x141 shmget_allocate_segment(ffff8000ffffd1c8,ffff8000371b5a90,4c,ffff8000371b59e0) at shmget_allocate_segment+0x1a7 sys_shmget(ffff8000ffffd1c8,ffff8000371b5a90,ffff8000371b59e0) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 syscall(ffff8000371b5a90) at syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:178 [inline] syscall(ffff8000371b5a90) at syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x617515c08e0, 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 0xfffffd805f3a8000; item addr 0xfffffd805f3a8010; offset 0x40=0xfe1ecc88 ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff83072b76) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83636800,2,ffff8000371b5838) at pool_do_get+0x5e6 pool_get(ffffffff83636800,2) at pool_get+0x141 shmget_allocate_segment(ffff8000ffffd1c8,ffff8000371b5a90,4c,ffff8000371b59e0) at shmget_allocate_segment+0x1a7 sys_shmget(ffff8000ffffd1c8,ffff8000371b5a90,ffff8000371b59e0) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 syscall(ffff8000371b5a90) at syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:178 [inline] syscall(ffff8000371b5a90) at syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x617515c08e0, count: -8 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff8000371b5680 rbx 0xffff800029b7cdbf rdx 0xffff8000012900c0 rcx 0xffff8000ffffd1c8 rax 0xffff800029b7bff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x9329b08ddeaecf21 r11 0x3c5feb56d50f4a1b r12 0xffff800029b7cbc0 r13 0 r14 0 r15 0x1 rip 0xffffffff82eab345 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff8000371b5670 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor) tid=42461 pid=58954 tcnt=4 stat=onproc flags process=0 proc=4000000 runpri=32, usrpri=86, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff8000371e6cd0,0xffff80002a03f1e8 process=0xffff8000371a04a8 user=0xffff8000371b0000, vmspace=0xfffffd806c7d1558 estcpu=36, cpticks=2, pctcpu=0.0, user=0, sys=2, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 47928 256295 59295 0 2 0 syz-executor 47928 373912 59295 0 3 0x4000080 fsleep syz-executor 47928 456312 59295 0 3 0x4000080 fsleep syz-executor 4480 146580 89953 0 2 0 syz-executor 4480 30613 89953 0 3 0x4000080 fsleep syz-executor 29830 502435 26655 0 2 0 syz-executor 29830 237 26655 0 7 0x4000000 syz-executor 29830 367793 26655 0 2 0x4000000 syz-executor 58954 480320 51957 0 2 0 syz-executor *58954 42461 51957 0 7 0x4000000 syz-executor 58954 130634 51957 0 2 0x4000000 syz-executor 58954 180032 51957 0 2 0x4000000 syz-executor 35952 367762 59082 0 2 0x480 syz-executor 35952 387663 59082 0 3 0x4000080 sbwait syz-executor 35952 298704 59082 0 3 0x4000080 fsleep syz-executor 20837 225478 70109 0 2 0x480 syz-executor 20837 19414 70109 0 3 0x4000080 sbwait syz-executor 20837 425466 70109 0 3 0x4000080 fsleep syz-executor 71538 340477 0 0 3 0x14200 acct acct 59082 471361 45830 0 2 0x482 syz-executor 89953 46511 45830 0 2 0x482 syz-executor 45101 157915 1 0 3 0x100083 ttyin getty 68975 62710 0 0 3 0x14200 bored sosplice 38800 422495 45830 0 2 0x2 syz-executor 52863 479816 45830 0 2 0x2 syz-executor 70109 484228 45830 0 2 0x482 syz-executor 26655 134438 45830 0 2 0x482 syz-executor 59295 58380 45830 0 2 0x482 syz-executor 51957 146737 45830 0 2 0x482 syz-executor 45830 134902 45092 0 3 0x82 kqread syz-executor 45092 512157 24731 0 3 0x10008a sigsusp ksh 24731 404596 14634 0 3 0x98 kqread sshd-session 14634 355023 16603 0 3 0x92 kqread sshd-session 16603 287679 1 0 3 0x88 kqread sshd 51389 348504 549 74 3 0x1100092 bpf pflogd 549 106977 1 0 3 0x80 sbwait pflogd 55680 93986 12683 73 3 0x1100090 kqread syslogd 12683 408363 1 0 3 0x100082 sbwait syslogd 81897 165501 1 0 3 0x100080 kqread resolvd 64105 176535 6028 77 3 0x100092 kqread dhcpleased 80346 321882 6028 77 3 0x100092 kqread dhcpleased 6028 196040 1 0 3 0x80 kqread dhcpleased 17445 463761 0 0 3 0x14200 bored smr 79822 407096 0 0 2 0x14200 zerothread 80042 112841 0 0 3 0x14200 aiodoned aiodoned 78559 243607 0 0 3 0x14200 syncer update 34560 340049 0 0 3 0x14200 cleaner cleaner 57178 282052 0 0 3 0x14200 reaper reaper 42582 110309 0 0 3 0x14200 pgdaemon pagedaemon 35621 80727 0 0 3 0x14200 bored viomb 28310 147520 0 0 3 0x40014200 acpi0 acpi0 2394 432219 0 0 3 0x40014200 idle1 45996 491377 0 0 3 0x14200 bored softnet3 56499 326270 0 0 3 0x14200 bored softnet2 60862 487408 0 0 3 0x14200 bored softnet1 5420 221799 0 0 3 0x14200 bored softnet0 36043 73548 0 0 3 0x14200 bored systqmp 79387 197224 0 0 3 0x14200 bored systq 64297 235891 0 0 2 0x14200 softclockmp 90820 241304 0 0 2 0x40014200 softclock 35961 518628 0 0 3 0x40014200 idle0 1 31886 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 (0xffffffff83636810) #0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5bb sys/kern/subr_witness.c:1155 #1 mtx_enter_try+0x178 #2 mtx_enter+0x60 sys/kern/kern_lock.c:239 #3 pool_get+0x103 sys/kern/subr_pool.c:579 #4 shmget_allocate_segment+0x1a7 #5 sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 #6 syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:178 [inline] #6 syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 #7 Xsyscall+0x128 Process 58954 (syz-executor) thread 0xffff8000ffffd1c8 (42461) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff835780f8) #0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5bb sys/kern/subr_witness.c:1155 #1 syscall+0xad6 mi_syscall sys/sys/syscall_mi.h:178 [inline] #1 syscall+0xad6 sys/arch/amd64/amd64/trap.c:577 #2 Xsyscall+0x128 exclusive mutex shmpl r = 0 (0xffffffff83636810) #0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5bb sys/kern/subr_witness.c:1155 #1 mtx_enter_try+0x178 #2 mtx_enter+0x60 sys/kern/kern_lock.c:239 #3 pool_get+0x103 sys/kern/subr_pool.c:579 #4 shmget_allocate_segment+0x1a7 #5 sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 #6 syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:178 [inline] #6 syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 #7 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10234 11274K 11584K 166960K 13614 0 pcb 17 17K 19K 166960K 335 0 rtable 231 8K 8K 166960K 738 0 pf 37 18K 19K 166960K 129 0 ifaddr 41 7K 8K 166960K 94 0 ifgroup 55 2K 2K 166960K 140 0 sysctl 4 1K 1K 166960K 6 0 counters 64 36K 36K 166960K 118 0 ioctlops 0 0K 4K 166960K 1763 0 iov 1 16K 16K 166960K 136 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1521 96K 96K 166960K 2880 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 10K 14K 166960K 34 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 62 0 dirhash 12 2K 2K 166960K 60 0 ACPI 1690 195K 286K 166960K 12468 0 file desc 17 61K 93K 166960K 1680 0 sigio 0 0K 0K 166960K 38 0 proc 72 91K 152K 166960K 810 0 subproc 104 6K 6K 166960K 146 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 208 0 in_multi 88 6K 7K 166960K 204 0 ether_multi 1 0K 0K 166960K 7 0 mrt 1 0K 0K 166960K 4 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 241 1076K 1076K 166960K 241 0 exec 0 0K 1K 166960K 754 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 260 74K 88K 166960K 17279 0 UVM aobj 86 5K 7K 166960K 90 0 pinsyscall 42 84K 102K 166960K 2870 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 1K 166960K 171 0 NDP 12 0K 1K 166960K 64 0 temp 76 6828K 6924K 166960K 67108 0 kqueue 14 22K 32K 166960K 305 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 24 0 0 1 0 1 1 0 8 0 rtpcb 120 363 0 293 5 2 3 3 0 8 0 rtentry 112 212 0 108 4 0 4 4 0 8 0 unpcb 144 1380 0 1357 10 4 6 6 0 8 5 syncache 336 10 0 10 5 4 1 1 0 8 1 tcpqe 32 2 0 2 2 1 1 1 0 8 1 tcpcb 808 745 0 739 21 13 8 8 0 8 6 arp 120 38 0 18 1 0 1 1 0 8 0 inpcb 336 2616 0 2605 32 22 10 15 0 8 8 nd6 136 40 0 16 1 0 1 1 0 8 0 pkpcb 40 38 0 38 1 0 1 1 0 8 1 kcovpl 48 11 0 3 1 0 1 1 0 8 0 ppxss 1168 17 0 17 3 2 1 1 0 8 1 pfstscr 40 10 0 8 1 0 1 1 0 8 0 pffrag 232 8 0 3 2 1 1 1 0 482 0 pffrnode 88 8 0 3 2 1 1 1 0 8 0 pffrent 40 85 0 80 2 1 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 pftag 88 1 0 0 1 0 1 1 0 8 0 pfstitem 24 128 0 34 1 0 1 1 0 8 0 pfstkey 128 133 0 34 4 0 4 4 0 8 0 pfstate 376 126 0 34 10 0 10 10 0 8 0 pfrule 1344 27 0 18 2 0 2 2 0 8 0 art_heap8 4096 3 0 0 3 0 3 3 0 8 0 art_heap4 256 803 0 390 32 6 26 30 0 8 0 art_table 32 806 0 390 4 0 4 4 0 8 0 art_node 16 203 0 112 1 0 1 1 0 8 0 sysvmsgpl 40 12 0 8 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 58 0 48 1 0 1 1 0 8 0 shmpl 112 87 0 4 3 0 3 3 0 8 0 pool(0xffffffff83636800:shmpl): page inconsistency: page 0xfffffd805f3a8000; 21 on list, 13 missing, 35 items per page dirhash 1024 49 0 32 3 0 3 3 0 8 0 dino2pl 256 4379 0 2868 95 0 95 95 0 8 0 ffsino 272 4379 0 2868 102 0 102 102 0 8 0 nchpl 144 6764 0 5072 64 0 64 64 0 8 0 uvmvnodes 80 5432 0 0 111 0 111 111 0 8 0 vnodes 216 5432 0 0 302 0 302 302 0 8 0 namei 1024 23966 0 23966 4 3 1 1 0 8 1 percpumem 16 73 0 27 1 0 1 1 0 8 0 kstatmem 264 78 0 54 2 0 2 2 0 8 0 scsiplug 72 9 0 9 3 2 1 1 0 8 1 scxspl 216 19597 0 19597 14 11 3 8 1 8 3 plimitpl 152 530 0 511 1 0 1 1 0 8 0 sigapl 424 1984 0 1933 7 1 6 7 0 8 0 futexpl 64 23861 0 23856 1 0 1 1 0 8 0 knotepl 120 584 0 0 18 0 18 18 0 8 0 kqueuepl 216 763 0 752 17 13 4 8 0 8 3 pipepl 320 294 0 265 5 2 3 5 0 8 0 fdescpl 496 1963 0 1932 5 0 5 5 0 8 0 filepl 152 14813 0 14488 33 12 21 24 0 8 7 lockfpl 104 659 0 656 2 0 2 2 0 8 1 lockfspl 48 203 0 200 1 0 1 1 0 8 0 sessionpl 144 34 0 25 1 0 1 1 0 8 0 pgrppl 48 60 0 43 1 0 1 1 0 8 0 ucredpl 104 2357 0 2343 1 0 1 1 0 8 0 zombiepl 144 1934 0 1933 2 1 1 1 0 8 0 processpl 1160 1984 0 1933 5 1 4 5 0 8 0 procpl 648 4425 0 4362 6 0 6 6 0 8 0 srpgc 96 7 0 7 3 3 0 1 0 8 0 sosppl 168 4 0 4 2 1 1 1 0 8 1 sockpl 664 4428 0 4324 46 33 13 21 0 8 4 mcl64k 65536 3 0 0 1 0 1 1 0 8 0 mcl16k 16384 1 0 0 1 0 1 1 0 8 0 mcl12k 12288 1 0 0 1 0 1 1 0 8 0 mcl9k 9216 2 0 0 1 0 1 1 0 8 0 mcl8k 8192 6 0 0 1 0 1 1 0 8 0 mcl4k 4096 152 0 0 19 0 19 19 0 8 0 mcl2k 2048 30 0 0 3 0 3 3 0 8 0 mtagpl 96 55 0 0 2 0 2 2 0 8 0 mbufpl 256 1526 0 0 94 0 94 94 0 8 0 bufpl 280 6210 0 137 434 0 434 434 0 8 0 anonpl 24 361725 0 355789 104 24 80 83 0 185 33 amapchunkpl 152 57998 0 57352 46 11 35 35 0 158 8 amappl16 200 9669 0 9574 46 29 17 29 0 8 8 amappl15 192 43 0 43 1 1 0 1 0 8 0 amappl14 184 139 0 127 1 0 1 1 0 8 0 amappl13 176 13 0 12 1 0 1 1 0 8 0 amappl12 168 2668 0 2637 4 2 2 3 0 8 0 amappl11 160 62 0 48 1 0 1 1 0 8 0 amappl10 152 54 0 54 1 1 0 1 0 8 0 amappl9 144 148 0 146 1 0 1 1 0 8 0 amappl8 136 29 0 26 1 0 1 1 0 8 0 amappl7 128 129 0 117 1 0 1 1 0 8 0 amappl6 120 203 0 202 1 0 1 1 0 8 0 amappl5 112 165 0 153 1 0 1 1 0 8 0 amappl4 104 352 0 331 1 0 1 1 0 8 0 amappl3 96 10505 0 10398 3 0 3 3 0 8 0 amappl2 88 2350 0 2264 3 0 3 3 0 8 0 amappl1 80 14165 0 13606 14 0 14 14 0 8 0 amappl 88 16690 0 16493 5 0 5 5 0 92 0 dma16384 16384 1 0 1 1 1 0 1 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 7 0 7 2 2 0 1 0 8 0 dma128 128 257 0 257 4 3 1 1 0 8 1 dma64 64 7 0 7 2 1 1 1 0 8 1 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 89 0 4 2 0 2 2 0 8 0 uaddrrnd 24 1964 0 1933 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1964 0 1933 1 0 1 1 0 8 0 vmmpekpl 168 16520 0 16472 3 0 3 3 0 8 0 vmmpepl 168 129015 0 127049 119 14 105 108 0 357 12 vmsppl 448 1963 0 1933 6 2 4 5 0 8 0 rwobjpl 56 43408 0 36863 94 1 93 93 0 8 0 pdppl 4096 3935 0 3866 111 40 71 85 0 8 2 pvpl 32 20452 0 0 167 2 165 165 0 265 0 pmappl 248 1963 0 1933 3 0 3 3 0 8 0 extentpl 40 55 0 38 1 0 1 1 0 8 0 phpool 112 541 0 96 13 0 13 13 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp x86_ipi_db(ffffffff83421ff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xd9 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 __sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc sys_kevent(ffff8000371e62b0,ffff80002d97abb0,ffff80002d97ab00) at sys_kevent+0x3da sys/kern/kern_event.c:1142 syscall(ffff80002d97abb0) at syscall+0xbb6 mi_syscall sys/sys/syscall_mi.h:178 [inline] syscall(ffff80002d97abb0) at syscall+0xbb6 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xe06fd7b0e50, count: 8 ddb{0}> trace x86_ipi_db(ffffffff83421ff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xd9 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 __sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc sys_kevent(ffff8000371e62b0,ffff80002d97abb0,ffff80002d97ab00) at sys_kevent+0x3da sys/kern/kern_event.c:1142 syscall(ffff80002d97abb0) at syscall+0xbb6 mi_syscall sys/sys/syscall_mi.h:178 [inline] syscall(ffff80002d97abb0) at syscall+0xbb6 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xe06fd7b0e50, 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:437 panic(ffffffff83072b76) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83636800,2,ffff8000371b5838) at pool_do_get+0x5e6 pool_get(ffffffff83636800,2) at pool_get+0x141 shmget_allocate_segment(ffff8000ffffd1c8,ffff8000371b5a90,4c,ffff8000371b59e0) at shmget_allocate_segment+0x1a7 sys_shmget(ffff8000ffffd1c8,ffff8000371b5a90,ffff8000371b59e0) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 syscall(ffff8000371b5a90) at syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:178 [inline] syscall(ffff8000371b5a90) at syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x617515c08e0, count: 7 ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff83072b76) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83636800,2,ffff8000371b5838) at pool_do_get+0x5e6 pool_get(ffffffff83636800,2) at pool_get+0x141 shmget_allocate_segment(ffff8000ffffd1c8,ffff8000371b5a90,4c,ffff8000371b59e0) at shmget_allocate_segment+0x1a7 sys_shmget(ffff8000ffffd1c8,ffff8000371b5a90,ffff8000371b59e0) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 syscall(ffff8000371b5a90) at syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:178 [inline] syscall(ffff8000371b5a90) at syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x617515c08e0, count: -8