panic: pool_do_get: shmpl free list modified: page 0xfffffd806b8b4000; item addr 0xfffffd806b8b4690; offset 0x40=0x6894d463 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 164882 41830 32767 0x10 0 1 syz-executor *186179 41830 32767 0x10 0x4000000 0K syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8336356a) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839b6130,1,ffff80003c4c3418) at pool_do_get+0x5df pool_get(ffffffff839b6130,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80002a2e5248,ffff80003c4c3670,0,ffff80003c4c35c0) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80002a2e5248,ffff80003c4c3670,ffff80003c4c35c0) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80003c4c3670) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c4c3670) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6e5aceb8030, 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 0xfffffd806b8b4000; item addr 0xfffffd806b8b4690; offset 0x40=0x6894d463 ddb{0}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8336356a) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839b6130,1,ffff80003c4c3418) at pool_do_get+0x5df pool_get(ffffffff839b6130,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80002a2e5248,ffff80003c4c3670,0,ffff80003c4c35c0) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80002a2e5248,ffff80003c4c3670,ffff80003c4c35c0) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80003c4c3670) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c4c3670) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6e5aceb8030, count: -8 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80003c4c3240 rbx 0xffffffff8383cddf cpu_info_full_primary+0x2ddf rdx 0xffff800001434880 rcx 0xffff80002a2e5248 rax 0xffffffff8383bff0 cpu_info_full_primary+0x1ff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x38139a36fd088714 r11 0xce665083f5cb56e2 r12 0xffffffff8383cbe0 cpu_info_full_primary+0x2be0 r13 0 r14 0 r15 0x1 rip 0xffffffff82f50db5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c4c3230 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor) tid=186179 pid=41830 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=0xffff80002a2e4a80,0xffffffff8399f0b8 process=0xffff80003c478030 user=0xffff80003c4be000, vmspace=0xfffffd800d6ff210 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 20549 511703 87522 32767 2 0x10 syz-executor 20549 293143 87522 32767 3 0x4000090 fsleep syz-executor 41830 164882 75639 32767 7 0x10 syz-executor *41830 186179 75639 32767 7 0x4000010 syz-executor 17503 103423 36815 32767 2 0x10 syz-executor 17503 426914 36815 32767 3 0x4000090 sbwait syz-executor 68026 20127 77092 32767 2 0x10 syz-executor 68026 191807 77092 32767 3 0x4000090 fsleep syz-executor 79430 415156 28104 32767 2 0x10 syz-executor 79430 188584 28104 32767 3 0x4000090 fsleep syz-executor 76530 29572 58782 32767 2 0x10 syz-executor 76530 480143 58782 32767 3 0x4000090 lockf syz-executor 76530 176014 58782 32767 3 0x4000090 fsleep syz-executor 40206 129437 42542 32767 2 0x10 syz-executor 40206 154681 42542 32767 3 0x4000090 kqsel syz-executor 40206 380689 42542 32767 3 0x4000090 kqsel syz-executor 39452 140523 11201 32767 2 0x10 syz-executor 39452 170257 11201 32767 3 0x4000090 msgwait syz-executor 39452 311843 11201 32767 3 0x4000090 msgwait syz-executor 39452 513566 11201 32767 3 0x4000090 fsleep syz-executor 5453 488864 0 0 3 0x14200 bored sosplice 87522 134410 50595 32767 3 0x90 nanoslp syz-executor 75639 252639 55932 32767 3 0x90 nanoslp syz-executor 36815 73696 28625 32767 3 0x90 nanoslp syz-executor 11201 121127 40415 32767 2 0x10 syz-executor 28104 327289 88027 32767 2 0x10 syz-executor 58782 428769 29045 32767 3 0x90 nanoslp syz-executor 77092 161385 52913 32767 2 0x10 syz-executor 42542 275145 55098 32767 3 0x90 nanoslp syz-executor 28625 242947 58041 0 3 0x82 wait syz-executor 40415 211857 58041 0 3 0x82 wait syz-executor 88027 45300 58041 0 3 0x82 wait syz-executor 55098 295550 58041 0 3 0x82 wait syz-executor 52913 378783 58041 0 3 0x82 wait syz-executor 29045 372096 58041 0 3 0x82 wait syz-executor 50595 283595 58041 0 3 0x82 wait syz-executor 55932 420374 58041 0 3 0x82 wait syz-executor 58041 34389 70289 0 3 0x82 kqread syz-executor 70289 227409 6720 0 3 0x10008a sigsusp ksh 6720 255980 62594 0 3 0x98 kqread sshd-session 62594 160591 57123 0 3 0x92 kqread sshd-session 57705 206721 1 0 3 0x100083 ttyin getty 57123 467784 1 0 3 0x88 kqread sshd 16399 298578 40651 73 3 0x1100090 kqread syslogd 40651 352582 1 0 3 0x100082 sbwait syslogd 55004 400547 1 0 3 0x100080 kqread resolvd 9631 46852 8739 77 3 0x100092 kqread dhcpleased 23852 35216 8739 77 3 0x100092 kqread dhcpleased 8739 315751 1 0 3 0x80 kqread dhcpleased 43643 113476 0 0 3 0x14200 bored smr 67984 209186 0 0 2 0x14200 zerothread 82769 136570 0 0 3 0x14200 aiodoned aiodoned 74251 455994 0 0 3 0x14200 syncer update 87280 175428 0 0 3 0x14200 cleaner cleaner 41982 386178 0 0 3 0x14200 reaper reaper 83427 251746 0 0 3 0x14200 pgdaemon pagedaemon 63612 112483 0 0 3 0x14200 bored viomb 48008 49343 0 0 3 0x40014200 acpi0 acpi0 12893 387739 0 0 3 0x40014200 idle1 87732 504227 0 0 3 0x14200 bored softnet7 62020 499897 0 0 3 0x14200 bored softnet6 74942 523054 0 0 3 0x14200 bored softnet5 10205 407554 0 0 3 0x14200 bored softnet4 9586 207197 0 0 3 0x14200 bored softnet3 28252 343564 0 0 3 0x14200 bored softnet2 45743 518536 0 0 3 0x14200 bored softnet1 85401 100776 0 0 3 0x14200 bored softnet0 23213 486331 0 0 3 0x14200 bored systqmp 18413 383809 0 0 3 0x14200 bored systq 29645 424254 0 0 3 0x14200 tmoslp softclockmp 54985 385418 0 0 3 0x40014200 tmoslp softclock 17464 123605 0 0 3 0x40014200 idle0 1 139241 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks CPU 0: exclusive mutex shmpl r = 0 (0xffffffff839b6148) #0 witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5f1 sys/kern/subr_witness.c:1160 #1 mtx_enter_try+0x1ad sys/kern/kern_lock.c:311 #2 mtx_enter+0x62 sys/kern/kern_lock.c:261 #3 pool_get+0x124 sys/kern/subr_pool.c:581 #4 shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 #5 sys_shmget+0x195 sys/kern/sysv_shm.c:482 #6 syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] #6 syscall+0xb17 sys/arch/amd64/amd64/trap.c:748 #7 Xsyscall+0x128 Process 41830 (syz-executor) thread 0xffff80002a2e5248 (186179) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff838c29a8) #0 witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5f1 sys/kern/subr_witness.c:1160 #1 syscall+0xaf4 mi_syscall sys/sys/syscall_mi.h:175 [inline] #1 syscall+0xaf4 sys/arch/amd64/amd64/trap.c:748 #2 Xsyscall+0x128 exclusive mutex shmpl r = 0 (0xffffffff839b6148) #0 witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5f1 sys/kern/subr_witness.c:1160 #1 mtx_enter_try+0x1ad sys/kern/kern_lock.c:311 #2 mtx_enter+0x62 sys/kern/kern_lock.c:261 #3 pool_get+0x124 sys/kern/subr_pool.c:581 #4 shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 #5 sys_shmget+0x195 sys/kern/sysv_shm.c:482 #6 syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] #6 syscall+0xb17 sys/arch/amd64/amd64/trap.c:748 #7 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10222 10960K 10968K 166960K 11302 0 pcb 17 14K 16K 166960K 19 0 rtable 215 6K 6K 166960K 287 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 10 0 counters 68 36K 36K 166960K 68 0 ioctlops 0 0K 2K 166960K 33 0 iov 1 2K 16K 166960K 53 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1334 84K 84K 166960K 1379 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 14 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 22 0 dirhash 12 2K 2K 166960K 30 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 26 97K 121K 166960K 462 0 sigio 0 0K 0K 166960K 20 0 proc 58 99K 147K 166960K 512 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 2 0K 0K 166960K 65 0 in_multi 99 7K 7K 166960K 115 0 ether_multi 1 0K 0K 166960K 4 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 235 1049K 1049K 166960K 235 0 exec 0 0K 1K 166960K 406 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 267 162K 174K 166960K 5883 0 UVM aobj 30 2K 3K 166960K 33 0 pinsyscall 47 94K 111K 166960K 1514 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 2 0K 0K 166960K 32 0 NDP 11 0K 2K 166960K 27 0 temp 51 8645K 8709K 166960K 5552 0 kqueue 15 24K 32K 166960K 89 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 26 0 0 1 0 1 1 0 8 0 rtpcb 120 138 0 134 3 0 3 3 0 8 2 rtentry 176 102 0 3 5 0 5 5 0 8 0 unpcb 144 227 0 208 1 0 1 1 0 8 0 syncache 336 10 0 10 1 0 1 1 0 8 1 tcpcb 736 143 0 136 2 0 2 2 0 8 1 arp 128 13 0 0 1 0 1 1 0 8 0 ipq 40 1 0 0 1 0 1 1 0 8 0 ipqe 40 2 0 1 1 0 1 1 0 8 0 inpcb 328 501 0 487 13 4 9 13 0 8 7 ip6q 72 2 0 0 1 0 1 1 0 8 0 ip6af 40 2 0 0 1 0 1 1 0 8 0 nd6 144 20 0 2 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 468 0 16 30 0 30 30 0 8 0 art_table 40 469 0 16 5 0 5 5 0 8 0 art_node 32 102 0 13 1 0 1 1 0 8 0 sysvmsgpl 40 6 0 4 1 0 1 1 0 8 0 semupl 112 1 0 1 1 0 1 1 0 8 1 semapl 112 19 0 9 1 0 1 1 0 8 0 shmpl 112 30 0 3 1 0 1 1 0 8 0 pool(0xffffffff839b6130:shmpl): page inconsistency: page 0xfffffd806b8b4000; 7 on list, 27 missing, 35 items per page dirhash 1024 29 0 12 3 0 3 3 0 8 0 dino2pl 256 2042 0 536 95 0 95 95 0 8 0 ffsino 296 2042 0 536 117 0 117 117 0 8 0 nchpl 144 2676 0 999 63 0 63 63 0 8 0 uvmvnodes 80 2123 0 0 44 0 44 44 0 8 0 vnodes 216 2123 0 0 118 0 118 118 0 8 0 namei 1024 8606 0 8606 3 0 3 3 0 8 3 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 9245 0 9245 3 2 1 2 1 8 1 plimitpl 152 176 0 151 2 0 2 2 0 8 0 sigapl 424 752 0 691 8 0 8 8 0 8 0 knotepl 120 537 0 0 17 0 17 17 0 8 0 kqueuepl 224 153 0 140 2 0 2 2 0 8 1 pipepl 344 135 0 108 3 0 3 3 0 8 0 fdescpl 528 729 0 691 3 0 3 3 0 8 0 filepl 160 3726 0 3501 15 0 15 15 0 8 4 lockfpl 104 79 0 75 1 0 1 1 0 8 0 lockfspl 48 31 0 28 1 0 1 1 0 8 0 sessionpl 144 27 0 11 1 0 1 1 0 8 0 pgrppl 48 40 0 16 1 0 1 1 0 8 0 ucredpl 104 775 0 756 1 0 1 1 0 8 0 zombiepl 144 691 0 691 1 0 1 1 0 8 1 processpl 1248 752 0 691 7 1 6 6 0 8 0 procpl 664 1318 0 1245 7 0 7 7 0 8 0 sosppl 168 5 0 5 1 0 1 1 0 8 1 sockpl 752 869 0 831 17 6 11 17 0 8 6 mcl64k 65536 4 0 0 1 0 1 1 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 118 0 0 15 0 15 15 0 8 0 mcl2k 2048 23 0 0 3 0 3 3 0 8 0 mtagpl 96 3 0 0 1 0 1 1 0 8 0 mbufpl 256 215 0 0 14 0 14 14 0 8 0 bufpl 280 3411 0 112 236 0 236 236 0 8 0 anonpl 32 7748 0 0 64 1 63 64 0 246 0 amapchunkpl 152 20559 0 19947 38 4 34 34 0 158 9 amappl16 200 2435 0 2408 17 2 15 15 0 8 13 amappl15 192 8 0 8 1 1 0 1 0 8 0 amappl14 184 114 0 104 1 0 1 1 0 8 0 amappl13 176 36 0 36 1 1 0 1 0 8 0 amappl12 168 1347 0 1309 2 0 2 2 0 8 0 amappl11 160 43 0 33 1 0 1 1 0 8 0 amappl10 152 11 0 10 1 0 1 1 0 8 0 amappl9 144 248 0 247 1 0 1 1 0 8 0 amappl8 136 25 0 23 1 0 1 1 0 8 0 amappl7 128 98 0 88 1 0 1 1 0 8 0 amappl6 120 180 0 177 1 0 1 1 0 8 0 amappl5 112 109 0 103 1 0 1 1 0 8 0 amappl4 104 290 0 275 1 0 1 1 0 8 0 amappl3 96 3446 0 3306 4 0 4 4 0 8 0 amappl2 88 659 0 604 2 0 2 2 0 8 0 amappl1 80 10764 0 10184 15 0 15 15 0 8 0 amappl 88 5154 0 4953 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 32 0 3 1 0 1 1 0 8 0 uaddrrnd 24 729 0 691 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 729 0 691 1 0 1 1 0 8 0 vmmpekpl 168 7822 0 7787 2 0 2 2 0 8 0 vmmpepl 168 53635 0 51445 106 0 106 106 0 357 5 vmsppl 488 728 0 691 7 2 5 6 0 8 0 rwobjpl 80 19445 0 16424 66 0 66 66 0 8 1 pdppl 4096 1466 0 1382 116 32 84 98 0 8 0 pvpl 32 16062 0 0 130 0 130 130 0 265 0 pmappl 256 728 0 691 4 1 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 293 0 35 8 0 8 8 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:438 panic(ffffffff8336356a) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839b6130,1,ffff80003c4c3418) at pool_do_get+0x5df pool_get(ffffffff839b6130,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80002a2e5248,ffff80003c4c3670,0,ffff80003c4c35c0) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80002a2e5248,ffff80003c4c3670,ffff80003c4c35c0) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80003c4c3670) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c4c3670) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6e5aceb8030, count: -8 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp x86_ipi_db(ffff8000299edff0) 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 end of kernel end trace frame: 0x766362e7c810, count: 12 ddb{1}> trace x86_ipi_db(ffff8000299edff0) 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 end of kernel end trace frame: 0x766362e7c810, count: -3