panic: pool_do_get: shmpl free list modified: page 0xfffffd8064efe000; item addr 0xfffffd8064efe4d0; offset 0x40=0x687bc132 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 63326 93414 32767 0x10 0 0 syz-executor * 71071 93414 32767 0x10 0x4000000 1K syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff833d642f) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839e26c0,1,ffff80002a32f718) at pool_do_get+0x5ea sys/kern/subr_pool.c:-1 pool_get(ffffffff839e26c0,1) at pool_get+0x149 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003b846030,ffff80002a32f970,42,ffff80002a32f8c0) at shmget_allocate_segment+0x1a7 sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003b846030,ffff80002a32f970,ffff80002a32f8c0) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 syscall(ffff80002a32f970) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002a32f970) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x64dc5d78110, 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 0xfffffd8064efe000; item addr 0xfffffd8064efe4d0; offset 0x40=0x687bc132 ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff833d642f) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839e26c0,1,ffff80002a32f718) at pool_do_get+0x5ea sys/kern/subr_pool.c:-1 pool_get(ffffffff839e26c0,1) at pool_get+0x149 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003b846030,ffff80002a32f970,42,ffff80002a32f8c0) at shmget_allocate_segment+0x1a7 sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003b846030,ffff80002a32f970,ffff80002a32f8c0) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 syscall(ffff80002a32f970) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002a32f970) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x64dc5d78110, count: -8 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff80002a32f550 rbx 0xffff8000299dedd7 rdx 0xffff800001437e80 rcx 0xffff80003b846030 rax 0xffff8000299ddff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0xea6a087b4a2356e7 r11 0x24225ef4f8a005d0 r12 0xffff8000299debd8 r13 0 r14 0 r15 0x1 rip 0xffffffff81788b75 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002a32f540 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor) tid=71071 pid=93414 tcnt=2 stat=onproc flags process=10 proc=4000000 runpri=32, usrpri=75, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80003b846550,0xffff80003b846d10 process=0xffff80003b8326f0 user=0xffff80002a32a000, vmspace=0xfffffd8064f8c990 estcpu=25, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 31756 356155 19965 32767 2 0x10 syz-executor 31756 46167 19965 32767 2 0x4000010 syz-executor 72713 170182 49661 32767 2 0x10 syz-executor 72713 83277 49661 32767 3 0x4000090 fsleep syz-executor 88532 265772 25986 32767 2 0x10 syz-executor 88532 303642 25986 32767 3 0x4000090 fsleep syz-executor 21869 396599 71218 32767 2 0x10 syz-executor 21869 390968 71218 32767 3 0x4000090 fsleep syz-executor 82458 305353 81603 32767 2 0x10 syz-executor 82458 518279 81603 32767 3 0x4000090 fsleep syz-executor 93414 63326 44419 32767 7 0x10 syz-executor *93414 71071 44419 32767 7 0x4000010 syz-executor 63071 342857 22504 0 2 0x2 syz-executor 35499 479783 22504 0 2 0x2 syz-executor 68728 365887 73138 0 3 0x82 sbwait sshd-session 82988 309334 0 0 3 0x14200 bored sosplice 19965 175353 16485 32767 3 0x90 nanoslp syz-executor 49661 365964 14251 32767 3 0x90 nanoslp syz-executor 25986 183567 6423 32767 3 0x90 nanoslp syz-executor 81603 262828 32045 32767 3 0x90 nanoslp syz-executor 71218 153830 60818 32767 3 0x90 nanoslp syz-executor 44419 398022 13786 32767 3 0x90 nanoslp syz-executor 16485 285412 22504 0 3 0x82 wait syz-executor 14251 265339 22504 0 3 0x82 wait syz-executor 6423 82658 22504 0 3 0x82 wait syz-executor 32045 366856 22504 0 3 0x82 wait syz-executor 60818 318402 22504 0 3 0x82 wait syz-executor 13786 504344 22504 0 3 0x82 wait syz-executor 22504 385549 95053 0 3 0x82 kqread syz-executor 95053 107208 77140 0 3 0x10008a sigsusp ksh 77140 156171 95311 0 3 0x98 kqread sshd-session 95311 297929 73138 0 3 0x92 kqread sshd-session 64394 312047 1 0 3 0x100083 ttyin getty 73138 260279 1 0 3 0x88 kqread sshd 66627 233683 26195 73 3 0x1100090 kqread syslogd 26195 172205 1 0 3 0x100082 sbwait syslogd 49666 394946 1 0 3 0x100080 kqread resolvd 94053 212892 20528 77 3 0x100092 kqread dhcpleased 49797 410414 20528 77 3 0x100092 kqread dhcpleased 20528 383628 1 0 3 0x80 kqread dhcpleased 50206 143656 0 0 3 0x14200 bored smr 53839 288032 0 0 2 0x14200 zerothread 81959 51318 0 0 3 0x14200 aiodoned aiodoned 71950 198117 0 0 3 0x14200 syncer update 99029 210099 0 0 3 0x14200 cleaner cleaner 68775 414382 0 0 3 0x14200 reaper reaper 93182 3087 0 0 3 0x14200 pgdaemon pagedaemon 13280 459855 0 0 3 0x14200 bored viomb 60098 312021 0 0 3 0x40014200 acpi0 acpi0 73439 81459 0 0 3 0x40014200 idle1 18904 63017 0 0 3 0x14200 bored softnet7 84165 518661 0 0 3 0x14200 bored softnet6 45226 395439 0 0 3 0x14200 bored softnet5 55796 392925 0 0 3 0x14200 bored softnet4 80408 188986 0 0 3 0x14200 bored softnet3 93465 414553 0 0 3 0x14200 bored softnet2 35341 382940 0 0 3 0x14200 bored softnet1 90925 199850 0 0 3 0x14200 bored softnet0 38754 106641 0 0 3 0x14200 bored systqmp 61861 297174 0 0 3 0x14200 bored systq 26936 193641 0 0 3 0x14200 tmoslp softclockmp 84332 321833 0 0 3 0x40014200 tmoslp softclock 56535 81933 0 0 3 0x40014200 idle0 1 89382 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 (0xffffffff839e26d8) #0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5bb 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+0x10b sys/kern/subr_pool.c:578 #4 shmget_allocate_segment+0x1a7 sys/kern/sysv_shm.c:-1 #5 sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 #6 syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] #6 syscall+0xb08 sys/arch/amd64/amd64/trap.c:748 #7 Xsyscall+0x128 Process 93414 (syz-executor) thread 0xffff80003b846030 (71071) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff83a1c850) #0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5bb sys/kern/subr_witness.c:1160 #1 syscall+0xae6 mi_syscall sys/sys/syscall_mi.h:176 [inline] #1 syscall+0xae6 sys/arch/amd64/amd64/trap.c:748 #2 Xsyscall+0x128 exclusive mutex shmpl r = 0 (0xffffffff839e26d8) #0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5bb 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+0x10b sys/kern/subr_pool.c:578 #4 shmget_allocate_segment+0x1a7 sys/kern/sysv_shm.c:-1 #5 sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 #6 syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] #6 syscall+0xb08 sys/arch/amd64/amd64/trap.c:748 #7 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10215 10955K 10968K 166960K 11301 0 pcb 17 12K 12K 166960K 17 0 rtable 177 5K 6K 166960K 275 0 pf 27 16K 16K 166960K 31 0 ifaddr 34 6K 7K 166960K 44 0 ifgroup 42 1K 2K 166960K 50 0 sysctl 1 1K 9K 166960K 7 0 counters 64 36K 36K 166960K 68 0 ioctlops 0 0K 2K 166960K 32 0 iov 0 0K 16K 166960K 19 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1334 84K 84K 166960K 1585 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 13 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 30 0 dirhash 12 2K 2K 166960K 15 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 22 81K 121K 166960K 501 0 sigio 0 0K 0K 166960K 10 0 proc 58 79K 127K 166960K 527 0 subproc 65 4K 4K 166960K 254 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 54 0 in_multi 77 5K 7K 166960K 110 0 ether_multi 1 0K 0K 166960K 3 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 229 1023K 1023K 166960K 229 0 exec 0 0K 1K 166960K 386 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 237 184K 202K 166960K 5712 0 UVM aobj 23 2K 3K 166960K 25 0 pinsyscall 45 90K 111K 166960K 1528 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 23 0 NDP 9 0K 2K 166960K 27 0 temp 44 8676K 8740K 166960K 5315 0 kqueue 13 20K 31K 166960K 67 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 58 0 55 1 0 1 1 0 8 0 rtentry 176 102 0 22 5 0 5 5 0 8 0 unpcb 144 223 0 205 2 1 1 2 0 8 0 syncache 336 11 0 11 1 0 1 1 0 8 1 tcpqe 32 3 0 3 2 1 1 1 0 8 1 tcpcb 736 111 0 103 3 1 2 2 0 8 1 arp 128 13 0 2 1 0 1 1 0 8 0 inpcb 328 300 0 287 2 0 2 2 0 8 0 ip6q 72 4 0 1 1 0 1 1 0 8 0 ip6af 40 6 0 2 1 0 1 1 0 8 0 nd6 144 20 0 7 1 0 1 1 0 8 0 kcovpl 48 27 0 21 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 460 0 103 29 3 26 29 0 8 2 art_table 40 461 0 103 5 0 5 5 0 8 0 art_node 32 102 0 30 1 0 1 1 0 8 0 sysvmsgpl 40 35 0 2 1 0 1 1 0 8 0 semapl 112 28 0 18 1 0 1 1 0 8 0 shmpl 112 22 0 2 1 0 1 1 0 8 0 pool(0xffffffff839e26c0:shmpl): page inconsistency: page 0xfffffd8064efe000; 14 on list, 20 missing, 35 items per page dirhash 1024 19 0 2 3 0 3 3 0 8 0 dino2pl 256 2013 0 482 96 0 96 96 0 8 0 ffsino 288 2013 0 482 110 0 110 110 0 8 0 nchpl 144 2613 0 913 64 0 64 64 0 8 0 uvmvnodes 80 2276 0 0 47 0 47 47 0 8 0 vnodes 216 2276 0 0 127 0 127 127 0 8 0 namei 1024 8422 0 8422 1 0 1 1 0 8 1 percpumem 16 49 0 2 1 0 1 1 0 8 0 kstatmem 264 24 0 4 2 0 2 2 0 8 0 scxspl 216 8822 0 8822 12 4 8 8 1 8 8 plimitpl 152 185 0 162 3 1 2 2 0 8 1 sigapl 424 741 0 683 8 0 8 8 0 8 0 knotepl 120 308 0 0 10 0 10 10 0 8 0 kqueuepl 224 159 0 150 5 2 3 3 0 8 2 pipepl 336 189 0 162 3 0 3 3 0 8 0 fdescpl 520 718 0 683 3 0 3 3 0 8 0 filepl 160 3653 0 3449 15 1 14 14 0 8 5 lockfpl 104 71 0 69 1 0 1 1 0 8 0 lockfspl 48 28 0 26 1 0 1 1 0 8 0 sessionpl 144 47 0 32 1 0 1 1 0 8 0 pgrppl 48 114 0 91 1 0 1 1 0 8 0 ucredpl 104 568 0 551 1 0 1 1 0 8 0 zombiepl 144 683 0 683 1 0 1 1 0 8 1 processpl 1240 741 0 683 7 1 6 6 0 8 0 procpl 656 1223 0 1159 7 0 7 7 0 8 0 sosppl 168 1 0 1 1 1 0 1 0 8 0 sockpl 728 586 0 552 6 1 5 5 0 8 1 mcl64k 65536 7 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 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 121 0 0 16 0 16 16 0 8 0 mcl2k 2048 22 0 0 3 0 3 3 0 8 0 mtagpl 96 2 0 0 1 0 1 1 0 8 0 mbufpl 256 259 0 0 17 0 17 17 0 8 0 bufpl 280 3292 0 112 228 0 228 228 0 8 0 anonpl 32 9748 0 0 79 0 79 79 0 246 0 amapchunkpl 152 18789 0 18314 39 10 29 37 0 158 9 amappl16 200 2651 0 2629 17 7 10 14 0 8 7 amappl15 192 6 0 6 1 1 0 1 0 8 0 amappl14 184 118 0 107 1 0 1 1 0 8 0 amappl13 176 8 0 8 1 1 0 1 0 8 0 amappl12 168 1323 0 1288 2 0 2 2 0 8 0 amappl11 160 47 0 37 1 0 1 1 0 8 0 amappl10 152 2 0 2 1 1 0 1 0 8 0 amappl9 144 250 0 250 1 1 0 1 0 8 0 amappl8 136 41 0 40 1 0 1 1 0 8 0 amappl7 128 112 0 101 1 0 1 1 0 8 0 amappl6 120 177 0 172 1 0 1 1 0 8 0 amappl5 112 115 0 109 1 0 1 1 0 8 0 amappl4 104 277 0 263 1 0 1 1 0 8 0 amappl3 96 3187 0 3076 4 0 4 4 0 8 0 amappl2 88 654 0 593 2 0 2 2 0 8 0 amappl1 80 10698 0 10048 15 0 15 15 0 8 0 amappl 88 4986 0 4821 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 24 0 2 1 0 1 1 0 8 0 uaddrrnd 24 718 0 683 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 718 0 683 1 0 1 1 0 8 0 vmmpekpl 168 8214 0 8166 3 0 3 3 0 8 0 vmmpepl 168 53287 0 51205 109 7 102 109 0 357 11 vmsppl 480 717 0 683 7 1 6 6 0 8 0 rwobjpl 72 19578 0 16371 59 0 59 59 0 8 0 pdppl 4096 1444 0 1366 112 30 82 96 0 8 4 pvpl 32 18513 0 0 150 0 150 150 0 265 0 pmappl 256 717 0 683 4 1 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 405 0 37 11 0 11 11 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp x86_ipi_db(ffffffff837d2ff0) 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 __mp_lock(ffffffff83a1c648) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:134 [inline] __mp_lock(ffffffff83a1c648) at __mp_lock+0x192 sys/kern/kern_lock.c:165 softintr_dispatch(0) at softintr_dispatch+0x12a sys/kern/kern_softintr.c:83 dosoftint(0) at dosoftint+0x54 sys/arch/amd64/amd64/intr.c:847 Xsoftclock() at Xsoftclock+0x27 end of kernel end trace frame: 0x704a8689fba0, count: 8 ddb{0}> trace x86_ipi_db(ffffffff837d2ff0) 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 __mp_lock(ffffffff83a1c648) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:134 [inline] __mp_lock(ffffffff83a1c648) at __mp_lock+0x192 sys/kern/kern_lock.c:165 softintr_dispatch(0) at softintr_dispatch+0x12a sys/kern/kern_softintr.c:83 dosoftint(0) at dosoftint+0x54 sys/arch/amd64/amd64/intr.c:847 Xsoftclock() at Xsoftclock+0x27 end of kernel end trace frame: 0x704a8689fba0, 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:438 panic(ffffffff833d642f) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839e26c0,1,ffff80002a32f718) at pool_do_get+0x5ea sys/kern/subr_pool.c:-1 pool_get(ffffffff839e26c0,1) at pool_get+0x149 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003b846030,ffff80002a32f970,42,ffff80002a32f8c0) at shmget_allocate_segment+0x1a7 sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003b846030,ffff80002a32f970,ffff80002a32f8c0) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 syscall(ffff80002a32f970) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002a32f970) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x64dc5d78110, count: 7 ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff833d642f) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839e26c0,1,ffff80002a32f718) at pool_do_get+0x5ea sys/kern/subr_pool.c:-1 pool_get(ffffffff839e26c0,1) at pool_get+0x149 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003b846030,ffff80002a32f970,42,ffff80002a32f8c0) at shmget_allocate_segment+0x1a7 sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003b846030,ffff80002a32f970,ffff80002a32f8c0) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:482 syscall(ffff80002a32f970) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002a32f970) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x64dc5d78110, count: -8