panic: pool_do_get: shmpl free list modified: page 0xfffffd806cd25000; item addr 0xfffffd806cd25310; offset 0x0=0x7fff00007fff != 0x586ec2c68e500777 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 410690 93659 32767 0x10 0 1 syz-executor *322526 93659 32767 0x10 0x4000000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8300fb11) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff835103f8,1,ffff80002a0ea888) at pool_do_get+0x59d pool_get(ffffffff835103f8,1) at pool_get+0x141 shmget_allocate_segment(ffff8000371cf468,ffff80002a0eaae0,40,ffff80002a0eaa30) at shmget_allocate_segment+0x1a7 sys_shmget(ffff8000371cf468,ffff80002a0eaae0,ffff80002a0eaa30) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:480 syscall(ffff80002a0eaae0) at syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:179 [inline] syscall(ffff80002a0eaae0) at syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x63ec94f69e0, 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 0xfffffd806cd25000; item addr 0xfffffd806cd25310; offset 0x0=0x7fff00007fff != 0x586ec2c68e500777 ddb{0}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8300fb11) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff835103f8,1,ffff80002a0ea888) at pool_do_get+0x59d pool_get(ffffffff835103f8,1) at pool_get+0x141 shmget_allocate_segment(ffff8000371cf468,ffff80002a0eaae0,40,ffff80002a0eaa30) at shmget_allocate_segment+0x1a7 sys_shmget(ffff8000371cf468,ffff80002a0eaae0,ffff80002a0eaa30) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:480 syscall(ffff80002a0eaae0) at syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:179 [inline] syscall(ffff80002a0eaae0) at syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x63ec94f69e0, count: -8 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80002a0ea6d0 rbx 0xffffffff834c5dcf cpu_info_full_primary+0x2dcf rdx 0 rcx 0xffff8000371cf468 rax 0xffffffff834c4ff0 cpu_info_full_primary+0x1ff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x94b4c63e439c0e18 r11 0x5524861097e5f06f r12 0xffffffff834c5bd0 cpu_info_full_primary+0x2bd0 r13 0 r14 0 r15 0x1 rip 0xffffffff81972da5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002a0ea6c0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor) tid=322526 pid=93659 tcnt=3 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=0xffff8000371ce7c0,0xffffffff83602938 process=0xffff800042886d50 user=0xffff80002a0e5000, vmspace=0xfffffd806beb6388 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 93659 410690 20749 32767 7 0x10 syz-executor 93659 401939 20749 32767 3 0x4000090 fsleep syz-executor *93659 322526 20749 32767 7 0x4000010 syz-executor 75280 214547 48888 32767 3 0x400090 nanoslp syz-executor 75280 402826 48888 32767 3 0x4400090 fsleep syz-executor 75280 381864 48888 32767 3 0x4400090 pipewr syz-executor 75280 521312 48888 32767 3 0x4400090 fsleep syz-executor 78981 14043 73050 32767 3 0x90 nanoslp syz-executor 78981 118804 73050 32767 3 0x4000090 fsleep syz-executor 78981 5259 73050 32767 3 0x4000090 kqread syz-executor 14339 383369 33447 32767 3 0x90 nanoslp syz-executor 14339 293673 33447 32767 3 0x4000090 sbwait syz-executor 14339 20643 33447 32767 3 0x4000090 sbwait syz-executor 14339 300311 33447 32767 3 0x4000090 fsleep syz-executor 48888 62033 76685 32767 3 0x90 nanoslp syz-executor 20749 77444 36358 32767 3 0x90 nanoslp syz-executor 69958 250995 88937 32767 3 0x90 nanoslp syz-executor 33447 65951 63621 32767 3 0x90 nanoslp syz-executor 73050 518063 18254 32767 3 0x90 nanoslp syz-executor 98632 401317 34744 32767 3 0x90 nanoslp syz-executor 76685 235381 99731 0 3 0x82 wait syz-executor 13955 296534 86593 32767 3 0x90 wait syz-executor 63621 379943 99731 0 3 0x82 wait syz-executor 18254 378565 99731 0 3 0x82 wait syz-executor 34744 464619 99731 0 3 0x82 wait syz-executor 88937 464972 99731 0 3 0x82 wait syz-executor 36358 414039 99731 0 3 0x82 wait syz-executor 86593 384646 99731 0 3 0x82 wait syz-executor 84855 424057 78371 0 3 0x82 netio sshd-session 95697 113915 82688 0 3 0x100082 sbwait ndp 82688 376922 92044 0 3 0x10008a sigsusp sh 92044 242667 75711 0 3 0x80 wait syz-executor 75711 495982 99731 0 3 0x82 wait syz-executor 53675 484750 0 0 3 0x14200 bored sosplice 99731 28782 25075 0 3 0x82 kqread syz-executor 25075 414143 78725 0 3 0x10008a sigsusp ksh 78725 479658 90282 0 3 0x98 kqread sshd-session 90282 504564 78371 0 3 0x92 kqread sshd-session 25014 63417 1 0 3 0x100083 ttyin getty 78371 407879 1 0 3 0x88 kqread sshd 21736 80282 7292 73 3 0x1100090 kqread syslogd 7292 348683 1 0 3 0x100082 sbwait syslogd 17827 453380 1 0 3 0x100080 kqread resolvd 7240 27581 92246 77 3 0x100092 kqread dhcpleased 57597 490781 92246 77 3 0x100092 kqread dhcpleased 92246 195028 1 0 3 0x80 kqread dhcpleased 7832 46667 0 0 3 0x14200 bored smr 91767 72305 0 0 3 0x14200 pgzero zerothread 29689 33756 0 0 3 0x14200 aiodoned aiodoned 12494 496888 0 0 3 0x14200 syncer update 35525 306466 0 0 3 0x14200 cleaner cleaner 84409 172460 0 0 3 0x14200 reaper reaper 90011 95317 0 0 3 0x14200 pgdaemon pagedaemon 37571 209745 0 0 3 0x14200 bored viomb 54005 132692 0 0 3 0x40014200 acpi0 acpi0 86516 300760 0 0 3 0x40014200 idle1 77095 24235 0 0 3 0x14200 bored softnet3 96615 313084 0 0 3 0x14200 bored softnet2 2594 487371 0 0 3 0x14200 bored softnet1 63249 237439 0 0 3 0x14200 bored softnet0 62843 334224 0 0 3 0x14200 bored systqmp 9586 79139 0 0 3 0x14200 bored systq 23388 461079 0 0 3 0x14200 tmoslp softclockmp 97954 199063 0 0 3 0x40014200 tmoslp softclock 76993 139626 0 0 3 0x40014200 idle0 1 420017 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 (0xffffffff83510408) #0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5bb sys/kern/subr_witness.c:1155 #1 mtx_enter_try+0x178 #2 mtx_enter+0x60 sys/kern/kern_lock.c:239 #3 pool_get+0x103 sys/kern/subr_pool.c:579 #4 shmget_allocate_segment+0x1a7 #5 sys_shmget+0x1b2 sys/kern/sysv_shm.c:480 #6 syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:179 [inline] #6 syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 #7 Xsyscall+0x128 Process 93659 (syz-executor) thread 0xffff8000371ce7c0 (401939) exclusive rwlock futex r = 0 (0xffffffff834cb200) #0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5bb sys/kern/subr_witness.c:1155 #1 sys_futex+0x69 sys/kern/sys_futex.c:98 #2 syscall+0xbb6 mi_syscall sys/sys/syscall_mi.h:179 [inline] #2 syscall+0xbb6 sys/arch/amd64/amd64/trap.c:577 #3 Xsyscall+0x128 Process 93659 (syz-executor) thread 0xffff8000371cf468 (322526) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff83603a10) #0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5bb sys/kern/subr_witness.c:1155 #1 syscall+0xad6 mi_syscall sys/sys/syscall_mi.h:179 [inline] #1 syscall+0xad6 sys/arch/amd64/amd64/trap.c:577 #2 Xsyscall+0x128 exclusive mutex shmpl r = 0 (0xffffffff83510408) #0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5bb sys/kern/subr_witness.c:1155 #1 mtx_enter_try+0x178 #2 mtx_enter+0x60 sys/kern/kern_lock.c:239 #3 pool_get+0x103 sys/kern/subr_pool.c:579 #4 shmget_allocate_segment+0x1a7 #5 sys_shmget+0x1b2 sys/kern/sysv_shm.c:480 #6 syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:179 [inline] #6 syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 #7 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10190 14120K 14131K 166960K 11340 0 pcb 17 12K 12K 166960K 17 0 rtable 234 6K 7K 166960K 1059 0 pf 31 16K 16K 166960K 81 0 ifaddr 42 7K 7K 166960K 141 0 ifgroup 50 2K 2K 166960K 148 0 sysctl 0 0K 0K 166960K 1 0 counters 64 36K 36K 166960K 112 0 ioctlops 0 0K 2K 166960K 123 0 iov 0 0K 16K 166960K 25 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1457 92K 92K 166960K 1760 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 7 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 14 0 dirhash 18 3K 3K 166960K 21 0 ACPI 1690 195K 286K 166960K 12418 0 file desc 27 101K 157K 166960K 826 0 sigio 0 0K 0K 166960K 6 0 proc 58 79K 176K 166960K 1163 0 subproc 104 6K 12K 166960K 429 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 90 0 in_multi 99 7K 7K 166960K 370 0 ether_multi 1 0K 0K 166960K 4 0 mrt 0 0K 0K 166960K 1 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 671 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 287 75K 130K 166960K 7473 0 UVM aobj 18 2K 2K 166960K 21 0 pinsyscall 51 102K 126K 166960K 2435 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 34 0 NDP 11 0K 2K 166960K 96 0 temp 49 6817K 6881K 166960K 8033 0 kqueue 14 22K 26K 166960K 70 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 24 0 0 1 0 1 1 0 8 0 rtpcb 120 110 0 106 1 0 1 1 0 8 0 rtentry 112 370 0 260 4 0 4 4 0 8 0 unpcb 144 452 0 431 6 0 6 6 0 8 5 syncache 336 8 0 8 2 2 0 1 0 8 0 tcpqe 32 1 0 1 1 1 0 1 0 8 0 tcpcb 808 239 0 232 9 7 2 8 0 8 1 arp 120 63 0 45 1 0 1 1 0 8 0 ipq 40 3 0 0 1 0 1 1 0 8 0 ipqe 40 3 0 0 1 0 1 1 0 8 0 inpcb 336 631 0 619 9 7 2 7 0 8 0 nd6 136 100 0 76 2 0 2 2 0 8 0 kcovpl 48 33 0 25 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1506 0 1048 46 17 29 30 0 8 0 art_table 32 1507 0 1048 4 0 4 4 0 8 0 art_node 16 369 0 269 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 1 0 1 0 8 0 semapl 112 12 0 2 1 0 1 1 0 8 0 shmpl 112 18 0 4 1 0 1 1 0 8 0 shmpl: pool(0xffffffff835103f8:shmpl): free list modified: page 0xfffffd806cd25000; item ordinal 0; addr 0xfffffd806cd25310 (p 0xfffffd806cd25000); offset 0x0=0x7fff00007fff shmpl: pool(0xffffffff835103f8:shmpl): page inconsistency: page 0xfffffd806cd25000; item ordinal 1; addr 0xe96d221c6b37aad6 dirhash 1024 23 0 2 3 0 3 3 0 8 0 dino2pl 256 2077 0 513 98 0 98 98 0 8 0 ffsino 272 2077 0 513 105 0 105 105 0 8 0 nchpl 144 2701 0 989 64 0 64 64 0 8 0 uvmvnodes 80 2515 0 0 52 0 52 52 0 8 0 vnodes 216 2515 0 0 140 0 140 140 0 8 0 namei 1024 10579 0 10579 3 2 1 1 0 8 1 percpumem 16 70 0 24 1 0 1 1 0 8 0 kstatmem 264 70 0 48 2 0 2 2 0 8 0 scxspl 216 19754 0 19754 11 10 1 8 1 8 1 plimitpl 152 156 0 127 2 0 2 2 0 8 0 sigapl 424 1053 0 994 11 3 8 9 0 8 0 futexpl 64 4855 0 4850 4 3 1 1 0 8 0 knotepl 120 152 0 0 5 0 5 5 0 8 0 kqueuepl 216 109 0 98 1 0 1 1 0 8 0 pipepl 320 248 0 218 7 2 5 6 0 8 1 fdescpl 496 1034 0 994 8 1 7 7 0 8 0 filepl 152 4510 0 4242 16 0 16 16 0 8 3 lockfpl 104 77 0 74 1 0 1 1 0 8 0 lockfspl 48 27 0 24 1 0 1 1 0 8 0 sessionpl 144 49 0 32 1 0 1 1 0 8 0 pgrppl 48 86 0 61 1 0 1 1 0 8 0 ucredpl 104 675 0 657 1 0 1 1 0 8 0 zombiepl 144 997 0 994 1 0 1 1 0 8 0 processpl 1160 1053 0 994 6 0 6 6 0 8 0 procpl 648 1614 0 1545 7 0 7 7 0 8 0 srpgc 96 4 0 4 2 1 1 1 0 8 1 sosppl 168 6 0 6 3 2 1 1 0 8 1 sockpl 664 1205 0 1168 21 9 12 15 0 8 8 mcl64k 65536 4 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 4 0 0 1 0 1 1 0 8 0 mcl4k 4096 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 240 0 0 30 0 30 30 0 8 0 mtagpl 96 3 0 0 1 0 1 1 0 8 0 mbufpl 256 294 0 0 17 0 17 17 0 8 0 bufpl 280 6410 0 236 442 0 442 442 0 8 0 anonpl 24 201646 0 193780 52 0 52 52 0 185 4 amapchunkpl 152 24831 0 24183 59 6 53 59 0 158 28 amappl16 200 4376 0 4121 31 16 15 15 0 8 1 amappl15 192 10 0 10 1 1 0 1 0 8 0 amappl14 184 165 0 152 1 0 1 1 0 8 0 amappl13 176 9 0 9 1 1 0 1 0 8 0 amappl12 168 2000 0 1960 5 2 3 3 0 8 1 amappl11 160 46 0 36 1 0 1 1 0 8 0 amappl10 152 7 0 7 1 1 0 1 0 8 0 amappl9 144 141 0 141 1 1 0 1 0 8 0 amappl8 136 19 0 18 1 0 1 1 0 8 0 amappl7 128 142 0 130 1 0 1 1 0 8 0 amappl6 120 391 0 389 1 0 1 1 0 8 0 amappl5 112 216 0 207 1 0 1 1 0 8 0 amappl4 104 362 0 347 1 0 1 1 0 8 0 amappl3 96 4609 0 4464 4 0 4 4 0 8 0 amappl2 88 1015 0 943 2 0 2 2 0 8 0 amappl1 80 11802 0 11140 16 0 16 16 0 8 0 amappl 88 6933 0 6712 6 0 6 6 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 20 0 3 1 0 1 1 0 8 0 uaddrrnd 24 1034 0 994 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1034 0 994 1 0 1 1 0 8 0 vmmpekpl 168 10111 0 10046 4 0 4 4 0 8 0 vmmpepl 168 70895 0 68427 113 4 109 109 0 357 1 vmsppl 440 1033 0 994 6 0 6 6 0 8 0 rwobjpl 56 26180 0 22390 54 0 54 54 0 8 0 pdppl 4096 2075 0 1988 197 106 91 113 0 8 4 pvpl 32 29413 0 0 237 0 237 237 0 265 0 pmappl 248 1033 0 994 5 1 4 4 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 527 0 143 12 0 12 12 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:437 panic(ffffffff8300fb11) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff835103f8,1,ffff80002a0ea888) at pool_do_get+0x59d pool_get(ffffffff835103f8,1) at pool_get+0x141 shmget_allocate_segment(ffff8000371cf468,ffff80002a0eaae0,40,ffff80002a0eaa30) at shmget_allocate_segment+0x1a7 sys_shmget(ffff8000371cf468,ffff80002a0eaae0,ffff80002a0eaa30) at sys_shmget+0x1b2 sys/kern/sysv_shm.c:480 syscall(ffff80002a0eaae0) at syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:179 [inline] syscall(ffff80002a0eaae0) at syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x63ec94f69e0, count: -8 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp x86_ipi_db(ffff800029b7bff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:393 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: 0x721289b7f670, count: 12 ddb{1}> trace x86_ipi_db(ffff800029b7bff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:393 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: 0x721289b7f670, count: -3