panic: pool_do_get: shmpl free list modified: page 0xfffffd806c92e000; item addr 0xfffffd806c92ecb0; offset 0x40=0x69ed5ef0 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 285288 28235 32767 0x10 0 1 syz-executor *258190 50411 32767 0x10 0x4000000 0K syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83444e98) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83a9d718,1,ffff80003a7f1458) at pool_do_get+0x5df pool_get(ffffffff83a9d718,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003a7f2d20,ffff80003a7f16b0,0,ffff80003a7f1600) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003a7f2d20,ffff80003a7f16b0,ffff80003a7f1600) at sys_shmget+0x195 sys/kern/sysv_shm.c:484 syscall(ffff80003a7f16b0) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003a7f16b0) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x1c71dc0ec70, 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 0xfffffd806c92e000; item addr 0xfffffd806c92ecb0; offset 0x40=0x69ed5ef0 ddb{0}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83444e98) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83a9d718,1,ffff80003a7f1458) at pool_do_get+0x5df pool_get(ffffffff83a9d718,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003a7f2d20,ffff80003a7f16b0,0,ffff80003a7f1600) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003a7f2d20,ffff80003a7f16b0,ffff80003a7f1600) at sys_shmget+0x195 sys/kern/sysv_shm.c:484 syscall(ffff80003a7f16b0) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003a7f16b0) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x1c71dc0ec70, count: -8 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80003a7f1280 rbx 0xffffffff838e3e07 cpu_info_full_primary+0x2e07 rdx 0 rcx 0xffff80003a7f2d20 rax 0xffffffff838e2ff0 cpu_info_full_primary+0x1ff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x8da8f01c55d2b3a8 r11 0x187f1229578fbfad r12 0xffffffff838e3c08 cpu_info_full_primary+0x2c08 r13 0 r14 0 r15 0x1 rip 0xffffffff81c681d5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003a7f1270 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor) tid=258190 pid=50411 tcnt=2 stat=onproc flags process=10 proc=4000000 runpri=86, usrpri=86, slppri=17, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80003a7f34e8,0xffffffff83a24178 process=0xffff80003a7f7040 user=0xffff80003a7ec000, vmspace=0xfffffd806c6877d0 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 28235 285288 77688 32767 7 0x10 syz-executor 28235 436475 77688 32767 3 0x4000010 biowait syz-executor 62684 105245 2625 32767 2 0x10 syz-executor 62684 292447 2625 32767 3 0x4000090 fsleep syz-executor 50411 123054 33632 32767 2 0x10 syz-executor *50411 258190 33632 32767 7 0x4000010 syz-executor 36803 107691 61907 32767 3 0x90 nanoslp syz-executor 36803 428491 61907 32767 3 0x4000090 sbwait syz-executor 36803 126172 61907 32767 3 0x4000090 fsleep syz-executor 86286 376168 75526 32767 2 0x10 syz-executor 86286 345895 75526 32767 3 0x4000090 kqread syz-executor 86286 201184 75526 32767 3 0x4000090 kqread syz-executor 55885 135126 79355 32767 3 0x90 nanoslp syz-executor 55885 224408 79355 32767 3 0x4000090 fifor syz-executor 55885 82150 79355 32767 3 0x4000090 fifor syz-executor 55885 64452 79355 32767 3 0x4000090 fsleep syz-executor 77688 191270 44565 32767 3 0x90 nanoslp syz-executor 54262 202188 74231 32767 2 0x10 syz-executor 33632 470224 78890 32767 3 0x90 nanoslp syz-executor 61907 342854 5318 32767 3 0x90 nanoslp syz-executor 79355 369382 347 32767 2 0x10 syz-executor 75526 190314 28687 32767 3 0x90 nanoslp syz-executor 2625 365776 62033 32767 3 0x90 nanoslp syz-executor 74231 446579 34132 0 3 0x82 wait syz-executor 49833 341632 34132 0 3 0x82 wait syz-executor 28687 186314 34132 0 3 0x82 wait syz-executor 78890 420157 34132 0 3 0x82 wait syz-executor 62033 267903 34132 0 3 0x82 wait syz-executor 5318 461580 34132 0 3 0x82 wait syz-executor 347 40836 34132 0 3 0x82 wait syz-executor 44565 476499 34132 0 3 0x82 wait syz-executor 34132 151391 37240 0 2 0x2 syz-executor 37240 308236 12287 0 3 0x10008a sigsusp ksh 12287 26614 66162 0 3 0x98 kqread sshd-session 66162 218539 27052 0 3 0x92 kqread sshd-session 1816 330131 1 0 3 0x100083 ttyin getty 27052 496833 1 0 3 0x88 kqread sshd 72064 271762 235 73 3 0x1100090 kqread syslogd 235 293765 1 0 3 0x100082 sbwait syslogd 21748 461347 1 0 3 0x100080 kqread resolvd 73137 263076 76135 77 3 0x100092 kqread dhcpleased 86933 441547 76135 77 3 0x100092 kqread dhcpleased 76135 490367 1 0 3 0x80 kqread dhcpleased 56078 226122 0 0 3 0x14200 bored smr 4858 166379 0 0 2 0x14200 zerothread 58945 484226 0 0 3 0x14200 aiodoned aiodoned 6803 159266 0 0 3 0x14200 syncer update 92441 478348 0 0 3 0x14200 cleaner cleaner 84848 342350 0 0 3 0x14200 reaper reaper 57269 492778 0 0 3 0x14200 pgdaemon pagedaemon 29715 291945 0 0 3 0x14200 bored viomb 55723 484842 0 0 3 0x40014200 acpi0 acpi0 34204 270004 0 0 3 0x40014200 idle1 98159 380922 0 0 3 0x14200 bored softnet1 46716 365639 0 0 3 0x14200 bored softnet0 92411 222707 0 0 3 0x14200 bored systqmp 57925 509033 0 0 3 0x14200 bored systq 24642 344700 0 0 3 0x14200 tmoslp softclockmp 90528 131554 0 0 3 0x40014200 tmoslp softclock 94777 139896 0 0 3 0x40014200 idle0 1 232115 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 (0xffffffff83a9d730) #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 28235 (syz-executor) thread 0xffff80003a7f2fb8 (436475) exclusive rrwlock inode r = 0 (0xfffffd806c31d688) #0 witness_lock+0x5f1 stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5f1 sys/kern/subr_witness.c:1160 #1 rw_do_enter_write+0x419 sys/kern/kern_rwlock.c:320 #2 rrw_enter+0xc6 sys/kern/kern_rwlock.c:621 #3 VOP_LOCK+0xbd sys/kern/vfs_vops.c:527 #4 vn_lock+0xa4 sys/kern/vfs_vnops.c:576 #5 vn_write+0x18f sys/kern/vfs_vnops.c:411 #6 dofilewritev+0x2bd sys/kern/sys_generic.c:384 #7 sys_write+0xa2 sys/kern/sys_generic.c:300 #8 syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] #8 syscall+0xbd4 sys/arch/amd64/amd64/trap.c:783 #9 Xsyscall+0x128 Process 50411 (syz-executor) thread 0xffff80003a7f2d20 (258190) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff83ac91c0) #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 (0xffffffff83a9d730) #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{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 11052 12018K 12034K 166960K 12143 0 pcb 17 12K 12K 166960K 17 0 rtable 239 6K 7K 166960K 361 0 pf 31 16K 16K 166960K 31 0 ifaddr 42 7K 7K 166960K 44 0 ifgroup 50 2K 2K 166960K 50 0 sysctl 1 1K 9K 166960K 6 0 counters 70 37K 37K 166960K 70 0 ioctlops 0 0K 2K 166960K 32 0 iov 0 0K 16K 166960K 5 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1288 81K 81K 166960K 1357 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 4 0 VM map 2 1K 1K 166960K 2 0 sem 8 0K 0K 166960K 8 0 dirhash 12 2K 2K 166960K 21 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 24 89K 121K 166960K 205 0 proc 58 99K 147K 166960K 502 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 8 0 in_multi 99 7K 7K 166960K 103 0 ether_multi 1 0K 0K 166960K 2 0 mrt 0 0K 0K 166960K 2 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 55 254K 254K 166960K 55 0 exec 0 0K 1K 166960K 374 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 238 159K 179K 166960K 3549 0 UVM aobj 4 2K 2K 166960K 5 0 pinsyscall 45 90K 112K 166960K 1319 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 1 0 NDP 11 0K 2K 166960K 27 0 temp 36 9070K 9198K 166960K 4196 0 kqueue 15 22K 26K 166960K 38 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 43 0 39 1 0 1 1 0 8 0 rtentry 176 112 0 1 6 0 6 6 0 8 0 unpcb 144 85 0 67 1 0 1 1 0 8 0 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 36 0 31 2 0 2 2 0 8 1 arp 136 18 0 0 1 0 1 1 0 8 0 inpcb 328 106 0 98 2 0 2 2 0 8 1 nd6 152 25 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 455 0 0 29 0 29 29 0 8 0 art_table 40 456 0 0 5 0 5 5 0 8 0 art_node 32 112 0 11 1 0 1 1 0 8 0 sysvmsgpl 40 1 0 1 1 0 1 1 0 8 1 semapl 112 6 0 0 1 0 1 1 0 8 0 shmpl 112 2 0 1 1 0 1 1 0 8 0 pool(0xffffffff83a9d718:shmpl): page inconsistency: page 0xfffffd806c92e000; 33 on list, 1 missing, 35 items per page dirhash 1024 23 0 6 3 0 3 3 0 8 0 dino2pl 256 1658 0 193 92 0 92 92 0 8 0 ffsino 296 1658 0 193 113 0 113 113 0 8 0 nchpl 144 1945 0 250 63 0 63 63 0 8 0 vnodes 216 1739 0 0 97 0 97 97 0 8 0 namei 1024 5804 0 5804 1 0 1 1 0 8 1 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 6525 0 6524 4 3 1 3 1 8 0 plimitpl 152 38 0 13 2 0 2 2 0 8 0 sigapl 424 505 0 453 7 0 7 7 0 8 0 knotepl 120 85 0 0 3 0 3 3 0 8 0 kqueuepl 224 38 0 27 1 0 1 1 0 8 0 pipepl 344 125 0 98 3 0 3 3 0 8 0 fdescpl 528 489 0 453 3 0 3 3 0 8 0 filepl 160 1839 0 1626 10 0 10 10 0 8 0 lockfpl 104 27 0 23 1 0 1 1 0 8 0 lockfspl 48 13 0 9 1 0 1 1 0 8 0 sessionpl 144 27 0 11 1 0 1 1 0 8 0 pgrppl 48 35 0 11 1 0 1 1 0 8 0 ucredpl 104 162 0 143 1 0 1 1 0 8 0 zombiepl 144 454 0 453 1 0 1 1 0 8 0 processpl 1232 505 0 453 5 0 5 5 0 8 0 procpl 664 618 0 556 6 0 6 6 0 8 0 sosppl 176 2 0 2 1 0 1 1 0 8 1 sockpl 752 235 0 205 5 0 5 5 0 8 1 mcl64k 65536 1 0 0 1 0 1 1 0 8 0 mcl9k128 9344 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 2 0 0 1 0 1 1 0 8 0 mcl4k 4096 120 0 0 15 0 15 15 0 8 0 mcl2k 2048 24 0 0 3 0 3 3 0 8 0 mtagpl 96 3 0 0 1 0 1 1 0 8 0 mbufpl 256 245 0 0 16 0 16 16 0 8 0 bufpl 280 2309 0 102 158 0 158 158 0 8 0 anonpl 32 3708 0 0 30 0 30 30 0 246 0 amapchunkpl 152 10030 0 9505 24 0 24 24 0 158 2 amappl16 200 2014 0 1994 5 1 4 5 0 8 1 amappl15 192 4 0 4 1 1 0 1 0 8 0 amappl14 184 422 0 421 1 0 1 1 0 8 0 amappl13 176 132 0 122 1 0 1 1 0 8 0 amappl12 168 729 0 693 2 0 2 2 0 8 0 amappl11 160 9 0 9 1 1 0 1 0 8 0 amappl10 152 64 0 54 1 0 1 1 0 8 0 amappl9 144 254 0 254 1 1 0 1 0 8 0 amappl8 136 98 0 97 1 0 1 1 0 8 0 amappl7 128 143 0 132 1 0 1 1 0 8 0 amappl6 120 152 0 151 1 0 1 1 0 8 0 amappl5 112 108 0 101 1 0 1 1 0 8 0 amappl4 104 276 0 260 1 0 1 1 0 8 0 amappl3 96 1801 0 1677 5 1 4 4 0 8 0 amappl2 88 547 0 493 2 0 2 2 0 8 0 amappl1 80 10792 0 10217 16 0 16 16 0 8 0 amappl 88 2827 0 2652 5 0 5 5 0 92 0 uvmvnodes 80 99 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 4 0 1 1 0 1 1 0 8 0 uaddrrnd 24 489 0 453 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 489 0 453 1 0 1 1 0 8 0 vmmpekpl 168 6119 0 6090 2 0 2 2 0 8 0 vmmpepl 168 41478 0 39483 103 0 103 103 0 357 8 vmsppl 488 488 0 453 7 1 6 6 0 8 0 rwobjpl 80 15447 0 14511 25 0 25 25 0 8 1 pdppl 4096 985 0 906 113 28 85 95 0 8 6 pvpl 32 11579 0 0 94 0 94 94 0 265 0 pmappl 256 488 0 453 4 1 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 285 0 31 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(ffffffff83444e98) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83a9d718,1,ffff80003a7f1458) at pool_do_get+0x5df pool_get(ffffffff83a9d718,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003a7f2d20,ffff80003a7f16b0,0,ffff80003a7f1600) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003a7f2d20,ffff80003a7f16b0,ffff80003a7f1600) at sys_shmget+0x195 sys/kern/sysv_shm.c:484 syscall(ffff80003a7f16b0) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003a7f16b0) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x1c71dc0ec70, count: -8 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp x86_ipi_db(ffff8000299bdff0) 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: 0x782b40f68f70, count: 12 ddb{1}> trace x86_ipi_db(ffff8000299bdff0) 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: 0x782b40f68f70, count: -3