panic: pool_do_get: shmpl free list modified: page 0xfffffd806c8f7000; item addr 0xfffffd806c8f75b0; offset 0x40=0x6967e1fc Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 103066 35801 32767 0x10 0 1 syz-executor *147493 35801 32767 0x10 0x4000000 0K syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8339f7d0) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839519f0,1,ffff80003c46ae98) at pool_do_get+0x5df pool_get(ffffffff839519f0,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003a42a7f0,ffff80003c46b0f0,0,ffff80003c46b040) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003a42a7f0,ffff80003c46b0f0,ffff80003c46b040) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80003c46b0f0) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c46b0f0) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:775 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xf5048ed3d50, 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 0xfffffd806c8f7000; item addr 0xfffffd806c8f75b0; offset 0x40=0x6967e1fc ddb{0}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8339f7d0) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839519f0,1,ffff80003c46ae98) at pool_do_get+0x5df pool_get(ffffffff839519f0,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003a42a7f0,ffff80003c46b0f0,0,ffff80003c46b040) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003a42a7f0,ffff80003c46b0f0,ffff80003c46b040) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80003c46b0f0) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c46b0f0) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:775 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xf5048ed3d50, count: -8 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80003c46acc0 rbx 0xffffffff837d3e07 cpu_info_full_primary+0x2e07 rdx 0 rcx 0xffff80003a42a7f0 rax 0xffffffff837d2ff0 cpu_info_full_primary+0x1ff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0xfcd037d68ae81e2a r11 0xf97e1759a271f69 r12 0xffffffff837d3c08 cpu_info_full_primary+0x2c08 r13 0 r14 0 r15 0x1 rip 0xffffffff831d6555 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c46acb0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor) tid=147493 pid=35801 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=0xffff80003a42ad20,0xffffffff839f5968 process=0xffff80003a42d360 user=0xffff80003c466000, vmspace=0xfffffd800f7c1400 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 35801 103066 62742 32767 7 0x10 syz-executor *35801 147493 62742 32767 7 0x4000010 syz-executor 22325 424004 27249 32767 3 0x90 nanoslp syz-executor 22325 377502 27249 32767 3 0x4000090 ttyout syz-executor 22325 99368 27249 32767 3 0x4000090 sbwait syz-executor 22325 446475 27249 32767 3 0x4000090 fsleep syz-executor 96482 203035 18065 32767 3 0x90 nanoslp syz-executor 96482 54430 18065 32767 3 0x4000090 lockf syz-executor 96482 241096 18065 32767 3 0x4000090 fsleep syz-executor 56542 309036 60929 32767 3 0x90 nanoslp syz-executor 56542 363795 60929 32767 3 0x4000090 sbwait syz-executor 56542 410453 60929 32767 3 0x4000090 fsleep syz-executor 62336 191200 24142 32767 3 0x90 nanoslp syz-executor 62336 301702 24142 32767 3 0x4000090 kqread syz-executor 62336 360773 24142 32767 3 0x4000090 kqread syz-executor 62336 499073 24142 32767 3 0x4000090 fsleep syz-executor 19816 19066 25661 0 3 0x100082 sbwait arp 25661 227289 60864 0 3 0x10008a sigsusp sh 18065 207405 24714 32767 3 0x90 nanoslp syz-executor 60864 372570 96576 0 3 0x80 wait syz-executor 86576 443526 80998 32767 3 0x90 nanoslp syz-executor 62742 186870 90639 32767 3 0x90 nanoslp syz-executor 27249 113170 45933 32767 3 0x90 nanoslp syz-executor 24142 383044 86525 32767 3 0x90 nanoslp syz-executor 60929 31042 75851 32767 3 0x90 nanoslp syz-executor 71206 406689 34639 32767 3 0x90 wait syz-executor 80998 96259 97157 0 3 0x82 wait syz-executor 24714 321882 97157 0 3 0x82 wait syz-executor 96576 487806 97157 0 3 0x82 wait syz-executor 90639 289338 97157 0 3 0x82 wait syz-executor 34639 246615 97157 0 3 0x82 wait syz-executor 86525 501296 97157 0 3 0x82 wait syz-executor 45933 131498 97157 0 3 0x82 wait syz-executor 75851 474097 97157 0 3 0x82 wait syz-executor 97157 244050 38169 0 3 0x82 kqread syz-executor 38169 21276 97865 0 3 0x10008a sigsusp ksh 97865 70594 89788 0 3 0x98 kqread sshd-session 89788 248111 9464 0 3 0x92 kqread sshd-session 28334 238699 1 0 3 0x100083 ttyin getty 9464 31576 1 0 3 0x88 kqread sshd 5779 471919 88621 73 3 0x1100090 kqread syslogd 88621 362013 1 0 3 0x100082 sbwait syslogd 41927 119309 1 0 3 0x100080 kqread resolvd 1465 476543 95243 77 3 0x100092 kqread dhcpleased 49582 343497 95243 77 3 0x100092 kqread dhcpleased 95243 328473 1 0 3 0x80 kqread dhcpleased 14325 126214 0 0 3 0x14200 bored smr 54819 133080 0 0 3 0x14200 pgzero zerothread 67267 152081 0 0 3 0x14200 aiodoned aiodoned 14875 111053 0 0 3 0x14200 syncer update 76785 421683 0 0 3 0x14200 cleaner cleaner 41290 319141 0 0 3 0x14200 reaper reaper 24188 132317 0 0 3 0x14200 pgdaemon pagedaemon 15942 444196 0 0 3 0x14200 bored viomb 83156 465485 0 0 3 0x40014200 acpi0 acpi0 19473 345007 0 0 3 0x40014200 idle1 20975 208522 0 0 3 0x14200 bored softnet1 19720 315748 0 0 3 0x14200 bored softnet0 97705 220174 0 0 3 0x14200 bored systqmp 67459 407478 0 0 3 0x14200 bored systq 18687 227084 0 0 3 0x14200 tmoslp softclockmp 4845 340334 0 0 3 0x40014200 tmoslp softclock 20293 118605 0 0 3 0x40014200 idle0 1 424129 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 (0xffffffff83951a08) #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:581 #3 shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 #4 sys_shmget+0x195 sys/kern/sysv_shm.c:482 #5 syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] #5 syscall+0xb17 sys/arch/amd64/amd64/trap.c:775 #6 Xsyscall+0x128 Process 35801 (syz-executor) thread 0xffff80003a42a7f0 (147493) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff838fd748) #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:775 #2 Xsyscall+0x128 exclusive mutex shmpl r = 0 (0xffffffff83951a08) #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:581 #3 shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 #4 sys_shmget+0x195 sys/kern/sysv_shm.c:482 #5 syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] #5 syscall+0xb17 sys/arch/amd64/amd64/trap.c:775 #6 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 11055 12019K 12034K 166960K 12146 0 pcb 17 12K 12K 166960K 17 0 rtable 225 6K 6K 166960K 337 0 pf 31 16K 16K 166960K 31 0 ifaddr 40 7K 7K 166960K 42 0 ifgroup 50 2K 2K 166960K 50 0 sysctl 1 1K 9K 166960K 5 0 counters 70 37K 37K 166960K 70 0 ioctlops 0 0K 2K 166960K 32 0 iov 1 8K 18K 166960K 11 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1335 84K 84K 166960K 1427 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 8 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 14 0 dirhash 12 2K 2K 166960K 15 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 27 101K 129K 166960K 279 0 sigio 0 0K 0K 166960K 5 0 proc 58 99K 163K 166960K 486 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 0 0K 0K 166960K 21 0 in_multi 89 6K 7K 166960K 94 0 ether_multi 1 0K 0K 166960K 2 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 91 413K 413K 166960K 91 0 exec 0 0K 1K 166960K 385 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 272 162K 182K 166960K 4266 0 UVM aobj 9 2K 3K 166960K 11 0 pinsyscall 49 98K 117K 166960K 1331 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 11 0 NDP 11 0K 1K 166960K 25 0 temp 74 8676K 8740K 166960K 4449 0 kqueue 15 22K 31K 166960K 52 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 82 0 77 2 0 2 2 0 8 1 rtentry 176 105 0 1 5 0 5 5 0 8 0 unpcb 144 186 0 167 4 0 4 4 0 8 3 syncache 336 7 0 7 1 0 1 1 0 8 1 tcpqe 32 1 0 1 1 0 1 1 0 8 1 tcpcb 736 63 0 55 1 0 1 1 0 8 0 arp 136 18 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 250 0 174 7 0 7 7 0 8 0 ip6q 72 3 0 0 1 0 1 1 0 8 0 ip6af 40 4 0 1 1 0 1 1 0 8 0 nd6 152 22 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 414 0 0 26 0 26 26 0 8 0 art_table 40 415 0 0 5 0 5 5 0 8 0 art_node 32 105 0 10 1 0 1 1 0 8 0 sysvmsgpl 40 1 0 0 1 0 1 1 0 8 0 semapl 112 12 0 2 1 0 1 1 0 8 0 shmpl 112 8 0 2 1 0 1 1 0 8 0 pool(0xffffffff839519f0:shmpl): page inconsistency: page 0xfffffd806c8f7000; 28 on list, 6 missing, 35 items per page dirhash 1024 19 0 2 3 0 3 3 0 8 0 dino2pl 256 1815 0 309 95 0 95 95 0 8 0 ffsino 296 1815 0 309 117 0 117 117 0 8 0 nchpl 144 2209 0 521 63 0 63 63 0 8 0 vnodes 216 1896 0 0 106 0 106 106 0 8 0 namei 1024 6640 0 6640 1 0 1 1 0 8 1 percpumem 16 50 0 0 1 0 1 1 0 8 0 kstatmem 264 24 0 0 2 0 2 2 0 8 0 scxspl 216 6829 0 6829 3 2 1 2 1 8 1 plimitpl 152 63 0 38 2 0 2 2 0 8 1 sigapl 424 564 0 509 7 0 7 7 0 8 0 knotepl 120 564 0 0 18 0 18 18 0 8 0 kqueuepl 224 64 0 53 1 0 1 1 0 8 0 pipepl 344 123 0 95 3 0 3 3 0 8 0 fdescpl 528 548 0 509 4 0 4 4 0 8 0 filepl 160 2561 0 2267 18 0 18 18 0 8 4 lockfpl 104 55 0 51 1 0 1 1 0 8 0 lockfspl 48 19 0 16 1 0 1 1 0 8 0 sessionpl 144 25 0 9 1 0 1 1 0 8 0 pgrppl 48 36 0 12 1 0 1 1 0 8 0 ucredpl 104 489 0 471 1 0 1 1 0 8 0 zombiepl 144 511 0 509 1 0 1 1 0 8 0 processpl 1232 564 0 509 5 0 5 5 0 8 0 procpl 664 809 0 743 6 0 6 6 0 8 0 sosppl 176 3 0 3 1 0 1 1 0 8 1 sockpl 752 520 0 420 17 0 17 17 0 8 5 mcl64k 65536 3 0 0 1 0 1 1 0 8 0 mcl12k 12288 2 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 115 0 0 15 0 15 15 0 8 0 mcl2k 2048 31 0 0 4 0 4 4 0 8 0 mtagpl 96 3 0 0 1 0 1 1 0 8 0 mbufpl 256 251 0 0 16 0 16 16 0 8 0 bufpl 280 2455 0 118 167 0 167 167 0 8 0 anonpl 32 5548 0 0 45 0 45 45 0 246 0 amapchunkpl 152 13106 0 12508 27 0 27 27 0 158 2 amappl16 200 2104 0 2081 5 3 2 5 0 8 0 amappl15 192 7 0 7 1 1 0 1 0 8 0 amappl14 184 18 0 18 1 1 0 1 0 8 0 amappl13 176 407 0 405 1 0 1 1 0 8 0 amappl12 168 890 0 842 3 0 3 3 0 8 0 amappl11 160 2 0 2 1 1 0 1 0 8 0 amappl10 152 45 0 35 1 0 1 1 0 8 0 amappl9 144 289 0 289 1 1 0 1 0 8 0 amappl8 136 38 0 36 1 0 1 1 0 8 0 amappl7 128 87 0 86 1 0 1 1 0 8 0 amappl6 120 280 0 267 1 0 1 1 0 8 0 amappl5 112 76 0 69 1 0 1 1 0 8 0 amappl4 104 386 0 360 1 0 1 1 0 8 0 amappl3 96 2047 0 1934 3 0 3 3 0 8 0 amappl2 88 678 0 600 2 0 2 2 0 8 0 amappl1 80 10394 0 9809 14 0 14 14 0 8 0 amappl 88 3542 0 3345 5 0 5 5 0 92 0 uvmvnodes 80 104 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 10 0 2 1 0 1 1 0 8 0 uaddrrnd 24 548 0 509 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 548 0 509 1 0 1 1 0 8 0 vmmpekpl 168 6400 0 6365 2 0 2 2 0 8 0 vmmpepl 168 43946 0 41795 99 0 99 99 0 357 4 vmsppl 488 547 0 509 7 1 6 6 0 8 0 rwobjpl 80 15483 0 14470 23 0 23 23 0 8 0 pdppl 4096 1104 0 1018 110 22 88 100 0 8 2 pvpl 32 14218 0 0 115 0 115 115 0 265 0 pmappl 256 547 0 509 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{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(ffffffff8339f7d0) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839519f0,1,ffff80003c46ae98) at pool_do_get+0x5df pool_get(ffffffff839519f0,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003a42a7f0,ffff80003c46b0f0,0,ffff80003c46b040) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003a42a7f0,ffff80003c46b0f0,ffff80003c46b040) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80003c46b0f0) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c46b0f0) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:775 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xf5048ed3d50, 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: 0x7c219daf58a0, 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: 0x7c219daf58a0, count: -3