panic: mutex 0xfffffd806fa49300 not held in mtx_leave Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 343142 89644 32767 0x10 0 1 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff83078e14) at panic+0x1e5 sys/kern/subr_prf.c:198 mtx_leave(fffffd806fa49300) at mtx_leave+0x17c sys/kern/kern_lock.c:335 msleep(fffffd806fa49218,fffffd806fa49300,4,ffffffff832a21d0,0) at msleep+0x125 sys/kern/kern_synch.c:249 vm_map_lock_ln(fffffd806fa491e8,4f445c30000,0) at vm_map_lock_ln+0xd4 sys/uvm/uvm_map.c:5250 uvm_map_protect(fffffd806fa491e8,4f445a31000,4f445c30000,1,0,0,b61609ac4feeedae) at uvm_map_protect+0xe1 sys/uvm/uvm_map.c:3059 sys_mprotect(ffff80003579d1d8,ffff80002a13c880,ffff80002a13c7d0) at sys_mprotect+0x34c sys/uvm/uvm_mmap.c:585 syscall(ffff80002a13c880) at syscall+0xbb6 mi_syscall sys/sys/syscall_mi.h:179 [inline] syscall(ffff80002a13c880) at syscall+0xbb6 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x74c27b347850, count: 6 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: mutex 0xfffffd806fa49300 not held in mtx_leave ddb{0}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff83078e14) at panic+0x1e5 sys/kern/subr_prf.c:198 mtx_leave(fffffd806fa49300) at mtx_leave+0x17c sys/kern/kern_lock.c:335 msleep(fffffd806fa49218,fffffd806fa49300,4,ffffffff832a21d0,0) at msleep+0x125 sys/kern/kern_synch.c:249 vm_map_lock_ln(fffffd806fa491e8,4f445c30000,0) at vm_map_lock_ln+0xd4 sys/uvm/uvm_map.c:5250 uvm_map_protect(fffffd806fa491e8,4f445a31000,4f445c30000,1,0,0,b61609ac4feeedae) at uvm_map_protect+0xe1 sys/uvm/uvm_map.c:3059 sys_mprotect(ffff80003579d1d8,ffff80002a13c880,ffff80002a13c7d0) at sys_mprotect+0x34c sys/uvm/uvm_mmap.c:585 syscall(ffff80002a13c880) at syscall+0xbb6 mi_syscall sys/sys/syscall_mi.h:179 [inline] syscall(ffff80002a13c880) at syscall+0xbb6 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x74c27b347850, count: -9 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80002a13c480 rbx 0xffffffff834aedbf cpu_info_full_primary+0x2dbf rdx 0 rcx 0xffff80003579d1d8 rax 0xffffffff834adff0 cpu_info_full_primary+0x1ff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x8f124e0743d37ecd r11 0x8d02ca282cf5c0d3 r12 0xffffffff834aebc0 cpu_info_full_primary+0x2bc0 r13 0 r14 0 r15 0x1 rip 0xffffffff816a99e5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002a13c470 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor) tid=78389 pid=69374 tcnt=4 stat=sleep flags process=10 proc=20 runpri=50, usrpri=50, slppri=4, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff8000ffff62a0,0xffff80003579ccd8 process=0xffff800031374928 user=0xffff80002a137000, vmspace=0xfffffd806fa491e8 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=0, intr=1 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 89644 343142 31045 32767 7 0x10 syz-executor *69374 78389 99987 32767 3 0x30 syz-executor 69374 430805 99987 32767 3 0x4000090 fsleep syz-executor 69374 412950 99987 32767 3 0x4000090 fsleep syz-executor 69374 87236 99987 32767 3 0x4000090 fsleep syz-executor 69628 51136 28550 32767 3 0x90 nanoslp syz-executor 69628 357453 28550 32767 3 0x4000090 fsleep syz-executor 69628 266457 28550 32767 3 0x4000090 msgwait syz-executor 69628 172703 28550 32767 3 0x4000090 fsleep syz-executor 11197 229073 78717 0 3 0x2 clonelk ifconfig 97160 234073 69097 0 3 0x2 clonelk ifconfig 34394 238876 25302 0 3 0 clonelk syz-executor 69097 157341 79255 0 3 0x10008a sigsusp sh 75199 301379 93433 0 3 0 clonelk syz-executor 79235 352857 38986 0 3 0 clonelk syz-executor 79255 458114 50461 0 3 0x80 wait syz-executor 78717 31914 55719 0 3 0x10008a sigsusp sh 31045 164745 84235 32767 3 0x90 nanoslp syz-executor 99987 451563 33259 32767 3 0x90 nanoslp syz-executor 55719 433851 42262 0 3 0x80 wait syz-executor 84235 139872 72386 0 3 0x82 wait syz-executor 50461 302337 72386 0 3 0x82 wait syz-executor 25302 276583 72386 0 3 0x82 wait syz-executor 42262 132820 72386 0 3 0x82 wait syz-executor 93433 274099 72386 0 3 0x82 wait syz-executor 33259 317892 72386 0 3 0x82 wait syz-executor 38986 35564 72386 0 3 0x82 wait syz-executor 28550 15585 72270 32767 3 0x90 nanoslp syz-executor 72270 383239 72386 0 3 0x82 wait syz-executor 72386 29953 26706 0 3 0x82 kqread syz-executor 26706 387831 10811 0 3 0x10008a sigsusp ksh 10811 472076 58703 0 3 0x98 kqread sshd-session 58703 162845 22479 0 3 0x92 kqread sshd-session 95256 235167 1 0 3 0x100083 ttyin getty 22479 356970 1 0 3 0x88 kqread sshd 54329 267192 47785 73 3 0x1100010 ffs_fsync syslogd 47785 298697 1 0 3 0x100082 sbwait syslogd 20538 166936 1 0 3 0x100080 kqread resolvd 14509 316413 84443 77 3 0x100092 kqread dhcpleased 16813 374048 84443 77 3 0x100092 kqread dhcpleased 84443 210020 1 0 3 0x80 kqread dhcpleased 21699 105381 0 0 3 0x14200 bored smr 23403 465460 0 0 3 0x14200 pgzero zerothread 55907 301933 0 0 3 0x14200 aiodoned aiodoned 79695 261796 0 0 3 0x14200 syncer update 94735 438878 0 0 3 0x14200 cleaner cleaner 78340 136911 0 0 3 0x14200 reaper reaper 84242 189934 0 0 3 0x14200 pgdaemon pagedaemon 12125 316441 0 0 3 0x14200 bored viomb 2389 256362 0 0 3 0x40014200 acpi0 acpi0 38895 253519 0 0 3 0x40014200 idle1 10254 166921 0 0 3 0x14200 bored softnet3 851 290937 0 0 3 0x14200 bored softnet2 95939 126630 0 0 3 0x14200 bored softnet1 83705 523628 0 0 3 0x14200 bored softnet0 81066 512085 0 0 3 0x14200 bored systqmp 34314 298447 0 0 3 0x14200 bored systq 61181 347004 0 0 3 0x14200 tmoslp softclockmp 28866 267767 0 0 3 0x40014200 tmoslp softclock 12980 303106 0 0 3 0x40014200 idle0 1 59102 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks CPU 0: exclusive mutex &map->flags_lock r = 0 (0xfffffd806fa49340) #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 vm_map_lock_ln+0x6b sys/uvm/uvm_map.c:5244 #4 uvm_map_protect+0xe1 sys/uvm/uvm_map.c:3059 #5 sys_mprotect+0x34c sys/uvm/uvm_mmap.c:585 #6 syscall+0xbb6 mi_syscall sys/sys/syscall_mi.h:179 [inline] #6 syscall+0xbb6 sys/arch/amd64/amd64/trap.c:577 #7 Xsyscall+0x128 Process 69374 (syz-executor) thread 0xffff80003579c530 (412950) shared rwlock vmmaplk r = 0 (0xfffffd806fa492e0) #0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5bb sys/kern/subr_witness.c:1155 #1 uvmfault_lookup+0x122 sys/uvm/uvm_fault.c:1785 #2 uvm_fault_check+0x47 sys/uvm/uvm_fault.c:672 #3 uvm_fault+0x112 sys/uvm/uvm_fault.c:600 #4 uvm_fault_wire+0x73 sys/uvm/uvm_fault.c:1602 #5 uvm_map_pageable_wire+0x40f sys/uvm/uvm_map.c:2127 #6 sys_mlock+0x23d sys/uvm/uvm_mmap.c:837 #7 syscall+0xaf8 mi_syscall sys/sys/syscall_mi.h:179 [inline] #7 syscall+0xaf8 sys/arch/amd64/amd64/trap.c:577 #8 Xsyscall+0x128 exclusive kernel_lock &kernel_lock r = 0 (0xffffffff835a2200) #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 Process 54329 (syslogd) thread 0xffff8000ffffdbe8 (267192) exclusive rrwlock inode r = 0 (0xfffffd806e2e1700) #0 witness_lock+0x5bb stacktrace_save sys/sys/stacktrace.h:37 [inline] #0 witness_lock+0x5bb sys/kern/subr_witness.c:1155 #1 rw_enter+0x41b sys/kern/kern_rwlock.c:309 #2 rrw_enter+0xbe sys/kern/kern_rwlock.c:464 #3 VOP_LOCK+0xa6 sys/kern/vfs_vops.c:524 #4 vn_lock+0xa4 sys/kern/vfs_vnops.c:564 #5 sys_fsync+0x152 sys/kern/vfs_syscalls.c:2926 #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 10165 11037K 11059K 166960K 11261 0 pcb 17 12K 12K 166960K 17 0 rtable 146 4K 6K 166960K 406 0 pf 23 15K 16K 166960K 35 0 ifaddr 26 4K 7K 166960K 52 0 ifgroup 34 1K 2K 166960K 58 0 counters 56 35K 36K 166960K 68 0 ioctlops 0 0K 2K 166960K 31 0 iov 0 0K 0K 166960K 1 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1442 91K 91K 166960K 1473 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 3 0 VM map 2 1K 1K 166960K 2 0 sem 2 0K 1K 166960K 3 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1690 195K 286K 166960K 12468 0 file desc 27 101K 149K 166960K 231 0 sigio 0 0K 0K 166960K 4 0 proc 72 103K 164K 166960K 564 0 subproc 130 8K 11K 166960K 195 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 4 0 in_multi 55 4K 7K 166960K 122 0 ether_multi 1 0K 0K 166960K 1 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 37 175K 175K 166960K 37 0 exec 0 0K 1K 166960K 378 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 229 89K 122K 166960K 3140 0 UVM aobj 4 2K 2K 166960K 4 0 pinsyscall 48 96K 122K 166960K 1296 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 2 0K 0K 166960K 4 0 NDP 11 0K 1K 166960K 33 0 temp 43 6810K 6875K 166960K 4186 0 kqueue 13 20K 22K 166960K 25 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 105 0 102 3 2 1 3 0 8 0 rtentry 112 133 0 67 4 0 4 4 0 8 0 unpcb 144 67 0 52 2 0 2 2 0 8 1 syncache 336 3 0 3 1 1 0 1 0 8 0 tcpcb 808 47 0 10 4 0 4 4 0 8 0 arp 120 22 0 12 1 0 1 1 0 8 0 inpcb 336 194 0 152 6 2 4 4 0 8 0 nd6 136 30 0 18 1 0 1 1 0 8 0 kcovpl 48 15 0 5 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 541 0 264 29 1 28 29 0 8 10 art_table 32 542 0 264 4 0 4 4 0 8 0 art_node 16 132 0 72 1 0 1 1 0 8 0 sysvmsgpl 40 1 0 1 1 0 1 1 0 8 1 semapl 112 1 0 1 1 0 1 1 0 8 1 shmpl 112 1 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1589 0 78 95 0 95 95 0 8 0 ffsino 272 1589 0 78 101 0 101 101 0 8 0 nchpl 144 1809 0 132 63 0 63 63 0 8 0 uvmvnodes 80 1793 0 0 37 0 37 37 0 8 0 vnodes 216 1793 0 0 100 0 100 100 0 8 0 namei 1024 5579 0 5579 3 1 2 3 0 8 2 percpumem 16 48 0 6 1 0 1 1 0 8 0 kstatmem 264 26 0 12 2 0 2 2 0 8 1 scxspl 216 7040 0 7039 3 2 1 2 1 8 0 plimitpl 152 118 0 89 2 0 2 2 0 8 0 sigapl 424 490 0 433 8 0 8 8 0 8 0 futexpl 64 326 0 321 1 0 1 1 0 8 0 knotepl 120 59 0 0 2 0 2 2 0 8 0 kqueuepl 216 23 0 14 1 0 1 1 0 8 0 pipepl 320 123 0 92 4 0 4 4 0 8 0 fdescpl 496 472 0 433 8 1 7 7 0 8 0 filepl 152 1779 0 1479 17 2 15 15 0 8 2 lockfpl 104 29 0 27 1 0 1 1 0 8 0 lockfspl 48 10 0 8 1 0 1 1 0 8 0 sessionpl 144 28 0 10 1 0 1 1 0 8 0 pgrppl 48 43 0 17 1 0 1 1 0 8 0 ucredpl 104 102 0 86 1 0 1 1 0 8 0 zombiepl 144 435 0 433 1 0 1 1 0 8 0 processpl 1160 490 0 433 5 0 5 5 0 8 0 procpl 648 554 0 491 7 0 7 7 0 8 1 sockpl 664 366 0 306 8 2 6 8 0 8 0 mcl9k 9216 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 141 0 0 18 0 18 18 0 8 0 mcl2k 2048 17 0 0 3 0 3 3 0 8 0 mtagpl 96 3 0 0 1 0 1 1 0 8 0 mbufpl 256 164 0 0 11 0 11 11 0 8 0 bufpl 280 4723 0 94 331 0 331 331 0 8 0 anonpl 24 136573 0 133383 51 1 50 50 0 185 27 amapchunkpl 152 10188 0 9732 34 1 33 33 0 158 13 amappl16 200 3270 0 3265 5 4 1 5 0 8 0 amappl15 192 11 0 11 1 1 0 1 0 8 0 amappl14 184 121 0 110 1 0 1 1 0 8 0 amappl13 176 8 0 8 1 1 0 1 0 8 0 amappl12 168 1118 0 1085 3 0 3 3 0 8 0 amappl11 160 66 0 56 1 0 1 1 0 8 0 amappl10 152 6 0 6 2 2 0 1 0 8 0 amappl9 144 133 0 133 1 1 0 1 0 8 0 amappl8 136 20 0 19 1 0 1 1 0 8 0 amappl7 128 95 0 85 1 0 1 1 0 8 0 amappl6 120 190 0 185 1 0 1 1 0 8 0 amappl5 112 142 0 132 1 0 1 1 0 8 0 amappl4 104 276 0 263 1 0 1 1 0 8 0 amappl3 96 1937 0 1838 4 0 4 4 0 8 0 amappl2 88 668 0 605 2 0 2 2 0 8 0 amappl1 80 7541 0 6991 15 2 13 14 0 8 0 amappl 88 2788 0 2616 5 0 5 5 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 3 0 0 1 0 1 1 0 8 0 uaddrrnd 24 472 0 433 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 472 0 433 1 0 1 1 0 8 0 vmmpekpl 168 5237 0 5183 4 0 4 4 0 8 0 vmmpepl 168 36444 0 34538 94 0 94 94 0 357 6 vmsppl 448 471 0 433 6 0 6 6 0 8 0 rwobjpl 56 15989 0 13331 40 0 40 40 0 8 0 pdppl 4096 951 0 866 133 24 109 109 0 8 24 pvpl 32 26626 0 0 216 1 215 215 0 265 0 pmappl 248 471 0 433 5 1 4 4 0 8 0 extentpl 40 55 0 38 1 0 1 1 0 8 0 phpool 112 418 0 31 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(ffffffff83078e14) at panic+0x1e5 sys/kern/subr_prf.c:198 mtx_leave(fffffd806fa49300) at mtx_leave+0x17c sys/kern/kern_lock.c:335 msleep(fffffd806fa49218,fffffd806fa49300,4,ffffffff832a21d0,0) at msleep+0x125 sys/kern/kern_synch.c:249 vm_map_lock_ln(fffffd806fa491e8,4f445c30000,0) at vm_map_lock_ln+0xd4 sys/uvm/uvm_map.c:5250 uvm_map_protect(fffffd806fa491e8,4f445a31000,4f445c30000,1,0,0,b61609ac4feeedae) at uvm_map_protect+0xe1 sys/uvm/uvm_map.c:3059 sys_mprotect(ffff80003579d1d8,ffff80002a13c880,ffff80002a13c7d0) at sys_mprotect+0x34c sys/uvm/uvm_mmap.c:585 syscall(ffff80002a13c880) at syscall+0xbb6 mi_syscall sys/sys/syscall_mi.h:179 [inline] syscall(ffff80002a13c880) at syscall+0xbb6 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x74c27b347850, count: -9 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 __mp_lock(ffffffff835a1ff8) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:113 [inline] __mp_lock(ffffffff835a1ff8) at __mp_lock+0x192 sys/kern/kern_lock.c:144 syscall(ffff80002a10e400) at syscall+0xad6 mi_syscall sys/sys/syscall_mi.h:179 [inline] syscall(ffff80002a10e400) at syscall+0xad6 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x749af068eab0, count: 9 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 __mp_lock(ffffffff835a1ff8) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:113 [inline] __mp_lock(ffffffff835a1ff8) at __mp_lock+0x192 sys/kern/kern_lock.c:144 syscall(ffff80002a10e400) at syscall+0xad6 mi_syscall sys/sys/syscall_mi.h:179 [inline] syscall(ffff80002a10e400) at syscall+0xad6 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x749af068eab0, count: -6