panic: pool_do_get: shmpl free list modified: page 0xfffffd80655df000; item addr 0xfffffd80655dfd90; offset 0x2c=0xdeaf4151 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *122981 69656 32767 0x8000010 0x4000000 0K syz-executor 180638 63793 0 0x14000 0x200 1 reaper db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8305c443) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83540bd8,1,ffff80003721b468) at pool_do_get+0x5e6 pool_get(ffffffff83540bd8,1) at pool_get+0x141 shmget_allocate_segment(ffff80003379dbf8,ffff80003721b6c0,0,ffff80003721b610) at shmget_allocate_segment+0x1a7 sys_shmget(ffff80003379dbf8,ffff80003721b6c0,ffff80003721b610) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:480 syscall(ffff80003721b6c0) at syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:179 [inline] syscall(ffff80003721b6c0) at syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x2f1675a0d40, 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 0xfffffd80655df000; item addr 0xfffffd80655dfd90; offset 0x2c=0xdeaf4151 ddb{0}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8305c443) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83540bd8,1,ffff80003721b468) at pool_do_get+0x5e6 pool_get(ffffffff83540bd8,1) at pool_get+0x141 shmget_allocate_segment(ffff80003379dbf8,ffff80003721b6c0,0,ffff80003721b610) at shmget_allocate_segment+0x1a7 sys_shmget(ffff80003379dbf8,ffff80003721b6c0,ffff80003721b610) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:480 syscall(ffff80003721b6c0) at syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:179 [inline] syscall(ffff80003721b6c0) at syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x2f1675a0d40, count: -8 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80003721b2b0 rbx 0xffffffff83434d87 cpu_info_full_primary+0x2d87 rdx 0 rcx 0xffff80003379dbf8 rax 0xffffffff83433ff0 cpu_info_full_primary+0x1ff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x9d7ea223ca916a52 r11 0x94ab387073aa596d r12 0xffffffff83434b88 cpu_info_full_primary+0x2b88 r13 0 r14 0 r15 0x1 rip 0xffffffff811736b5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003721b2a0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor) tid=122981 pid=69656 tcnt=3 stat=onproc flags process=8000010 proc=4000000 runpri=32, usrpri=50, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80003379d460,0xffffffff835c4870 process=0xffff8000371d31f8 user=0xffff800037216000, vmspace=0xfffffd806c1e0540 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 69656 84370 81377 32767 2 0x8000010 syz-executor 69656 178545 81377 32767 3 0xc000090 kqsel syz-executor *69656 122981 81377 32767 7 0xc000010 syz-executor 77371 228483 9493 32767 2 0x8000010 syz-executor 77371 512983 9493 32767 3 0xc000090 fsleep syz-executor 71851 227511 34323 32767 2 0x8000010 syz-executor 71851 380267 34323 32767 3 0xc000090 fsleep syz-executor 32194 395045 4426 32767 2 0x8000010 syz-executor 32194 330308 4426 32767 3 0xc000090 fsleep syz-executor 32194 257109 4426 32767 3 0xc000090 fsleep syz-executor 32194 459094 4426 32767 3 0xc000090 fsleep syz-executor 95903 244995 65397 32767 3 0x8000090 nanoslp syz-executor 95903 352673 65397 32767 3 0xc000090 fifor syz-executor 95903 306657 65397 32767 3 0xc000090 fsleep syz-executor 95903 432939 65397 32767 3 0xc000090 fsleep syz-executor 26683 423029 79404 32767 3 0x8000090 nanoslp syz-executor 26683 392374 79404 32767 3 0xc000090 fsleep syz-executor 26683 488760 79404 32767 3 0xc000090 fsleep syz-executor 26683 313394 79404 32767 3 0xc000090 msgwait syz-executor 26683 277761 79404 32767 3 0xc000090 fsleep syz-executor 89401 316772 0 0 3 0x14200 bored sosplice 77451 449864 5723 0 3 0x8000080 wait syz-executor 65397 181692 7373 32767 3 0x8000090 nanoslp syz-executor 34323 137977 30942 32767 3 0x8000090 nanoslp syz-executor 9493 253009 11205 32767 3 0x8000090 nanoslp syz-executor 79404 436523 54855 32767 3 0x8000090 nanoslp syz-executor 22099 24522 93630 32767 3 0x8000090 nanoslp syz-executor 81377 399427 84267 32767 3 0x8000090 nanoslp syz-executor 4426 518340 59494 32767 3 0x8000090 nanoslp syz-executor 7373 479240 12907 0 3 0x8000082 wait syz-executor 11205 451066 12907 0 3 0x8000082 wait syz-executor 30942 417224 12907 0 3 0x8000082 wait syz-executor 5723 296895 12907 0 3 0x8000082 wait syz-executor 54855 16371 12907 0 3 0x8000082 wait syz-executor 93630 227271 12907 0 3 0x8000082 wait syz-executor 59494 268827 12907 0 3 0x8000082 wait syz-executor 84267 407478 12907 0 3 0x8000082 wait syz-executor 12907 262055 44422 0 3 0x8000082 kqread syz-executor 44422 312562 11481 0 3 0x810008a sigsusp ksh 11481 358087 49484 0 3 0x18000098 kqread sshd-session 49484 113073 36020 0 3 0x18000092 kqread sshd-session 78969 381152 1 0 3 0x18100083 ttyin getty 36020 303302 1 0 3 0x18000088 kqread sshd 67316 155891 84000 73 3 0x19100090 kqread syslogd 84000 30593 1 0 3 0x18100082 sbwait syslogd 91213 223044 1 0 3 0x18100080 kqread resolvd 93563 1542 40167 77 3 0x18100092 kqread dhcpleased 19402 191565 40167 77 3 0x18100092 kqread dhcpleased 40167 288847 1 0 3 0x18000080 kqread dhcpleased 18769 313848 0 0 3 0x14200 bored smr 75848 139061 0 0 2 0x14200 zerothread 39027 1050 0 0 3 0x14200 aiodoned aiodoned 71370 335190 0 0 3 0x14200 syncer update 49713 50315 0 0 3 0x14200 cleaner cleaner 63793 180638 0 0 7 0x14200 reaper 57022 447139 0 0 3 0x14200 pgdaemon pagedaemon 95896 468425 0 0 3 0x14200 bored viomb 41680 521058 0 0 3 0x40014200 acpi0 acpi0 42151 320872 0 0 3 0x40014200 idle1 6561 367533 0 0 3 0x14200 bored softnet3 20818 90614 0 0 3 0x14200 bored softnet2 60145 198242 0 0 3 0x14200 bored softnet1 96734 161261 0 0 3 0x14200 bored softnet0 27094 260646 0 0 3 0x14200 bored systqmp 1388 110495 0 0 3 0x14200 bored systq 38061 473593 0 0 3 0x14200 tmoslp softclockmp 25580 379652 0 0 3 0x40014200 tmoslp softclock 75493 466736 0 0 3 0x40014200 idle0 1 234636 0 0 3 0x8000082 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks CPU 0: exclusive mutex shmpl r = 0 (0xffffffff83540be8) #0 witness_lock+0x5b8 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5b8 sys/kern/subr_witness.c:1151 #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:480 #6 syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:179 [inline] #6 syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 #7 Xsyscall+0x128 CPU 1: exclusive mutex &uvm.pageqlock r = 0 (0xffffffff835c68a0) #0 witness_lock+0x5b8 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5b8 sys/kern/subr_witness.c:1151 #1 mtx_enter_try+0x178 #2 mtx_enter+0x60 sys/kern/kern_lock.c:239 #3 uvm_anfree_list+0xeb sys/uvm/uvm_anon.c:104 #4 amap_wipeout+0x248 sys/uvm/uvm_amap.c:502 #5 uvm_unmap_detach+0x8a sys/uvm/uvm_map.c:1353 #6 uvm_map_teardown+0x35e sys/uvm/uvm_map.c:2518 #7 uvmspace_free+0xcd sys/uvm/uvm_map.c:3422 #8 reaper+0x246 sys/kern/kern_exit.c:481 #9 proc_trampoline+0x10 Process 69656 (syz-executor) thread 0xffff80003379dbf8 (122981) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff83578348) #0 witness_lock+0x5b8 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5b8 sys/kern/subr_witness.c:1151 #1 syscall+0xad6 mi_syscall sys/sys/syscall_mi.h:179 [inline] #1 syscall+0xad6 sys/arch/amd64/amd64/trap.c:577 #2 Xsyscall+0x128 exclusive mutex shmpl r = 0 (0xffffffff83540be8) #0 witness_lock+0x5b8 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5b8 sys/kern/subr_witness.c:1151 #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:480 #6 syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:179 [inline] #6 syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 #7 Xsyscall+0x128 Process 63793 (reaper) thread 0xffff800029fd87a0 (180638) uvm_fault(0xfffffd806c1e0540, 0x0, 0, 1) -> e kernel: page fault trap, code=0 Faulted in DDB; continuing... ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10185 10088K 10100K 166960K 11263 0 pcb 17 12K 12K 166960K 17 0 rtable 234 6K 6K 166960K 342 0 pf 31 16K 16K 166960K 31 0 ifaddr 42 7K 7K 166960K 44 0 ifgroup 50 2K 2K 166960K 50 0 counters 64 36K 36K 166960K 64 0 ioctlops 0 0K 2K 166960K 30 0 iov 0 0K 4K 166960K 2 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1364 86K 86K 166960K 1420 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 3 0 VM map 2 1K 1K 166960K 2 0 sem 7 0K 0K 166960K 8 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1697 195K 286K 166960K 12548 0 file desc 25 93K 121K 166960K 172 0 sigio 0 0K 0K 166960K 1 0 proc 56 78K 127K 166960K 480 0 subproc 104 6K 6K 166960K 104 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 2 0K 0K 166960K 9 0 in_multi 100 7K 7K 166960K 105 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 85 387K 387K 166960K 85 0 exec 0 0K 1K 166960K 336 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 276 74K 78K 166960K 2907 0 UVM aobj 4 2K 2K 166960K 5 0 pinsyscall 46 92K 113K 166960K 1150 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 1 0 NDP 13 0K 1K 166960K 27 0 temp 44 6811K 6875K 166960K 3689 0 kqueue 13 20K 24K 166960K 32 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 24 0 0 1 0 1 1 0 8 0 rtpcb 120 35 0 32 1 0 1 1 0 8 0 rtentry 112 111 0 1 4 0 4 4 0 8 0 unpcb 144 75 0 49 1 0 1 1 0 8 0 syncache 336 3 0 3 1 0 1 1 0 8 1 tcpcb 808 25 0 16 1 0 1 1 0 8 0 arp 120 19 0 0 1 0 1 1 0 8 0 inpcb 336 105 0 85 2 0 2 2 0 8 0 nd6 136 23 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 453 0 0 29 0 29 29 0 8 0 art_table 32 454 0 0 4 0 4 4 0 8 0 art_node 16 110 0 10 1 0 1 1 0 8 0 sysvmsgpl 40 3 0 3 1 0 1 1 0 8 1 semupl 112 2 0 2 1 0 1 1 0 8 1 semapl 112 5 0 0 1 0 1 1 0 8 0 shmpl 112 2 0 1 1 0 1 1 0 8 0 pool(0xffffffff83540bd8:shmpl): page inconsistency: page 0xfffffd80655df000; 33 on list, 1 missing, 35 items per page dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1628 0 126 94 0 94 94 0 8 0 ffsino 272 1628 0 126 101 0 101 101 0 8 0 nchpl 144 1852 0 175 63 0 63 63 0 8 0 uvmvnodes 80 1741 0 0 36 0 36 36 0 8 0 vnodes 216 1741 0 0 97 0 97 97 0 8 0 namei 1024 5564 0 5564 1 0 1 1 0 8 1 percpumem 16 46 0 0 1 0 1 1 0 8 0 kstatmem 264 22 0 0 2 0 2 2 0 8 0 scxspl 216 5307 0 5307 3 1 2 2 1 8 2 plimitpl 152 44 0 20 2 0 2 2 0 8 1 sigapl 424 443 0 386 7 0 7 7 0 8 0 futexpl 64 784 0 774 1 0 1 1 0 8 0 knotepl 120 67 0 0 3 0 3 3 0 8 0 kqueuepl 216 39 0 29 1 0 1 1 0 8 0 pipepl 320 101 0 74 3 0 3 3 0 8 0 fdescpl 496 424 0 387 7 1 6 6 0 8 0 filepl 152 1655 0 1390 12 0 12 12 0 8 1 lockfpl 104 18 0 16 1 0 1 1 0 8 0 lockfspl 48 9 0 7 1 0 1 1 0 8 0 sessionpl 144 21 0 5 1 0 1 1 0 8 0 pgrppl 48 30 0 6 1 0 1 1 0 8 0 ucredpl 104 261 0 243 1 0 1 1 0 8 0 zombiepl 144 388 0 386 1 0 1 1 0 8 0 processpl 1160 443 0 386 5 0 5 5 0 8 0 procpl 648 513 0 442 7 0 7 7 0 8 0 sockpl 664 215 0 167 5 0 5 5 0 8 0 mcl64k 65536 2 0 0 1 0 1 1 0 8 0 mcl8k 8192 2 0 0 1 0 1 1 0 8 0 mcl4k 4096 1 0 0 1 0 1 1 0 8 0 mcl2k 2048 228 0 0 29 0 29 29 0 8 0 mtagpl 96 2 0 0 1 0 1 1 0 8 0 mbufpl 256 278 0 0 18 0 18 18 0 8 0 bufpl 280 2190 0 90 150 0 150 150 0 8 0 anonpl 24 134595 0 131103 45 0 45 45 0 185 22 amapchunkpl 152 9403 0 8765 25 0 25 25 0 158 0 amappl16 200 3601 0 3587 14 0 14 14 0 8 12 amappl15 192 11 0 11 1 0 1 1 0 8 1 amappl14 184 107 0 97 1 0 1 1 0 8 0 amappl13 176 3 0 3 1 0 1 1 0 8 1 amappl12 168 1028 0 991 2 0 2 2 0 8 0 amappl11 160 49 0 39 1 0 1 1 0 8 0 amappl10 152 26 0 26 1 0 1 1 0 8 1 amappl9 144 132 0 132 1 1 0 1 0 8 0 amappl8 136 22 0 21 1 0 1 1 0 8 0 amappl7 128 92 0 82 1 0 1 1 0 8 0 amappl6 120 155 0 154 1 0 1 1 0 8 0 amappl5 112 126 0 118 1 0 1 1 0 8 0 amappl4 104 270 0 257 1 0 1 1 0 8 0 amappl3 96 1891 0 1744 4 0 4 4 0 8 0 amappl2 88 567 0 512 2 0 2 2 0 8 0 amappl1 80 7421 0 6863 14 1 13 13 0 8 0 amappl 88 2580 0 2359 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 4 0 1 1 0 1 1 0 8 0 uaddrrnd 24 424 0 387 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 424 0 387 1 0 1 1 0 8 0 vmmpekpl 168 5419 0 5374 3 0 3 3 0 8 0 vmmpepl 168 34614 0 32554 100 0 100 100 0 357 9 vmsppl 440 423 0 386 5 0 5 5 0 8 0 rwobjpl 56 15785 0 13152 40 0 40 40 0 8 2 pdppl 4096 855 0 772 109 18 91 95 0 8 8 pvpl 32 14111 0 0 114 0 114 114 0 265 0 pmappl 248 423 0 386 4 1 3 3 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 395 0 20 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:437 panic(ffffffff8305c443) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83540bd8,1,ffff80003721b468) at pool_do_get+0x5e6 pool_get(ffffffff83540bd8,1) at pool_get+0x141 shmget_allocate_segment(ffff80003379dbf8,ffff80003721b6c0,0,ffff80003721b610) at shmget_allocate_segment+0x1a7 sys_shmget(ffff80003379dbf8,ffff80003721b6c0,ffff80003721b610) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:480 syscall(ffff80003721b6c0) at syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:179 [inline] syscall(ffff80003721b6c0) at syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x2f1675a0d40, count: -8 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp x86_ipi_db(ffff800029b7bff0) 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 __mp_lock(ffffffff83578140) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:113 [inline] __mp_lock(ffffffff83578140) at __mp_lock+0x192 sys/kern/kern_lock.c:144 uvn_detach(fffffd807ec0b190) at uvn_detach+0x28 sys/uvm/uvm_vnode.c:310 uvm_unmap_detach(ffff800029fe5230,0) at uvm_unmap_detach+0x15e sys/uvm/uvm_map.c:1364 uvm_map_teardown(fffffd806c107a50) at uvm_map_teardown+0x35e sys/uvm/uvm_map.c:2518 uvmspace_free(fffffd806c107a50) at uvmspace_free+0xcd sys/uvm/uvm_map.c:3422 reaper(ffff800029fd87a0) at reaper+0x246 sys/kern/kern_exit.c:481 end trace frame: 0x0, count: 6 ddb{1}> trace x86_ipi_db(ffff800029b7bff0) 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 __mp_lock(ffffffff83578140) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:113 [inline] __mp_lock(ffffffff83578140) at __mp_lock+0x192 sys/kern/kern_lock.c:144 uvn_detach(fffffd807ec0b190) at uvn_detach+0x28 sys/uvm/uvm_vnode.c:310 uvm_unmap_detach(ffff800029fe5230,0) at uvm_unmap_detach+0x15e sys/uvm/uvm_map.c:1364 uvm_map_teardown(fffffd806c107a50) at uvm_map_teardown+0x35e sys/uvm/uvm_map.c:2518 uvmspace_free(fffffd806c107a50) at uvmspace_free+0xcd sys/uvm/uvm_map.c:3422 reaper(ffff800029fd87a0) at reaper+0x246 sys/kern/kern_exit.c:481 end trace frame: 0x0, count: -9