panic: pool_do_get: shmpl free list modified: page 0xfffffd80699c9000; item addr 0xfffffd80699c9b60; offset 0x40=0xfe1ecc84 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 450186 8857 0 0 0 0 syz-executor * 78930 8857 0 0 0x4000000 1K syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83441f27) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839ee508,1,ffff80002a3602c8) at pool_do_get+0x5df pool_get(ffffffff839ee508,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003c407a18,ffff80002a360520,45,ffff80002a360470) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003c407a18,ffff80002a360520,ffff80002a360470) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80002a360520) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002a360520) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x90d5de469d0, 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 0xfffffd80699c9000; item addr 0xfffffd80699c9b60; offset 0x40=0xfe1ecc84 ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83441f27) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839ee508,1,ffff80002a3602c8) at pool_do_get+0x5df pool_get(ffffffff839ee508,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003c407a18,ffff80002a360520,45,ffff80002a360470) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003c407a18,ffff80002a360520,ffff80002a360470) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80002a360520) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002a360520) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x90d5de469d0, count: -8 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff80002a3600f0 rbx 0xffff8000299aee07 rdx 0 rcx 0xffff80003c407a18 rax 0xffff8000299adff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x4f9db02a90b6f6bf r11 0xb43b8fedd6cfcdd9 r12 0xffff8000299aec08 r13 0 r14 0 r15 0x1 rip 0xffffffff831693e5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002a3600e0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor) tid=78930 pid=8857 tcnt=3 stat=onproc flags process=0 proc=4000000 runpri=32, usrpri=50, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80003c406fb8,0xffff80003c4074f8 process=0xffff80002a38dcf8 user=0xffff80002a35b000, vmspace=0xfffffd806c7dab90 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 3841 288586 48529 0 2 0 syz-executor 8857 450186 61403 0 7 0 syz-executor 8857 505070 61403 0 2 0x4000000 syz-executor * 8857 78930 61403 0 7 0x4000000 syz-executor 74245 162617 36594 0 2 0 syz-executor 74083 287669 86676 0 2 0 syz-executor 74083 31708 86676 0 3 0x4000080 fsleep syz-executor 45171 36861 46642 0 2 0 syz-executor 45171 455344 46642 0 3 0x4000080 fsleep syz-executor 59894 486122 29328 0 2 0 syz-executor 59894 295200 29328 0 3 0x4000080 lockf syz-executor 59894 279829 29328 0 2 0x4000000 syz-executor 36594 135554 41368 0 3 0x82 nanoslp syz-executor 42810 421952 0 0 3 0x14200 acct acct 14388 244914 1 0 3 0x82 nanoslp getty 92868 225938 5558 0 3 0x100082 sbwait arp 5558 225676 12345 0 3 0x10008a sigsusp sh 12345 308027 41368 0 3 0x82 wait syz-executor 29328 429579 41368 0 3 0x82 nanoslp syz-executor 61403 520883 41368 0 3 0x82 nanoslp syz-executor 86676 120991 41368 0 3 0x82 nanoslp syz-executor 46642 130839 41368 0 3 0x82 nanoslp syz-executor 48529 42207 41368 0 3 0x82 nanoslp syz-executor 53232 187223 41368 0 3 0x2 biowait syz-executor 41368 501379 1 0 3 0x82 kqread syz-executor 31042 144925 0 0 3 0x14200 bored smr 71272 225317 0 0 2 0x14200 zerothread 41710 475590 0 0 3 0x14200 aiodoned aiodoned 18800 152564 0 0 3 0x14200 syncer update 94050 287577 0 0 3 0x14200 cleaner cleaner 68309 470549 0 0 3 0x14200 reaper reaper 3268 166264 0 0 3 0x14200 pgdaemon pagedaemon 12332 422381 0 0 3 0x14200 bored viomb 60802 75919 0 0 3 0x40014200 acpi0 acpi0 83426 263526 0 0 3 0x40014200 idle1 7410 397808 0 0 3 0x14200 bored softnet1 44194 181762 0 0 3 0x14200 bored softnet0 84773 3296 0 0 3 0x14200 bored systqmp 31341 3364 0 0 3 0x14200 bored systq 89599 35229 0 0 3 0x14200 tmoslp softclockmp 56021 277551 0 0 3 0x40014200 tmoslp softclock 48202 1690 0 0 3 0x40014200 idle0 1 478522 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 (0xffffffff839ee520) #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:482 #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 8857 (syz-executor) thread 0xffff80003c407a18 (78930) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff839f7f40) #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 (0xffffffff839ee520) #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:482 #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 53232 (syz-executor) thread 0xffff8000ffffc2a0 (187223) exclusive rrwlock inode r = 0 (0xfffffd806e80d6e0) #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 ufs_ihashins+0x4f ufs_ihash sys/ufs/ufs/ufs_ihash.c:-1 [inline] #4 ufs_ihashins+0x4f sys/ufs/ufs/ufs_ihash.c:159 #5 ffs_vget+0x187 sys/ufs/ffs/ffs_vfsops.c:1232 #6 ffs_inode_alloc+0x279 sys/ufs/ffs/ffs_alloc.c:393 #7 ufs_mkdir+0xfc sys/ufs/ufs/ufs_vnops.c:1112 #8 VOP_MKDIR+0x101 sys/kern/vfs_vops.c:394 #9 domkdirat+0x179 sys/kern/vfs_syscalls.c:3143 #10 syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] #10 syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 #11 Xsyscall+0x128 exclusive rrwlock inode r = 0 (0xfffffd806d6c8678) #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:570 #5 vfs_lookup+0x11c sys/kern/vfs_lookup.c:-1 #6 namei+0x7ca sys/kern/vfs_lookup.c:250 #7 domkdirat+0x8b sys/kern/vfs_syscalls.c:3128 #8 syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] #8 syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 #9 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 11058 12033K 12379K 166960K 12423 0 pcb 17 12K 12K 166960K 60 0 rtable 207 6K 7K 166960K 497 0 pf 37 18K 18K 166960K 70 0 ifaddr 42 7K 7K 166960K 73 0 ifgroup 57 2K 2K 166960K 94 0 sysctl 4 1K 9K 166960K 10 0 counters 72 37K 37K 166960K 96 0 ioctlops 0 0K 4K 166960K 1541 0 iov 0 0K 16K 166960K 7 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1290 81K 82K 166960K 1613 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 11 0K 0K 166960K 14 0 dirhash 12 2K 2K 166960K 18 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 17 65K 236K 166960K 488 0 sigio 0 0K 0K 166960K 4 0 proc 21 33K 164K 166960K 691 0 subproc 72 4K 4K 166960K 108 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 38 0 in_multi 89 6K 6K 166960K 149 0 ether_multi 1 0K 0K 166960K 2 0 mrt 0 0K 0K 166960K 19 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 73 334K 334K 166960K 73 0 exec 0 0K 1K 166960K 458 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 128 86K 170K 166960K 5981 0 UVM aobj 7 2K 2K 166960K 8 0 pinsyscall 21 42K 110K 166960K 1721 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 15 0K 1K 166960K 44 0 temp 45 9080K 9180K 166960K 20165 0 kqueue 1 2K 26K 166960K 83 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 67 0 66 1 0 1 1 0 8 0 rtentry 176 157 0 66 5 0 5 5 0 8 0 unpcb 144 167 0 165 1 0 1 1 0 8 0 syncache 336 4 0 4 2 1 1 1 0 8 1 tcpcb 736 68 0 66 1 0 1 1 0 8 0 arp 136 25 0 8 1 0 1 1 0 8 0 inpcb 328 408 0 405 7 0 7 7 0 8 6 nd6 152 33 0 12 1 0 1 1 0 8 0 pkpcb 40 2 0 2 1 0 1 1 0 8 1 kcovpl 48 12 0 4 1 0 1 1 0 8 0 ppxss 1192 5 0 5 1 0 1 1 0 8 1 pppxif 1576 3 0 3 1 0 1 1 0 8 1 pffrag 232 4 0 0 1 0 1 1 0 482 0 pffrnode 88 4 0 0 1 0 1 1 0 8 0 pffrent 40 4 0 0 1 0 1 1 0 8 0 pfosfp 40 1428 0 1005 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfstitem 24 34 0 1 1 0 1 1 0 8 0 pfstkey 128 36 0 3 2 0 2 2 0 8 0 pfstate 448 35 0 2 4 0 4 4 0 8 0 pfrule 1360 22 0 16 2 1 1 2 0 8 0 rttmr 136 3 0 3 1 1 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 686 0 313 28 0 28 28 0 8 4 art_table 40 687 0 313 5 0 5 5 0 8 0 art_node 32 157 0 75 1 0 1 1 0 8 0 sysvmsgpl 40 7 0 7 1 0 1 1 0 8 1 semupl 112 1 0 1 1 0 1 1 0 8 1 semapl 112 11 0 2 1 0 1 1 0 8 0 shmpl 112 5 0 1 1 0 1 1 0 8 0 pool(0xffffffff839ee508:shmpl): page inconsistency: page 0xfffffd80699c9000; 30 on list, 4 missing, 35 items per page dirhash 1024 21 0 4 3 0 3 3 0 8 0 dino2pl 256 2123 0 638 93 0 93 93 0 8 0 ffsino 296 2123 0 638 115 0 115 115 0 8 0 nchpl 144 2709 0 991 64 0 64 64 0 8 0 vnodes 216 2359 0 0 132 0 132 132 0 8 0 namei 1024 9397 0 9396 3 1 2 2 0 8 1 percpumem 16 63 0 12 1 0 1 1 0 8 0 kstatmem 264 46 0 18 3 0 3 3 0 8 1 scxspl 216 10538 0 10537 5 3 2 3 1 8 1 plimitpl 152 104 0 94 1 0 1 1 0 8 0 sigapl 424 783 0 746 7 0 7 7 0 8 0 knotepl 120 501 0 0 15 0 15 15 0 8 0 kqueuepl 224 168 0 167 5 2 3 3 0 8 2 pipepl 344 152 0 125 3 0 3 3 0 8 0 fdescpl 528 766 0 746 3 0 3 3 0 8 0 filepl 160 3870 0 3705 16 1 15 15 0 8 5 lockfpl 104 123 0 118 1 0 1 1 0 8 0 lockfspl 48 60 0 56 1 0 1 1 0 8 0 sessionpl 144 41 0 39 1 0 1 1 0 8 0 pgrppl 48 53 0 43 1 0 1 1 0 8 0 ucredpl 104 425 0 422 1 0 1 1 0 8 0 zombiepl 144 746 0 746 1 0 1 1 0 8 1 processpl 1232 783 0 746 5 0 5 5 0 8 0 procpl 664 1284 0 1241 6 0 6 6 0 8 0 sosppl 176 1 0 1 1 0 1 1 0 8 1 sockpl 752 654 0 648 10 1 9 10 0 8 8 mcl64k 65536 2 0 0 1 0 1 1 0 8 0 mcl16k 16384 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 5 0 0 1 0 1 1 0 8 0 mcl4k 4096 115 0 0 15 0 15 15 0 8 0 mcl2k2 2112 1 0 0 1 0 1 1 0 8 0 mcl2k 2048 39 0 0 4 0 4 4 0 8 0 mtagpl 96 3 0 0 1 0 1 1 0 8 0 mbufpl 256 235 0 0 15 0 15 15 0 8 0 bufpl 280 4595 0 106 321 0 321 321 0 8 0 anonpl 32 7675 0 0 62 0 62 62 0 246 0 amapchunkpl 152 18903 0 18394 27 1 26 27 0 158 6 amappl16 200 2677 0 2663 18 8 10 15 0 8 8 amappl15 192 10 0 10 2 1 1 1 0 8 1 amappl14 184 472 0 471 1 0 1 1 0 8 0 amappl13 176 127 0 125 1 0 1 1 0 8 0 amappl12 168 1034 0 1016 2 0 2 2 0 8 0 amappl11 160 33 0 32 1 0 1 1 0 8 0 amappl10 152 106 0 106 1 0 1 1 0 8 1 amappl9 144 293 0 293 2 1 1 1 0 8 1 amappl8 136 115 0 115 1 0 1 1 0 8 1 amappl7 128 154 0 151 1 0 1 1 0 8 0 amappl6 120 200 0 198 1 0 1 1 0 8 0 amappl5 112 95 0 94 1 0 1 1 0 8 0 amappl4 104 304 0 300 1 0 1 1 0 8 0 amappl3 96 3537 0 3463 4 0 4 4 0 8 1 amappl2 88 563 0 551 2 0 2 2 0 8 0 amappl1 80 11415 0 11277 17 0 17 17 0 8 7 amappl 88 5103 0 4995 5 0 5 5 0 92 1 uvmvnodes 80 111 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 767 0 747 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 767 0 747 1 0 1 1 0 8 0 vmmpekpl 168 7892 0 7853 3 0 3 3 0 8 0 vmmpepl 168 56912 0 56070 98 1 97 97 0 357 51 vmsppl 488 766 0 747 5 0 5 5 0 8 0 rwobjpl 80 18634 0 18177 29 1 28 28 0 8 1 pdppl 4096 1541 0 1494 103 52 51 87 0 8 4 pvpl 32 14733 0 0 119 0 119 119 0 265 0 pmappl 256 766 0 747 3 0 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 283 0 57 8 0 8 8 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp x86_ipi_db(ffffffff83932ff0) 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 __sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0xf kd_curproc sys/dev/kcov.c:580 [inline] __sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0xf sys/dev/kcov.c:153 intr_handler(ffff80002a239550,ffff8000002a3480) at intr_handler+0xe9 sys/arch/amd64/amd64/intr.c:560 Xintr_ioapic_edge23_untramp() at Xintr_ioapic_edge23_untramp+0x18f end of kernel end trace frame: 0x7200c877e500, count: 9 ddb{0}> trace x86_ipi_db(ffffffff83932ff0) 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 __sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0xf kd_curproc sys/dev/kcov.c:580 [inline] __sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc+0xf sys/dev/kcov.c:153 intr_handler(ffff80002a239550,ffff8000002a3480) at intr_handler+0xe9 sys/arch/amd64/amd64/intr.c:560 Xintr_ioapic_edge23_untramp() at Xintr_ioapic_edge23_untramp+0x18f end of kernel end trace frame: 0x7200c877e500, count: -6 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(ffffffff83441f27) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff839ee508,1,ffff80002a3602c8) at pool_do_get+0x5df pool_get(ffffffff839ee508,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff80003c407a18,ffff80002a360520,45,ffff80002a360470) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff80003c407a18,ffff80002a360520,ffff80002a360470) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80002a360520) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002a360520) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x90d5de469d0, count: 7 ddb{1}>