panic: pool_do_get: shmpl free list modified: page 0xfffffd805ff6d000; item addr 0xfffffd805ff6dbd0; offset 0x40=0x69fb124b Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 281361 47114 32767 0x10 0x4000000 1 syz-executor *206574 1502 32767 0x10 0x4000000 0K 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,ffff80002a342428) at pool_do_get+0x5df pool_get(ffffffff839c8bd8,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003abe6028,ffff80002a342680,1b0,ffff80002a3425d0) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003abe6028,ffff80002a342680,ffff80002a3425d0) at sys_shmget+0x195 sys/kern/sysv_shm.c:484 syscall(ffff80002a342680) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002a342680) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa0201ba9ce0, 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 0xfffffd805ff6d000; item addr 0xfffffd805ff6dbd0; offset 0x40=0x69fb124b ddb{0}> 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,ffff80002a342428) at pool_do_get+0x5df pool_get(ffffffff839c8bd8,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003abe6028,ffff80002a342680,1b0,ffff80002a3425d0) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003abe6028,ffff80002a342680,ffff80002a3425d0) at sys_shmget+0x195 sys/kern/sysv_shm.c:484 syscall(ffff80002a342680) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002a342680) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa0201ba9ce0, count: -8 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80002a342250 rbx 0xffffffff838bfe07 cpu_info_full_primary+0x2e07 rdx 0xffff8000015dc5c0 rcx 0xffff80003abe6028 rax 0xffffffff838beff0 cpu_info_full_primary+0x1ff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x53b5c40108affee0 r11 0x9d65fc462a7350df r12 0xffffffff838bfc08 cpu_info_full_primary+0x2c08 r13 0 r14 0 r15 0x1 rip 0xffffffff816805c5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002a342240 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor) tid=206574 pid=1502 tcnt=2 stat=onproc flags process=10 proc=4000000 runpri=50, usrpri=50, slppri=16, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80003abe67f0,0xffff80003abe74f8 process=0xffff8000fffeb040 user=0xffff80002a33d000, vmspace=0xfffffd806c9977c0 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 45082 163787 42413 0 2 0 syz-executor 47114 46612 66610 32767 2 0x10 syz-executor 47114 129508 66610 32767 2 0x4000010 syz-executor 47114 281361 66610 32767 7 0x4000010 syz-executor 47114 429932 66610 32767 3 0x4000090 fsleep syz-executor 1502 497390 89720 32767 2 0x10 syz-executor * 1502 206574 89720 32767 7 0x4000010 syz-executor 42413 323700 14714 0 2 0x2 syz-executor 80556 416588 76447 0 3 0x100082 sbwait arp 76447 318703 48605 0 3 0x10008a sigsusp sh 2819 279532 29512 32767 3 0x90 piperd syz-executor 48605 266564 73580 0 3 0x80 wait syz-executor 89720 498915 61145 32767 3 0x90 nanoslp syz-executor 77145 279014 66648 32767 3 0x90 piperd syz-executor 26213 21492 21868 32767 3 0x90 nanoslp syz-executor 66610 178800 88844 32767 3 0x90 nanoslp syz-executor 61145 144801 14714 0 3 0x82 wait syz-executor 73580 267852 14714 0 3 0x82 wait syz-executor 21868 110398 14714 0 3 0x82 wait syz-executor 66648 25508 14714 0 3 0x82 wait syz-executor 29512 201869 14714 0 3 0x82 wait syz-executor 88844 448820 14714 0 3 0x82 wait syz-executor 14714 492239 26045 0 3 0x82 nanoslp syz-executor 26045 84805 83965 0 3 0x10008a sigsusp ksh 83965 269273 49471 0 3 0x98 kqread sshd-session 49471 20219 89016 0 3 0x92 kqread sshd-session 69575 160967 1 0 3 0x100083 ttyin getty 89016 126033 1 0 3 0x88 kqread sshd 76203 194416 45721 73 3 0x1100090 kqread syslogd 45721 162544 1 0 3 0x100082 sbwait syslogd 32266 128770 1 0 3 0x100080 kqread resolvd 30698 38691 50125 77 3 0x100092 kqread dhcpleased 44344 389012 50125 77 3 0x100092 kqread dhcpleased 50125 522107 1 0 3 0x80 kqread dhcpleased 42679 351169 0 0 3 0x14200 bored smr 37697 226517 0 0 2 0x14200 zerothread 42754 487578 0 0 3 0x14200 aiodoned aiodoned 42312 218054 0 0 3 0x14200 syncer update 56413 294348 0 0 3 0x14200 cleaner cleaner 50093 223056 0 0 3 0x14200 reaper reaper 33016 85012 0 0 3 0x14200 pgdaemon pagedaemon 81958 463021 0 0 3 0x14200 bored viomb 88993 344104 0 0 3 0x40014200 acpi0 acpi0 54615 307908 0 0 3 0x40014200 idle1 23885 83155 0 0 3 0x14200 bored softnet1 58581 448493 0 0 3 0x14200 bored softnet0 55420 405166 0 0 3 0x14200 bored systqmp 29612 326975 0 0 3 0x14200 bored systq 73907 491663 0 0 3 0x14200 tmoslp softclockmp 85541 25545 0 0 3 0x40014200 tmoslp softclock 31374 440927 0 0 3 0x40014200 idle0 1 140922 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 (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 1502 (syz-executor) thread 0xffff80003abe6028 (206574) 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{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 11071 12017K 12034K 166960K 12169 0 pcb 17 12K 12K 166960K 17 0 rtable 177 5K 6K 166960K 340 0 pf 27 16K 16K 166960K 31 0 ifaddr 32 5K 7K 166960K 42 0 ifgroup 42 1K 2K 166960K 50 0 sysctl 1 1K 9K 166960K 5 0 counters 66 36K 37K 166960K 70 0 ioctlops 0 0K 2K 166960K 32 0 iov 0 0K 20K 166960K 15 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1296 82K 82K 166960K 1572 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 27 0 dirhash 12 2K 2K 166960K 21 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 21 77K 121K 166960K 410 0 sigio 0 0K 0K 166960K 5 0 proc 58 99K 147K 166960K 507 0 subproc 63 3K 5K 166960K 279 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 40 0 in_multi 67 5K 6K 166960K 95 0 ether_multi 1 0K 0K 166960K 1 0 mrt 0 0K 0K 166960K 11 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 205 917K 917K 166960K 205 0 exec 0 0K 1K 166960K 389 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 212 136K 162K 166960K 4863 0 UVM aobj 7 2K 2K 166960K 8 0 pinsyscall 43 86K 115K 166960K 1452 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 17 0 NDP 9 0K 1K 166960K 25 0 temp 38 9079K 9145K 166960K 4961 0 kqueue 13 20K 26K 166960K 55 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 46 0 42 1 0 1 1 0 8 0 rtentry 176 107 0 27 5 0 5 5 0 8 0 unpcb 144 168 0 153 2 0 2 2 0 8 1 syncache 336 4 0 4 1 0 1 1 0 8 1 tcpcb 736 78 0 74 2 0 2 2 0 8 1 arp 136 17 0 4 1 0 1 1 0 8 0 ipq 40 1 0 0 1 0 1 1 0 8 0 ipqe 40 1 0 0 1 0 1 1 0 8 0 inpcb 328 231 0 223 4 0 4 4 0 8 3 nd6 152 25 0 10 1 0 1 1 0 8 0 kcovpl 48 31 0 24 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 431 0 108 27 0 27 27 0 8 4 art_table 40 432 0 108 5 0 5 5 0 8 0 art_node 32 107 0 34 1 0 1 1 0 8 0 sysvmsgpl 40 2 0 2 1 0 1 1 0 8 1 semupl 112 3 0 3 1 0 1 1 0 8 1 semapl 112 25 0 15 1 0 1 1 0 8 0 shmpl 112 5 0 1 1 0 1 1 0 8 0 pool(0xffffffff839c8bd8:shmpl): page inconsistency: page 0xfffffd805ff6d000; 30 on list, 4 missing, 35 items per page dirhash 1024 23 0 6 3 0 3 3 0 8 0 dino2pl 256 1846 0 362 93 0 93 93 0 8 0 ffsino 296 1846 0 362 115 0 115 115 0 8 0 nchpl 144 2299 0 591 64 0 64 64 0 8 0 vnodes 216 2134 0 0 119 0 119 119 0 8 0 namei 1024 7219 0 7219 1 0 1 1 0 8 1 percpumem 16 50 0 2 1 0 1 1 0 8 0 kstatmem 264 25 0 4 2 0 2 2 0 8 0 scxspl 216 7858 0 7858 10 2 8 8 1 8 8 plimitpl 152 230 0 208 2 0 2 2 0 8 1 sigapl 424 648 0 599 7 0 7 7 0 8 0 knotepl 120 291 0 0 9 0 9 9 0 8 0 kqueuepl 224 63 0 54 1 0 1 1 0 8 0 pipepl 344 204 0 177 4 0 4 4 0 8 0 fdescpl 528 632 0 599 3 0 3 3 0 8 0 filepl 160 2896 0 2700 12 0 12 12 0 8 3 lockfpl 104 112 0 110 1 0 1 1 0 8 0 lockfspl 48 24 0 22 1 0 1 1 0 8 0 sessionpl 144 48 0 33 1 0 1 1 0 8 0 pgrppl 48 79 0 57 1 0 1 1 0 8 0 ucredpl 104 378 0 362 1 0 1 1 0 8 0 zombiepl 144 600 0 599 1 0 1 1 0 8 0 processpl 1232 648 0 599 5 0 5 5 0 8 0 procpl 664 972 0 919 6 0 6 6 0 8 0 sosppl 176 3 0 3 1 0 1 1 0 8 1 sockpl 752 447 0 420 8 0 8 8 0 8 5 mcl64k 65536 3 0 0 1 0 1 1 0 8 0 mcl8k 8192 1 0 0 1 0 1 1 0 8 0 mcl4k 4096 127 0 0 16 0 16 16 0 8 0 mcl2k 2048 28 0 0 4 0 4 4 0 8 0 mtagpl 96 2 0 0 1 0 1 1 0 8 0 mbufpl 256 271 0 0 17 0 17 17 0 8 0 bufpl 280 2555 0 102 176 0 176 176 0 8 0 anonpl 32 7543 0 0 61 0 61 61 0 246 0 amapchunkpl 152 14626 0 14190 27 0 27 27 0 158 9 amappl16 200 2198 0 2183 15 5 10 14 0 8 8 amappl15 192 9 0 9 1 1 0 1 0 8 0 amappl14 184 396 0 394 1 0 1 1 0 8 0 amappl13 176 202 0 191 1 0 1 1 0 8 0 amappl12 168 876 0 846 2 0 2 2 0 8 0 amappl11 160 5 0 5 1 1 0 1 0 8 0 amappl10 152 63 0 53 1 0 1 1 0 8 0 amappl9 144 264 0 264 1 1 0 1 0 8 0 amappl8 136 93 0 92 1 0 1 1 0 8 0 amappl7 128 133 0 121 1 0 1 1 0 8 0 amappl6 120 151 0 149 1 0 1 1 0 8 0 amappl5 112 89 0 81 1 0 1 1 0 8 0 amappl4 104 242 0 227 1 0 1 1 0 8 0 amappl3 96 2664 0 2557 5 1 4 4 0 8 0 amappl2 88 478 0 424 2 0 2 2 0 8 0 amappl1 80 9830 0 9243 15 0 15 15 0 8 0 amappl 88 4159 0 4012 5 0 5 5 0 92 0 uvmvnodes 80 103 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 7 0 1 1 0 1 1 0 8 0 uaddrrnd 24 632 0 599 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 632 0 599 1 0 1 1 0 8 0 vmmpekpl 168 6942 0 6899 3 0 3 3 0 8 0 vmmpepl 168 47088 0 45233 104 0 104 104 0 357 15 vmsppl 488 631 0 599 7 1 6 6 0 8 0 rwobjpl 80 15571 0 14617 26 0 26 26 0 8 3 pdppl 4096 1271 0 1198 105 24 81 95 0 8 8 pvpl 32 14892 0 0 121 0 121 121 0 265 0 pmappl 256 631 0 599 4 1 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 279 0 27 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(ffffffff834499f9) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839c8bd8,1,ffff80002a342428) at pool_do_get+0x5df pool_get(ffffffff839c8bd8,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003abe6028,ffff80002a342680,1b0,ffff80002a3425d0) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003abe6028,ffff80002a342680,ffff80002a3425d0) at sys_shmget+0x195 sys/kern/sysv_shm.c:484 syscall(ffff80002a342680) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002a342680) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa0201ba9ce0, 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 __mp_lock(ffffffff83a7ea00) at __mp_lock+0x199 __mp_lock_spin sys/kern/kern_lock.c:142 [inline] __mp_lock(ffffffff83a7ea00) at __mp_lock+0x199 sys/kern/kern_lock.c:173 vn_read(fffffd807922b3e0,ffff80002a34ec50,0) at vn_read+0x56 sys/kern/vfs_vnops.c:357 dofilereadv(ffff80003abe6d20,7,ffff80002a34ec50,0,ffff80002a34ed10) at dofilereadv+0x25a sys/kern/sys_generic.c:252 sys_readv(ffff80003abe6d20,ffff80002a34edc0,ffff80002a34ed10) at sys_readv+0xd8 sys/kern/sys_generic.c:199 syscall(ffff80002a34edc0) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002a34edc0) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa1ce1a5db60, count: 6 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 __mp_lock(ffffffff83a7ea00) at __mp_lock+0x199 __mp_lock_spin sys/kern/kern_lock.c:142 [inline] __mp_lock(ffffffff83a7ea00) at __mp_lock+0x199 sys/kern/kern_lock.c:173 vn_read(fffffd807922b3e0,ffff80002a34ec50,0) at vn_read+0x56 sys/kern/vfs_vnops.c:357 dofilereadv(ffff80003abe6d20,7,ffff80002a34ec50,0,ffff80002a34ed10) at dofilereadv+0x25a sys/kern/sys_generic.c:252 sys_readv(ffff80003abe6d20,ffff80002a34edc0,ffff80002a34ed10) at sys_readv+0xd8 sys/kern/sys_generic.c:199 syscall(ffff80002a34edc0) at syscall+0xbd4 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002a34edc0) at syscall+0xbd4 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa1ce1a5db60, count: -9