panic: pool_do_get: shmpl free list modified: page 0xfffffd8062d6a000; item addr 0xfffffd8062d6a9a0; offset 0x40=0x69fafc7a Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 430403 34838 32767 0x10 0 0 syz-executor *523924 23563 32767 0x10 0x4000000 1K syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff834499f9) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839c8bd8,1,ffff80003c3da2a8) at pool_do_get+0x5df pool_get(ffffffff839c8bd8,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003c3eefb8,ffff80003c3da500,152,ffff80003c3da450) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003c3eefb8,ffff80003c3da500,ffff80003c3da450) at sys_shmget+0x195 sys/kern/sysv_shm.c:484 syscall(ffff80003c3da500) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c3da500) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xd6651acb9b0, 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 0xfffffd8062d6a000; item addr 0xfffffd8062d6a9a0; offset 0x40=0x69fafc7a ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff834499f9) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839c8bd8,1,ffff80003c3da2a8) at pool_do_get+0x5df pool_get(ffffffff839c8bd8,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003c3eefb8,ffff80003c3da500,152,ffff80003c3da450) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003c3eefb8,ffff80003c3da500,ffff80003c3da450) at sys_shmget+0x195 sys/kern/sysv_shm.c:484 syscall(ffff80003c3da500) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c3da500) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xd6651acb9b0, count: -8 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff80003c3da0d0 rbx 0xffff8000299bee07 rdx 0xffff8000015ad700 rcx 0xffff80003c3eefb8 rax 0xffff8000299bdff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x5fa53d3c9fee18b8 r11 0x5ba2af8ff661b152 r12 0xffff8000299bec08 r13 0 r14 0 r15 0x1 rip 0xffffffff816805c5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c3da0c0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor) tid=523924 pid=23563 tcnt=3 stat=onproc flags process=10 proc=4000000 runpri=32, usrpri=86, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a2407e0,0xffff80003c3ef790 process=0xffff8000fffe49c0 user=0xffff80003c3d5000, vmspace=0xfffffd806c9bd208 estcpu=36, cpticks=4, pctcpu=0.0, user=0, sys=4, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 20494 392999 62566 32767 2 0x10 syz-executor 34838 430403 7777 32767 7 0x10 syz-executor 34838 308893 7777 32767 2 0x4000010 syz-executor 94592 179847 32407 32767 2 0x10 syz-executor 67836 37781 91563 32767 2 0x10 syz-executor 67836 181434 91563 32767 3 0x4000090 fsleep syz-executor 23563 272483 42957 32767 2 0x10 syz-executor *23563 523924 42957 32767 7 0x4000010 syz-executor 23563 21859 42957 32767 3 0x4000090 fsleep syz-executor 81998 205073 22987 32767 3 0x91 nanoslp syz-executor 81998 235711 22987 32767 3 0x4000091 ttyin syz-executor 81998 168343 22987 32767 3 0x4000091 fsleep syz-executor 42957 321910 55872 32767 3 0x90 nanoslp syz-executor 7777 375518 24602 32767 3 0x90 nanoslp syz-executor 32407 21478 28000 32767 3 0x90 nanoslp syz-executor 91563 126069 57945 32767 3 0x90 nanoslp syz-executor 52369 381010 2097 32767 3 0x90 wait syz-executor 56055 504521 95097 32767 3 0x90 nanoslp syz-executor 62566 494488 63044 32767 3 0x90 nanoslp syz-executor 22987 469483 96090 32767 3 0x90 nanoslp syz-executor 24602 292000 74397 0 3 0x82 wait syz-executor 57945 197988 74397 0 3 0x82 wait syz-executor 63044 162607 74397 0 3 0x82 wait syz-executor 28000 146177 74397 0 3 0x82 wait syz-executor 96090 147070 74397 0 3 0x82 wait syz-executor 2097 324743 74397 0 3 0x82 wait syz-executor 95097 296793 74397 0 3 0x82 wait syz-executor 55872 438884 74397 0 3 0x82 wait syz-executor 74397 130015 21783 0 3 0x82 kqread syz-executor 21783 419384 27502 0 3 0x10008a sigsusp ksh 27502 104160 46013 0 3 0x98 kqread sshd-session 46013 491 31558 0 3 0x92 kqread sshd-session 94208 91148 1 0 3 0x100083 ttyin getty 31558 225290 1 0 3 0x88 kqread sshd 85512 162535 24982 73 3 0x1100090 kqread syslogd 24982 37547 1 0 3 0x100082 sbwait syslogd 37077 114192 1 0 3 0x100080 kqread resolvd 14292 100629 77821 77 3 0x100092 kqread dhcpleased 80534 285755 77821 77 3 0x100092 kqread dhcpleased 77821 241085 1 0 3 0x80 kqread dhcpleased 50605 25081 0 0 3 0x14200 bored smr 83222 211257 0 0 2 0x14200 zerothread 34874 434467 0 0 3 0x14200 aiodoned aiodoned 86214 403853 0 0 3 0x14200 syncer update 69545 374157 0 0 3 0x14200 cleaner cleaner 49877 315189 0 0 3 0x14200 reaper reaper 67633 14350 0 0 3 0x14200 pgdaemon pagedaemon 16583 35268 0 0 3 0x14200 bored viomb 45672 234800 0 0 3 0x40014200 acpi0 acpi0 39909 444327 0 0 3 0x40014200 idle1 1055 80126 0 0 3 0x14200 bored softnet1 41302 212314 0 0 3 0x14200 bored softnet0 35823 367160 0 0 3 0x14200 bored systqmp 4605 89364 0 0 3 0x14200 bored systq 1754 98749 0 0 3 0x14200 tmoslp softclockmp 69097 489394 0 0 3 0x40014200 tmoslp softclock 932 49401 0 0 3 0x40014200 idle0 1 464570 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 (0xffffffff839c8bf0) #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+0x4b4 sys/kern/kern_lock.c:487 #2 pool_get+0x124 sys/kern/subr_pool.c:585 #3 shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 #4 sys_shmget+0x195 sys/kern/sysv_shm.c:484 #5 syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] #5 syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 #6 Xsyscall+0x128 Process 23563 (syz-executor) thread 0xffff80003c3eefb8 (523924) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff83a7f200) #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:783 #2 Xsyscall+0x128 exclusive mutex shmpl r = 0 (0xffffffff839c8bf0) #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+0x4b4 sys/kern/kern_lock.c:487 #2 pool_get+0x124 sys/kern/subr_pool.c:585 #3 shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 #4 sys_shmget+0x195 sys/kern/sysv_shm.c:484 #5 syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] #5 syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 #6 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 11058 12019K 12034K 166960K 12149 0 pcb 17 12K 12K 166960K 17 0 rtable 243 6K 7K 166960K 357 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 7 0 counters 70 37K 37K 166960K 70 0 ioctlops 0 0K 2K 166960K 33 0 iov 0 0K 16K 166960K 8 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1288 81K 81K 166960K 1370 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 6 0 VM map 2 1K 1K 166960K 2 0 sem 12 1K 1K 166960K 13 0 dirhash 12 2K 2K 166960K 15 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 26 97K 121K 166960K 333 0 sigio 0 0K 0K 166960K 4 0 proc 58 99K 131K 166960K 545 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 1 0K 0K 166960K 50 0 in_multi 99 7K 7K 166960K 103 0 ether_multi 1 0K 0K 166960K 1 0 mrt 0 0K 0K 166960K 10 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 91 413K 413K 166960K 91 0 exec 0 0K 1K 166960K 370 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 245 172K 195K 166960K 4641 0 UVM aobj 11 2K 2K 166960K 12 0 pinsyscall 47 94K 110K 166960K 1404 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 10 0 NDP 11 0K 2K 166960K 27 0 temp 44 9080K 9144K 166960K 4626 0 kqueue 14 22K 26K 166960K 47 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 45 0 42 1 0 1 1 0 8 0 rtentry 176 114 0 1 6 0 6 6 0 8 0 unpcb 144 133 0 118 2 0 2 2 0 8 1 syncache 336 5 0 5 1 0 1 1 0 8 1 tcpcb 736 118 0 114 4 0 4 4 0 8 3 arp 136 19 0 0 1 0 1 1 0 8 0 ipq 40 3 0 1 1 0 1 1 0 8 0 ipqe 40 4 0 2 1 0 1 1 0 8 0 inpcb 328 284 0 276 4 0 4 4 0 8 2 ip6q 72 3 0 0 1 0 1 1 0 8 0 ip6af 40 3 0 0 1 0 1 1 0 8 0 nd6 152 26 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 457 0 0 29 0 29 29 0 8 0 art_table 40 458 0 0 5 0 5 5 0 8 0 art_node 32 114 0 11 1 0 1 1 0 8 0 sysvmsgpl 40 5 0 3 1 0 1 1 0 8 0 semapl 112 11 0 1 1 0 1 1 0 8 0 shmpl 112 9 0 2 1 0 1 1 0 8 0 pool(0xffffffff839c8bd8:shmpl): page inconsistency: page 0xfffffd8062d6a000; 27 on list, 7 missing, 35 items per page dirhash 1024 19 0 2 3 0 3 3 0 8 0 dino2pl 256 1889 0 427 92 0 92 92 0 8 0 ffsino 296 1889 0 427 113 0 113 113 0 8 0 nchpl 144 2337 0 649 63 0 63 63 0 8 0 vnodes 216 1970 0 0 110 0 110 110 0 8 0 namei 1024 7017 0 7017 2 0 2 2 0 8 2 percpumem 16 50 0 0 1 0 1 1 0 8 0 kstatmem 264 25 0 0 2 0 2 2 0 8 0 scxspl 216 8527 0 8527 11 3 8 8 1 8 8 plimitpl 152 64 0 39 2 0 2 2 0 8 0 sigapl 424 621 0 567 7 0 7 7 0 8 0 knotepl 120 295 0 0 9 0 9 9 0 8 0 kqueuepl 224 65 0 55 2 0 2 2 0 8 1 pipepl 344 132 0 105 3 0 3 3 0 8 0 fdescpl 528 605 0 567 3 0 3 3 0 8 0 filepl 160 2533 0 2315 12 0 12 12 0 8 1 lockfpl 104 72 0 69 1 0 1 1 0 8 0 lockfspl 48 33 0 30 1 0 1 1 0 8 0 sessionpl 144 38 0 21 1 0 1 1 0 8 0 pgrppl 48 50 0 25 1 0 1 1 0 8 0 ucredpl 104 417 0 398 1 0 1 1 0 8 0 zombiepl 144 569 0 567 1 0 1 1 0 8 0 processpl 1232 621 0 567 5 0 5 5 0 8 0 procpl 664 929 0 869 6 0 6 6 0 8 0 sockpl 752 464 0 438 8 0 8 8 0 8 4 mcl64k 65536 3 0 0 1 0 1 1 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl8k 8192 2 0 0 1 0 1 1 0 8 0 mcl4k 4096 119 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 206 0 0 13 0 13 13 0 8 0 bufpl 280 2783 0 102 192 0 192 192 0 8 0 anonpl 32 5686 0 0 46 0 46 46 0 246 0 amapchunkpl 152 15159 0 14644 34 0 34 34 0 158 8 amappl16 200 2161 0 2136 5 2 3 5 0 8 0 amappl15 192 4 0 4 1 1 0 1 0 8 0 amappl14 184 398 0 397 1 0 1 1 0 8 0 amappl13 176 154 0 144 1 0 1 1 0 8 0 amappl12 168 834 0 798 2 0 2 2 0 8 0 amappl11 160 10 0 10 1 1 0 1 0 8 0 amappl10 152 61 0 51 1 0 1 1 0 8 0 amappl9 144 259 0 258 1 0 1 1 0 8 0 amappl8 136 96 0 95 1 0 1 1 0 8 0 amappl7 128 139 0 127 1 0 1 1 0 8 0 amappl6 120 159 0 158 1 0 1 1 0 8 0 amappl5 112 129 0 120 1 0 1 1 0 8 0 amappl4 104 257 0 242 1 0 1 1 0 8 0 amappl3 96 2677 0 2556 5 1 4 4 0 8 0 amappl2 88 517 0 465 2 0 2 2 0 8 0 amappl1 80 10627 0 10047 16 0 16 16 0 8 2 amappl 88 3926 0 3748 5 0 5 5 0 92 0 uvmvnodes 80 109 0 0 3 0 3 3 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 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 11 0 1 1 0 1 1 0 8 0 uaddrrnd 24 605 0 567 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 605 0 567 1 0 1 1 0 8 0 vmmpekpl 168 6721 0 6690 2 0 2 2 0 8 0 vmmpepl 168 47027 0 44941 105 0 105 105 0 357 10 vmsppl 488 604 0 567 7 1 6 6 0 8 0 rwobjpl 80 16305 0 15361 24 0 24 24 0 8 2 pdppl 4096 1217 0 1134 109 22 87 95 0 8 4 pvpl 32 14805 0 0 120 0 120 120 0 265 0 pmappl 256 604 0 567 4 1 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 282 0 25 8 0 8 8 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp x86_ipi_db(ffffffff838beff0) 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(ffffffff83a7ea00) at __mp_lock+0x1a3 __mp_lock_spin sys/kern/kern_lock.c:142 [inline] __mp_lock(ffffffff83a7ea00) at __mp_lock+0x1a3 sys/kern/kern_lock.c:173 softintr_dispatch(0) at softintr_dispatch+0x125 sys/kern/kern_softintr.c:83 dosoftint(0) at dosoftint+0x54 sys/arch/amd64/amd64/intr.c:862 Xsoftclock() at Xsoftclock+0x27 end of kernel end trace frame: 0x7cfe5fe39c70, count: 8 ddb{0}> trace x86_ipi_db(ffffffff838beff0) 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(ffffffff83a7ea00) at __mp_lock+0x1a3 __mp_lock_spin sys/kern/kern_lock.c:142 [inline] __mp_lock(ffffffff83a7ea00) at __mp_lock+0x1a3 sys/kern/kern_lock.c:173 softintr_dispatch(0) at softintr_dispatch+0x125 sys/kern/kern_softintr.c:83 dosoftint(0) at dosoftint+0x54 sys/arch/amd64/amd64/intr.c:862 Xsoftclock() at Xsoftclock+0x27 end of kernel end trace frame: 0x7cfe5fe39c70, 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(ffffffff834499f9) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839c8bd8,1,ffff80003c3da2a8) at pool_do_get+0x5df pool_get(ffffffff839c8bd8,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003c3eefb8,ffff80003c3da500,152,ffff80003c3da450) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003c3eefb8,ffff80003c3da500,ffff80003c3da450) at sys_shmget+0x195 sys/kern/sysv_shm.c:484 syscall(ffff80003c3da500) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c3da500) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xd6651acb9b0, count: 7 ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff834499f9) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839c8bd8,1,ffff80003c3da2a8) at pool_do_get+0x5df pool_get(ffffffff839c8bd8,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003c3eefb8,ffff80003c3da500,152,ffff80003c3da450) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003c3eefb8,ffff80003c3da500,ffff80003c3da450) at sys_shmget+0x195 sys/kern/sysv_shm.c:484 syscall(ffff80003c3da500) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c3da500) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xd6651acb9b0, count: -8