panic: pool_do_get: shmpl free list modified: page 0xfffffd806c89d000; item addr 0xfffffd806c89d0e0; offset 0x40=0x69bdf148 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 271969 21510 32767 0x10 0 1 syz-executor * 38711 21510 32767 0x10 0x4000000 0K syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83441c23) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83a10458,1,ffff80003c435698) at pool_do_get+0x5df pool_get(ffffffff83a10458,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff8000fffe62b8,ffff80003c4358f0,8,ffff80003c435840) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff8000fffe62b8,ffff80003c4358f0,ffff80003c435840) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80003c4358f0) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c4358f0) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x93b3e01ef80, 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 0xfffffd806c89d000; item addr 0xfffffd806c89d0e0; offset 0x40=0x69bdf148 ddb{0}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83441c23) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83a10458,1,ffff80003c435698) at pool_do_get+0x5df pool_get(ffffffff83a10458,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff8000fffe62b8,ffff80003c4358f0,8,ffff80003c435840) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff8000fffe62b8,ffff80003c4358f0,ffff80003c435840) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80003c4358f0) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c4358f0) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x93b3e01ef80, count: -8 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80003c4354c0 rbx 0xffffffff8392de07 cpu_info_full_primary+0x2e07 rdx 0xffff8000015a6e00 rcx 0xffff8000fffe62b8 rax 0xffffffff8392cff0 cpu_info_full_primary+0x1ff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0xd07721a38b475d9c r11 0x3f6bc0aa85fa0180 r12 0xffffffff8392dc08 cpu_info_full_primary+0x2c08 r13 0 r14 0 r15 0x1 rip 0xffffffff82fbc905 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c4354b0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor) tid=38711 pid=21510 tcnt=2 stat=onproc flags process=10 proc=4000000 runpri=32, usrpri=60, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff8000fffe6550,0xffffffff83a0be00 process=0xffff80003b3ef510 user=0xffff80003c430000, vmspace=0xfffffd806ca7b3f8 estcpu=10, cpticks=2, pctcpu=0.0, user=0, sys=2, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 21510 271969 60059 32767 7 0x10 syz-executor *21510 38711 60059 32767 7 0x4000010 syz-executor 80677 342990 83601 27 3 0x1100092 kqread sshd-auth 83601 404136 49408 0 3 0x82 kqread sshd-session 96837 433018 88403 32767 3 0x90 nanoslp syz-executor 96837 135906 88403 32767 3 0x4000090 kqread syz-executor 96837 411473 88403 32767 3 0x4000090 fsleep syz-executor 60797 329086 47808 32767 3 0x90 nanoslp syz-executor 60797 111944 47808 32767 3 0x4000090 kqpoll syz-executor 60797 506873 47808 32767 3 0x4000090 fsleep syz-executor 89670 182811 61393 32767 3 0x90 nanoslp syz-executor 89670 192810 61393 32767 3 0x4000090 kqpoll syz-executor 89670 473216 61393 32767 3 0x4000090 fsleep syz-executor 89670 10681 61393 32767 3 0x4000090 fsleep syz-executor 23966 128341 73375 32767 3 0x90 nanoslp syz-executor 76216 43050 824 32767 3 0x90 nanoslp syz-executor 61931 449243 35578 32767 3 0x10 biowait syz-executor 60059 12053 4743 32767 3 0x90 nanoslp syz-executor 61393 399838 44352 32767 3 0x90 nanoslp syz-executor 88403 441151 33610 32767 3 0x90 nanoslp syz-executor 16329 453203 7049 32767 3 0x90 nanoslp syz-executor 47808 357637 67805 32767 3 0x90 nanoslp syz-executor 35578 363896 26853 0 3 0x82 wait syz-executor 33610 399898 26853 0 3 0x82 wait syz-executor 73375 354750 26853 0 3 0x82 wait syz-executor 824 259381 26853 0 3 0x82 wait syz-executor 7049 200960 26853 0 3 0x82 wait syz-executor 67805 175177 26853 0 3 0x82 wait syz-executor 44352 296703 26853 0 3 0x82 wait syz-executor 4743 356795 26853 0 3 0x82 wait syz-executor 26853 296956 71035 0 3 0x82 kqread syz-executor 71035 246041 1480 0 3 0x10008a sigsusp ksh 1480 281411 86852 0 3 0x98 kqread sshd-session 86852 65277 49408 0 3 0x92 kqread sshd-session 37331 124876 1 0 3 0x100083 ttyin getty 49408 486099 1 0 3 0x88 kqread sshd 88987 244058 71894 73 3 0x1100090 kqread syslogd 71894 109911 1 0 3 0x100082 sbwait syslogd 56022 147320 1 0 3 0x100080 kqread resolvd 48501 155627 80576 77 3 0x100092 kqread dhcpleased 25069 435894 80576 77 3 0x100092 kqread dhcpleased 80576 97379 1 0 3 0x80 kqread dhcpleased 47242 293828 0 0 3 0x14200 bored smr 2435 304859 0 0 3 0x14200 pgzero zerothread 91357 4733 0 0 3 0x14200 aiodoned aiodoned 51871 471573 0 0 3 0x14200 syncer update 17008 218137 0 0 3 0x14200 cleaner cleaner 25377 464661 0 0 3 0x14200 reaper reaper 45133 407468 0 0 3 0x14200 pgdaemon pagedaemon 48406 107948 0 0 3 0x14200 bored viomb 68938 389770 0 0 3 0x40014200 acpi0 acpi0 68842 296768 0 0 3 0x40014200 idle1 99917 506422 0 0 3 0x14200 bored softnet1 33519 20452 0 0 3 0x14200 bored softnet0 34092 251930 0 0 3 0x14200 bored systqmp 50940 482325 0 0 3 0x14200 bored systq 35084 43499 0 0 3 0x14200 tmoslp softclockmp 71513 401799 0 0 3 0x40014200 tmoslp softclock 68742 167803 0 0 3 0x40014200 idle0 1 328102 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 (0xffffffff83a10470) #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 21510 (syz-executor) thread 0xffff8000fffe62b8 (38711) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff83a0e3c0) #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 (0xffffffff83a10470) #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 61931 (syz-executor) thread 0xffff8000fffeefa8 (449243) exclusive rrwlock inode r = 0 (0xfffffd806b39bc58) #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 (0xfffffd806d1b5b20) #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{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 11060 12019K 12034K 166960K 12151 0 pcb 17 12K 12K 166960K 17 0 rtable 243 6K 7K 166960K 365 0 pf 31 16K 16K 166960K 31 0 ifaddr 42 7K 7K 166960K 44 0 ifgroup 50 2K 2K 166960K 50 0 sysctl 4 1K 9K 166960K 8 0 counters 70 37K 37K 166960K 70 0 ioctlops 0 0K 2K 166960K 35 0 iov 0 0K 12K 166960K 14 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1288 81K 81K 166960K 1369 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 0K 0K 166960K 60 0 dirhash 12 2K 2K 166960K 18 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 25 93K 129K 166960K 410 0 sigio 0 0K 0K 166960K 4 0 proc 58 99K 147K 166960K 540 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 58 0 in_multi 99 7K 7K 166960K 102 0 ether_multi 1 0K 0K 166960K 1 0 mrt 1 0K 0K 166960K 13 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 103 466K 466K 166960K 103 0 exec 0 0K 1K 166960K 383 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 283 221K 225K 166960K 5642 0 UVM aobj 17 4K 6K 166960K 21 0 pinsyscall 50 100K 112K 166960K 1511 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 16 0 NDP 11 0K 2K 166960K 27 0 temp 48 9077K 9141K 166960K 5052 0 kqueue 20 29K 31K 166960K 97 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 55 0 52 1 0 1 1 0 8 0 rtentry 176 116 0 3 6 0 6 6 0 8 0 unpcb 144 402 0 382 4 0 4 4 0 8 3 syncache 336 10 0 9 1 0 1 1 0 8 0 tcpqe 32 2 0 2 1 0 1 1 0 8 1 tcpcb 736 177 0 168 7 0 7 7 0 8 5 arp 136 19 0 0 1 0 1 1 0 8 0 ipq 40 4 0 0 1 0 1 1 0 8 0 ipqe 40 7 0 3 1 0 1 1 0 8 0 inpcb 328 498 0 483 7 0 7 7 0 8 5 ip6q 72 1 0 0 1 0 1 1 0 8 0 ip6af 40 1 0 0 1 0 1 1 0 8 0 nd6 152 28 0 2 2 0 2 2 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 485 0 15 30 0 30 30 0 8 0 art_table 40 486 0 15 5 0 5 5 0 8 0 art_node 32 116 0 13 1 0 1 1 0 8 0 sysvmsgpl 40 9 0 3 1 0 1 1 0 8 0 semapl 112 57 0 47 1 0 1 1 0 8 0 shmpl 112 18 0 4 1 0 1 1 0 8 0 pool(0xffffffff83a10458:shmpl): page inconsistency: page 0xfffffd806c89d000; 20 on list, 14 missing, 35 items per page dirhash 1024 21 0 4 3 0 3 3 0 8 0 dino2pl 256 1939 0 475 92 0 92 92 0 8 0 ffsino 296 1939 0 475 114 0 114 114 0 8 0 nchpl 144 2508 0 819 63 0 63 63 0 8 0 vnodes 216 2020 0 0 113 0 113 113 0 8 0 namei 1024 7805 0 7804 1 0 1 1 0 8 0 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 8611 0 8610 10 2 8 8 1 8 7 plimitpl 152 203 0 177 2 0 2 2 0 8 1 sigapl 424 704 0 649 7 0 7 7 0 8 0 knotepl 120 525 0 0 16 0 16 16 0 8 0 kqueuepl 224 109 0 92 2 0 2 2 0 8 0 pipepl 344 145 0 114 4 0 4 4 0 8 0 fdescpl 528 688 0 649 4 0 4 4 0 8 0 filepl 160 3359 0 3118 13 0 13 13 0 8 1 lockfpl 104 104 0 100 1 0 1 1 0 8 0 lockfspl 48 37 0 33 1 0 1 1 0 8 0 sessionpl 144 26 0 9 1 0 1 1 0 8 0 pgrppl 48 37 0 12 1 0 1 1 0 8 0 ucredpl 104 453 0 433 1 0 1 1 0 8 0 zombiepl 144 652 0 649 1 0 1 1 0 8 0 processpl 1232 704 0 649 5 0 5 5 0 8 0 procpl 664 1198 0 1135 7 0 7 7 0 8 1 sosppl 176 8 0 8 1 0 1 1 0 8 1 sockpl 752 959 0 921 11 0 11 11 0 8 6 mcl64k 65536 2 0 0 1 0 1 1 0 8 0 mcl16k 16384 3 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 114 0 0 15 0 15 15 0 8 0 mcl2k2 2112 1 0 0 1 0 1 1 0 8 0 mcl2k 2048 19 0 0 3 0 3 3 0 8 0 mtagpl 96 2 0 0 1 0 1 1 0 8 0 mbufpl 256 1202 0 0 76 0 76 76 0 8 0 bufpl 280 2635 0 103 181 0 181 181 0 8 0 anonpl 32 7485 0 0 61 0 61 61 0 246 0 amapchunkpl 152 18798 0 17864 40 1 39 40 0 158 2 amappl16 200 2674 0 2651 17 6 11 14 0 8 7 amappl15 192 4 0 4 1 1 0 1 0 8 0 amappl14 184 399 0 398 1 0 1 1 0 8 0 amappl13 176 126 0 114 1 0 1 1 0 8 0 amappl12 168 938 0 899 2 0 2 2 0 8 0 amappl11 160 8 0 7 2 1 1 1 0 8 0 amappl10 152 64 0 54 1 0 1 1 0 8 0 amappl9 144 252 0 252 1 1 0 1 0 8 0 amappl8 136 108 0 107 1 0 1 1 0 8 0 amappl7 128 145 0 132 1 0 1 1 0 8 0 amappl6 120 168 0 167 1 0 1 1 0 8 0 amappl5 112 115 0 106 1 0 1 1 0 8 0 amappl4 104 290 0 275 1 0 1 1 0 8 0 amappl3 96 3253 0 3118 5 1 4 4 0 8 0 amappl2 88 560 0 495 2 0 2 2 0 8 0 amappl1 80 12354 0 11602 18 0 18 18 0 8 2 amappl 88 4886 0 4682 6 0 6 6 0 92 1 uvmvnodes 80 113 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 20 0 4 1 0 1 1 0 8 0 uaddrrnd 24 688 0 649 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 688 0 649 1 0 1 1 0 8 0 vmmpekpl 168 7952 0 7913 3 0 3 3 0 8 0 vmmpepl 168 55126 0 52778 110 0 110 110 0 357 6 vmsppl 488 687 0 649 7 1 6 6 0 8 0 rwobjpl 80 19131 0 17951 26 0 26 26 0 8 1 pdppl 4096 1383 0 1298 117 30 87 99 0 8 2 pvpl 32 15119 0 0 122 0 122 122 0 265 0 pmappl 256 687 0 649 4 1 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 356 0 33 10 0 10 10 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(ffffffff83441c23) at panic+0x1e5 sys/kern/subr_prf.c:198 pool_do_get(ffffffff83a10458,1,ffff80003c435698) at pool_do_get+0x5df pool_get(ffffffff83a10458,1) at pool_get+0x162 sys/kern/subr_pool.c:-1 shmget_allocate_segment(ffff8000fffe62b8,ffff80003c4358f0,8,ffff80003c435840) at shmget_allocate_segment+0x1af sys/kern/sysv_shm.c:-1 sys_shmget(ffff8000fffe62b8,ffff80003c4358f0,ffff80003c435840) at sys_shmget+0x195 sys/kern/sysv_shm.c:482 syscall(ffff80003c4358f0) at syscall+0xb17 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80003c4358f0) at syscall+0xb17 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x93b3e01ef80, 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: 0x79b04e41ecb0, 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: 0x79b04e41ecb0, count: -3