panic: pool_do_get: shmpl free list modified: page 0xfffffd8065b4f000; item addr 0xfffffd8065b4f540; offset 0x40=0x689b9b64 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 294490 83081 32767 0x10 0 0 syz-executor *500810 83081 32767 0x10 0x4000000 1K syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8336b25e) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839735d8,1,ffff8000384375f8) at pool_do_get+0x5df pool_get(ffffffff839735d8,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80002a2c2a80,ffff800038437850,0,ffff8000384377a0) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80002a2c2a80,ffff800038437850,ffff8000384377a0) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff800038437850) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff800038437850) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6ace2bf1e20, 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 0xfffffd8065b4f000; item addr 0xfffffd8065b4f540; offset 0x40=0x689b9b64 ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8336b25e) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839735d8,1,ffff8000384375f8) at pool_do_get+0x5df pool_get(ffffffff839735d8,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80002a2c2a80,ffff800038437850,0,ffff8000384377a0) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80002a2c2a80,ffff800038437850,ffff8000384377a0) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff800038437850) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff800038437850) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6ace2bf1e20, count: -8 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800038437420 rbx 0xffff8000299eeddf rdx 0xffff80000145c800 rcx 0xffff80002a2c2a80 rax 0xffff8000299edff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x1e2e438523c29a7f r11 0xebba95a5f0b4471d r12 0xffff8000299eebe0 r13 0 r14 0 r15 0x1 rip 0xffffffff827de6c5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff800038437410 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor) tid=500810 pid=83081 tcnt=2 stat=onproc flags process=10 proc=4000000 runpri=71, usrpri=71, slppri=16, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a2c27e8,0xffffffff83936808 process=0xffff80003bc4c510 user=0xffff800038432000, vmspace=0xfffffd800e6f15e0 estcpu=21, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 69427 7608 95497 32767 2 0x10 syz-executor 69427 172366 95497 32767 3 0x4000090 pipewr syz-executor 69427 393261 95497 32767 2 0x4000010 syz-executor 83081 294490 7300 32767 7 0x10 syz-executor *83081 500810 7300 32767 7 0x4000010 syz-executor 54903 44007 70546 32767 2 0x10 syz-executor 37400 336335 33415 32767 2 0x10 syz-executor 37400 276 33415 32767 3 0x4000090 fsleep syz-executor 37400 98605 33415 32767 2 0x4000010 syz-executor 97569 94253 82808 32767 3 0x90 nanoslp syz-executor 97569 472982 82808 32767 3 0x4000090 ttyout syz-executor 97569 425884 82808 32767 3 0x4000090 fsleep syz-executor 97569 193736 82808 32767 3 0x4000090 fsleep syz-executor 51761 219134 21395 0 3 0x82 sbwait sshd-session 83840 433060 0 0 3 0x14200 bored sosplice 37280 200793 67714 32767 3 0x90 piperd syz-executor 5486 374730 81660 32767 3 0x90 piperd syz-executor 70546 317558 54272 32767 3 0x90 nanoslp syz-executor 7300 387185 64087 32767 3 0x90 nanoslp syz-executor 95497 377449 84003 32767 3 0x90 nanoslp syz-executor 82808 265521 81647 32767 3 0x90 nanoslp syz-executor 33415 357655 52077 32767 3 0x90 nanoslp syz-executor 67714 450162 21700 0 3 0x82 wait syz-executor 64087 332119 21700 0 3 0x82 wait syz-executor 54272 189313 21700 0 3 0x82 wait syz-executor 81660 298008 21700 0 3 0x82 wait syz-executor 52077 200221 21700 0 3 0x82 wait syz-executor 84003 93407 21700 0 3 0x82 wait syz-executor 81647 334032 21700 0 3 0x82 wait syz-executor 21700 23444 51908 0 2 0x10000002 syz-executor 51908 213716 34874 0 3 0x10008a sigsusp ksh 34874 433975 26376 0 3 0x98 kqread sshd-session 26376 222911 21395 0 3 0x92 kqread sshd-session 606 393121 1 0 3 0x100083 ttyin getty 21395 278273 1 0 3 0x88 kqread sshd 23061 45903 69098 73 3 0x1100090 kqread syslogd 69098 23852 1 0 3 0x100082 sbwait syslogd 37100 45216 1 0 3 0x100080 kqread resolvd 62772 209018 56483 77 3 0x100092 kqread dhcpleased 26055 397388 56483 77 3 0x100092 kqread dhcpleased 56483 522219 1 0 3 0x80 kqread dhcpleased 81603 176910 0 0 3 0x14200 bored smr 34431 100855 0 0 2 0x14200 zerothread 31174 382575 0 0 3 0x14200 aiodoned aiodoned 49592 253696 0 0 3 0x14200 syncer update 68292 236619 0 0 3 0x14200 cleaner cleaner 47934 239663 0 0 3 0x14200 reaper reaper 1799 134121 0 0 3 0x14200 pgdaemon pagedaemon 18595 62291 0 0 3 0x14200 bored viomb 9497 332112 0 0 3 0x40014200 acpi0 acpi0 52739 171754 0 0 3 0x40014200 idle1 11525 84197 0 0 3 0x14200 bored softnet7 34596 7634 0 0 3 0x14200 bored softnet6 45705 91377 0 0 3 0x14200 bored softnet5 90989 299859 0 0 3 0x14200 bored softnet4 14431 506206 0 0 3 0x14200 bored softnet3 43689 5022 0 0 3 0x14200 bored softnet2 52073 430578 0 0 3 0x14200 bored softnet1 89545 235589 0 0 3 0x14200 bored softnet0 6901 208937 0 0 3 0x14200 bored systqmp 39547 141591 0 0 3 0x14200 bored systq 38143 126676 0 0 3 0x14200 tmoslp softclockmp 3960 430178 0 0 3 0x40014200 tmoslp softclock 43819 180368 0 0 3 0x40014200 idle0 1 431302 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 (0xffffffff839735f0) #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 83081 (syz-executor) thread 0xffff80002a2c2a80 (500810) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff8394a030) #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 (0xffffffff839735f0) #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{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10193 10954K 10968K 166960K 11274 0 pcb 17 12K 12K 166960K 17 0 rtable 191 5K 5K 166960K 262 0 pf 29 16K 16K 166960K 31 0 ifaddr 38 6K 7K 166960K 44 0 ifgroup 46 2K 2K 166960K 50 0 sysctl 1 1K 9K 166960K 5 0 counters 66 36K 36K 166960K 68 0 ioctlops 0 0K 2K 166960K 65 0 iov 0 0K 16K 166960K 12 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1335 84K 84K 166960K 1503 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 11 0 VM map 2 1K 1K 166960K 2 0 sem 10 0K 0K 166960K 10 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 21 77K 117K 166960K 371 0 sigio 0 0K 0K 166960K 3 0 proc 58 99K 147K 166960K 488 0 subproc 63 3K 4K 166960K 216 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 31 0 in_multi 88 6K 6K 166960K 105 0 ether_multi 1 0K 0K 166960K 4 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 79 360K 360K 166960K 79 0 exec 0 0K 1K 166960K 435 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 228 159K 197K 166960K 4417 0 UVM aobj 15 2K 3K 166960K 17 0 pinsyscall 44 88K 108K 166960K 1388 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 14 0 NDP 10 0K 1K 166960K 27 0 temp 70 8651K 8716K 166960K 4670 0 kqueue 13 20K 24K 166960K 56 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 46 0 42 1 0 1 1 0 8 0 rtentry 176 99 0 12 5 0 5 5 0 8 0 unpcb 144 122 0 105 1 0 1 1 0 8 0 syncache 336 8 0 8 1 0 1 1 0 8 1 tcpqe 32 1 0 1 1 1 0 1 0 8 0 tcpcb 736 96 0 89 2 0 2 2 0 8 1 arp 128 11 0 1 1 0 1 1 0 8 0 ipq 40 3 0 1 1 0 1 1 0 8 0 ipqe 40 6 0 3 1 0 1 1 0 8 0 inpcb 328 224 0 214 2 0 2 2 0 8 0 ip6q 72 2 0 1 1 0 1 1 0 8 0 ip6af 40 3 0 3 1 0 1 1 0 8 1 nd6 144 19 0 4 1 0 1 1 0 8 0 kcovpl 48 24 0 17 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 442 0 45 25 0 25 25 0 8 0 art_table 40 443 0 45 5 0 5 5 0 8 0 art_node 32 99 0 21 1 0 1 1 0 8 0 semapl 112 8 0 0 1 0 1 1 0 8 0 shmpl 112 14 0 2 1 0 1 1 0 8 0 pool(0xffffffff839735d8:shmpl): page inconsistency: page 0xfffffd8065b4f000; 22 on list, 12 missing, 35 items per page dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1787 0 263 96 0 96 96 0 8 0 ffsino 296 1787 0 263 118 0 118 118 0 8 0 nchpl 144 2221 0 531 63 0 63 63 0 8 0 uvmvnodes 80 2012 0 0 42 0 42 42 0 8 0 vnodes 216 2012 0 0 112 0 112 112 0 8 0 namei 1024 6928 0 6928 2 1 1 2 0 8 1 percpumem 16 49 0 1 1 0 1 1 0 8 0 kstatmem 264 24 0 2 2 0 2 2 0 8 0 scxspl 216 8495 0 8495 9 1 8 8 1 8 8 plimitpl 152 156 0 132 2 0 2 2 0 8 1 sigapl 424 619 0 561 8 0 8 8 0 8 0 knotepl 120 274 0 0 9 0 9 9 0 8 0 kqueuepl 224 64 0 55 1 0 1 1 0 8 0 pipepl 344 190 0 162 6 0 6 6 0 8 3 fdescpl 528 596 0 562 3 0 3 3 0 8 0 filepl 160 2645 0 2444 12 0 12 12 0 8 2 lockfpl 104 64 0 62 1 0 1 1 0 8 0 lockfspl 48 26 0 24 1 0 1 1 0 8 0 sessionpl 144 42 0 26 1 0 1 1 0 8 0 pgrppl 48 71 0 47 1 0 1 1 0 8 0 ucredpl 104 349 0 331 1 0 1 1 0 8 0 zombiepl 144 562 0 561 1 0 1 1 0 8 0 processpl 1248 619 0 561 7 1 6 6 0 8 0 procpl 664 905 0 839 8 1 7 7 0 8 1 sosppl 168 2 0 2 1 0 1 1 0 8 1 sockpl 752 394 0 363 5 1 4 5 0 8 0 mcl64k 65536 2 0 0 1 0 1 1 0 8 0 mcl9k 9216 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 4 0 0 1 0 1 1 0 8 0 mcl4k 4096 110 0 0 14 0 14 14 0 8 0 mcl2k2 2112 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 21 0 0 3 0 3 3 0 8 0 mtagpl 96 2 0 0 1 0 1 1 0 8 0 mbufpl 256 272 0 0 17 0 17 17 0 8 0 bufpl 280 3442 0 117 238 0 238 238 0 8 0 anonpl 32 9363 0 0 76 0 76 76 0 246 0 amapchunkpl 152 14481 0 14014 38 3 35 35 0 158 15 amappl16 200 2864 0 2844 22 12 10 14 0 8 8 amappl15 192 3 0 3 1 1 0 1 0 8 0 amappl14 184 111 0 100 1 0 1 1 0 8 0 amappl13 176 9 0 8 1 0 1 1 0 8 0 amappl12 168 1194 0 1160 2 0 2 2 0 8 0 amappl11 160 45 0 35 1 0 1 1 0 8 0 amappl10 152 12 0 12 1 1 0 1 0 8 0 amappl9 144 252 0 252 1 1 0 1 0 8 0 amappl8 136 23 0 21 1 0 1 1 0 8 0 amappl7 128 95 0 84 1 0 1 1 0 8 0 amappl6 120 172 0 168 1 0 1 1 0 8 0 amappl5 112 120 0 112 1 0 1 1 0 8 0 amappl4 104 273 0 258 1 0 1 1 0 8 0 amappl3 96 2394 0 2284 4 0 4 4 0 8 0 amappl2 88 625 0 566 2 0 2 2 0 8 0 amappl1 80 9765 0 9120 15 0 15 15 0 8 0 amappl 88 3734 0 3575 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 16 0 2 1 0 1 1 0 8 0 uaddrrnd 24 596 0 562 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 596 0 562 1 0 1 1 0 8 0 vmmpekpl 168 6994 0 6952 3 0 3 3 0 8 0 vmmpepl 168 45417 0 43369 103 0 103 103 0 357 6 vmsppl 488 595 0 562 7 2 5 6 0 8 0 rwobjpl 80 17734 0 14813 62 0 62 62 0 8 1 pdppl 4096 1200 0 1124 118 38 80 94 0 8 4 pvpl 32 15254 0 0 124 0 124 124 0 265 0 pmappl 256 595 0 562 4 1 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 291 0 42 8 0 8 8 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp x86_ipi_db(ffffffff837ddff0) 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: 0x7e2650ae61e0, count: 12 ddb{0}> trace x86_ipi_db(ffffffff837ddff0) 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: 0x7e2650ae61e0, count: -3 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(ffffffff8336b25e) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839735d8,1,ffff8000384375f8) at pool_do_get+0x5df pool_get(ffffffff839735d8,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80002a2c2a80,ffff800038437850,0,ffff8000384377a0) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80002a2c2a80,ffff800038437850,ffff8000384377a0) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff800038437850) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff800038437850) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6ace2bf1e20, count: 7 ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8336b25e) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839735d8,1,ffff8000384375f8) at pool_do_get+0x5df pool_get(ffffffff839735d8,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80002a2c2a80,ffff800038437850,0,ffff8000384377a0) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80002a2c2a80,ffff800038437850,ffff8000384377a0) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff800038437850) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff800038437850) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x6ace2bf1e20, count: -8