panic: mutex 0xfffffd806c1a0ec8 not held in mtx_leave Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff83047ff8) at panic+0x1cf sys/kern/subr_prf.c:198 mtx_leave(fffffd806c1a0ec8) at mtx_leave+0x11c sys/kern/kern_lock.c:335 msleep(fffffd806c1a0e00,fffffd806c1a0ec8,4,ffffffff830c4a60,0) at msleep+0x125 sys/kern/kern_synch.c:249 vm_map_lock_ln(fffffd806c1a0dd0,fffffd806ce58a48,0) at vm_map_lock_ln+0xcb sys/uvm/uvm_map.c:5250 uvm_mapanon(fffffd806c1a0dd0,ffff80002a5bee88,21000,1000,2080713) at uvm_mapanon+0x292 uvm_mmapanon(fffffd806c1a0dd0,ffff80002a5bee88,21000,3,7,5002,5347cc2df4ae4585,5002) at uvm_mmapanon+0x1d0 sys/uvm/uvm_mmap.c:1019 sys_mmap(ffff80002a4f31f0,ffff80002a5bf000,ffff80002a5bef50) at sys_mmap+0xaa4 sys/uvm/uvm_mmap.c:421 syscall(ffff80002a5bf000) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7e16880d8970, count: 5 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> ddb> set $lines = 0 ddb> set $maxwidth = 0 ddb> show panic *cpu0: mutex 0xfffffd806c1a0ec8 not held in mtx_leave ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff83047ff8) at panic+0x1cf sys/kern/subr_prf.c:198 mtx_leave(fffffd806c1a0ec8) at mtx_leave+0x11c sys/kern/kern_lock.c:335 msleep(fffffd806c1a0e00,fffffd806c1a0ec8,4,ffffffff830c4a60,0) at msleep+0x125 sys/kern/kern_synch.c:249 vm_map_lock_ln(fffffd806c1a0dd0,fffffd806ce58a48,0) at vm_map_lock_ln+0xcb sys/uvm/uvm_map.c:5250 uvm_mapanon(fffffd806c1a0dd0,ffff80002a5bee88,21000,1000,2080713) at uvm_mapanon+0x292 uvm_mmapanon(fffffd806c1a0dd0,ffff80002a5bee88,21000,3,7,5002,5347cc2df4ae4585,5002) at uvm_mmapanon+0x1d0 sys/uvm/uvm_mmap.c:1019 sys_mmap(ffff80002a4f31f0,ffff80002a5bf000,ffff80002a5bef50) at sys_mmap+0xaa4 sys/uvm/uvm_mmap.c:421 syscall(ffff80002a5bf000) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7e16880d8970, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002a5bea90 rbx 0xfffffd806c1a0e00 rdx 0 rcx 0 rax 0xffff80002a4f31f0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x623766ce6703b025 r11 0x16e15b95db5d945a r12 0 r13 0 r14 0 r15 0x1 rip 0xffffffff82d8cc75 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002a5bea80 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=305268 pid=1634 tcnt=2 stat=sleep flags process=0 proc=20 runpri=83, usrpri=83, slppri=4, nice=20 wchan=0xfffffd806c1a0e00, wmesg=vmmapbsy, ps_single=0x0 scnt=0 ecnt=0 forw=0x0, list=0xffff80002a4c2f48,0xffff80002a4f3488 process=0xffff8000337f4018 user=0xffff80002a5ba000, vmspace=0xfffffd806c1a0dd0 estcpu=33, cpticks=0, pctcpu=0.20, user=2, sys=19, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 12877 494684 10843 0 2 0 syz-executor 12877 205197 10843 0 3 0x4000000 biowait syz-executor 8060 264356 65213 0 2 0 syz-executor 11980 57223 68182 0 2 0 syz-executor 11980 290357 68182 0 3 0x4000080 fsleep syz-executor 5349 321968 92755 0 2 0 syz-executor 5349 223830 92755 0 3 0x4000080 fsleep syz-executor 3400 398036 48595 0 2 0 syz-executor 3400 52218 48595 0 3 0x4000080 fsleep syz-executor 3400 160107 48595 0 3 0x4000080 fsleep syz-executor 2825 16615 21457 0 2 0 syz-executor 2825 108070 21457 0 2 0x4000000 syz-executor * 1634 305268 77825 0 3 0x20 vmmapbsy syz-executor 1634 350748 77825 0 2 0x4000000 syz-executor 65213 351603 64343 0 3 0x82 nanoslp syz-executor 35696 121917 0 0 3 0x14200 acct acct 77825 89482 64343 0 3 0x82 nanoslp syz-executor 92755 137757 64343 0 3 0x82 nanoslp syz-executor 21457 404575 64343 0 3 0x82 nanoslp syz-executor 68182 274672 64343 0 3 0x82 nanoslp syz-executor 48595 295103 64343 0 3 0x82 nanoslp syz-executor 10843 461215 64343 0 3 0x82 nanoslp syz-executor 74511 481969 64343 0 3 0x2 biowait syz-executor 71795 313526 1 0 3 0x100083 ttyin getty 67969 332327 0 0 3 0x14280 nfsidl nfsio 61893 297877 0 0 3 0x14280 nfsidl nfsio 99940 279149 0 0 3 0x14280 nfsidl nfsio 58250 377383 0 0 3 0x14280 nfsidl nfsio 44118 142803 0 0 3 0x14280 nfsidl nfsio 37023 371908 0 0 3 0x14280 nfsidl nfsio 27581 36219 0 0 3 0x14280 nfsidl nfsio 41871 106588 0 0 3 0x14280 nfsidl nfsio 46580 285576 0 0 3 0x14280 nfsidl nfsio 78507 434809 0 0 3 0x14280 nfsidl nfsio 87777 206892 0 0 3 0x14280 nfsidl nfsio 11912 133211 0 0 3 0x14280 nfsidl nfsio 70794 143192 0 0 3 0x14280 nfsidl nfsio 48866 140901 0 0 3 0x14280 nfsidl nfsio 20254 53022 0 0 3 0x14280 nfsidl nfsio 11531 8068 0 0 3 0x14280 nfsidl nfsio 47079 238954 0 0 3 0x14280 nfsidl nfsio 36022 275362 0 0 3 0x14280 nfsidl nfsio 85660 434592 0 0 3 0x14280 nfsidl nfsio 11257 396374 0 0 3 0x14280 nfsidl nfsio 65436 376098 0 0 3 0x14200 bored sosplice 64343 465075 72507 0 3 0x82 kqread syz-executor 72507 503972 38364 0 3 0x10008a sigsusp ksh 38364 317043 48895 0 3 0x98 kqread sshd-session 48895 504549 6613 0 3 0x92 kqread sshd-session 6613 244519 1 0 3 0x88 kqread sshd 12946 492493 3641 73 3 0x1100090 kqread syslogd 3641 135465 1 0 3 0x100082 sbwait syslogd 30919 53122 1 0 3 0x100080 kqread resolvd 92712 167552 36344 77 3 0x100092 kqread dhcpleased 55826 510181 36344 77 3 0x100092 kqread dhcpleased 36344 382572 1 0 3 0x80 kqread dhcpleased 3508 108154 0 0 3 0x14200 bored smr 9944 146450 0 0 2 0x14200 zerothread 72203 350275 0 0 3 0x14200 aiodoned aiodoned 85130 280106 0 0 3 0x14200 syncer update 21973 385407 0 0 3 0x14200 cleaner cleaner 83000 235510 0 0 3 0x14200 reaper reaper 21556 504600 0 0 3 0x14200 pgdaemon pagedaemon 31404 380631 0 0 3 0x14200 bored viomb 53957 345067 0 0 3 0x40014200 acpi0 acpi0 7359 441009 0 0 3 0x14200 bored softnet3 87557 429290 0 0 3 0x14200 bored softnet2 76027 229949 0 0 3 0x14200 bored softnet1 56307 516744 0 0 3 0x14200 bored softnet0 47339 303359 0 0 3 0x14200 bored systqmp 73240 285266 0 0 3 0x14200 bored systq 56052 495605 0 0 3 0x40014200 tmoslp softclock 13497 42597 0 0 3 0x40014200 idle0 1 63340 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb> show all locks No such command ddb> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10205 11114K 11435K 166960K 12454 0 pcb 17 15K 16K 166960K 292 0 rtable 162 5K 7K 166960K 2125 0 pf 31 13K 16K 166960K 184 0 ifaddr 33 6K 8K 166960K 289 0 ifgroup 46 2K 2K 166960K 310 0 sysctl 4 1K 1K 166960K 6 0 counters 29 17K 17K 166960K 95 0 ioctlops 0 0K 4K 166960K 174 0 iov 0 0K 16K 166960K 78 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1502 94K 95K 166960K 3110 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 68K 76K 166960K 23 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 60 0 dirhash 12 2K 2K 166960K 33 0 ACPI 1690 195K 286K 166960K 12468 0 file desc 17 61K 97K 166960K 1979 0 sigio 0 0K 0K 166960K 26 0 proc 60 59K 124K 166960K 2123 0 subproc 104 6K 7K 166960K 822 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 132 0 in_multi 63 4K 7K 166960K 736 0 ether_multi 1 0K 0K 166960K 3 0 mrt 1 0K 0K 166960K 3 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 1321 0 pfkey data 0 0K 0K 166960K 3 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 217 74K 91K 166960K 17104 0 UVM aobj 31 2K 2K 166960K 34 0 pinsyscall 38 76K 102K 166960K 4426 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 45 0 NDP 10 0K 2K 166960K 206 0 temp 66 6813K 6936K 166960K 52428 0 kqueue 13 20K 28K 166960K 189 0 SYN cache 2 16K 16K 166960K 2 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle rtpcb 120 222 0 219 1 0 1 1 0 8 0 rtentry 112 759 0 688 4 0 4 4 0 8 0 unpcb 144 1020 0 1005 5 1 4 4 0 8 3 syncache 336 6 0 6 2 1 1 1 0 8 1 tcpqe 32 2 0 2 1 0 1 1 0 8 1 tcpcb 808 269 0 265 3 1 2 2 0 8 1 arp 88 135 0 121 1 0 1 1 0 8 0 ipq 40 11 0 10 1 0 1 1 0 8 0 ipqe 40 107 0 106 1 0 1 1 0 8 0 inpcb 336 1469 0 1459 10 3 7 7 0 8 6 nd6 104 203 0 188 1 0 1 1 0 8 0 pkpcb 40 14 0 14 2 1 1 1 0 8 1 kcovpl 48 63 0 55 1 0 1 1 0 8 0 ppxss 1072 3 0 3 2 1 1 1 0 8 1 pfstscr 40 3 0 2 1 0 1 1 0 8 0 pfanchor 1288 3 0 3 1 0 1 1 0 8 1 pfstitem 24 4 0 2 1 0 1 1 0 8 0 pfstkey 128 6 0 2 1 0 1 1 0 8 0 pfstate 344 3 0 2 1 0 1 1 0 8 0 pfrule 1344 4 0 4 2 1 1 1 0 8 1 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 3067 0 2774 32 2 30 30 0 8 4 art_table 32 3069 0 2774 4 0 4 4 0 8 0 art_node 16 754 0 694 1 0 1 1 0 8 0 sysvmsgpl 40 10 0 7 1 0 1 1 0 8 0 semapl 112 58 0 48 1 0 1 1 0 8 0 shmpl 112 31 0 3 1 0 1 1 0 8 0 dirhash 1024 31 0 14 3 0 3 3 0 8 0 dino2pl 256 3607 0 2005 101 0 101 101 0 8 0 ffsino 240 3607 0 2005 95 0 95 95 0 8 0 nchpl 144 5332 0 3576 66 0 66 66 0 8 0 uvmvnodes 80 5056 0 0 104 0 104 104 0 8 0 vnodes 216 5056 0 0 281 0 281 281 0 8 0 namei 1024 23419 0 23418 4 2 2 2 0 8 1 kstatmem 264 152 0 132 2 0 2 2 0 8 0 scxspl 216 38037 0 38035 9 7 2 8 1 8 1 plimitpl 152 424 0 407 1 0 1 1 0 8 0 sigapl 424 2171 0 2104 8 0 8 8 0 8 0 futexpl 64 16248 0 16244 1 0 1 1 0 8 0 knotepl 120 46292 0 46245 24 14 10 16 0 8 8 kqueuepl 184 428 0 418 3 0 3 3 0 8 2 pipepl 288 349 0 322 3 0 3 3 0 8 0 fdescpl 432 2131 0 2102 5 1 4 5 0 8 0 filepl 120 11130 0 10886 15 1 14 14 0 8 5 lockfpl 104 327 0 322 1 0 1 1 0 8 0 lockfspl 48 142 0 137 1 0 1 1 0 8 0 sessionpl 144 77 0 69 1 0 1 1 0 8 0 pgrppl 48 163 0 147 1 0 1 1 0 8 0 ucredpl 104 1426 0 1415 1 0 1 1 0 8 0 zombiepl 144 2707 0 2707 1 0 1 1 0 8 1 processpl 1096 2171 0 2104 7 1 6 6 0 8 1 procpl 648 4101 0 4027 8 0 8 8 0 8 0 sosppl 168 4 0 4 1 0 1 1 0 8 1 sockpl 504 2747 0 2719 20 8 12 13 0 8 7 mcl64k 65536 33 0 33 2 1 1 1 0 8 1 mcl16k 16384 3 0 3 2 1 1 1 0 8 1 mcl12k 12288 3 0 3 2 1 1 1 0 8 1 mcl9k 9216 3 0 3 2 1 1 1 0 8 1 mcl8k 8192 19 0 19 2 1 1 1 0 8 1 mcl4k 4096 4282 0 4233 15 7 8 14 0 8 1 mcl2k 2048 2241 0 2236 8 4 4 5 0 8 3 mtagpl 96 88 0 84 2 0 2 2 0 8 1 mbufpl 256 20350 0 20200 27 6 21 22 0 8 6 bufpl 280 9010 0 2540 463 0 463 463 0 8 0 anonpl 24 340779 0 333299 83 8 75 75 0 187 29 amapchunkpl 152 60946 0 60230 45 12 33 44 0 158 5 amappl16 200 6507 0 6479 45 34 11 15 0 8 8 amappl15 192 26 0 25 1 0 1 1 0 8 0 amappl14 184 227 0 217 1 0 1 1 0 8 0 amappl13 176 3 0 3 1 1 0 1 0 8 0 amappl12 168 3617 0 3589 3 1 2 3 0 8 0 amappl11 160 66 0 56 1 0 1 1 0 8 0 amappl10 152 9 0 9 1 1 0 1 0 8 0 amappl9 144 124 0 124 1 1 0 1 0 8 0 amappl8 136 25 0 23 1 0 1 1 0 8 0 amappl7 128 210 0 199 1 0 1 1 0 8 0 amappl6 120 709 0 708 1 0 1 1 0 8 0 amappl5 112 357 0 348 1 0 1 1 0 8 0 amappl4 104 456 0 440 1 0 1 1 0 8 0 amappl3 96 10750 0 10645 4 0 4 4 0 8 0 amappl2 88 1417 0 1355 2 0 2 2 0 8 0 amappl1 80 16118 0 15606 15 3 12 14 0 8 0 amappl 88 16282 0 16120 5 0 5 5 0 92 0 dma8192 8192 2 0 2 1 1 0 1 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 254 0 254 2 1 1 1 0 8 1 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 19 0 18 1 0 1 1 0 8 0 aobjpl 72 33 0 3 1 0 1 1 0 8 0 uaddrrnd 24 2131 0 2102 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2131 0 2102 1 0 1 1 0 8 0 vmmpekpl 168 17615 0 17561 4 0 4 4 0 8 0 vmmpepl 168 136129 0 134421 95 6 89 89 0 357 9 vmsppl 352 2130 0 2102 4 1 3 4 0 8 0 rwobjpl 24 44853 0 38926 37 0 37 37 0 8 1 pdppl 4096 4268 0 4204 194 126 68 82 0 8 4 pvpl 32 1040421 0 1018618 264 7 257 257 0 265 81 pmappl 216 2130 0 2102 3 1 2 3 0 8 0 extentpl 40 55 0 38 1 0 1 1 0 8 0 phpool 112 529 0 166 11 0 11 11 0 8 0 ddb> machine ddbcpu 0 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff83047ff8) at panic+0x1cf sys/kern/subr_prf.c:198 mtx_leave(fffffd806c1a0ec8) at mtx_leave+0x11c sys/kern/kern_lock.c:335 msleep(fffffd806c1a0e00,fffffd806c1a0ec8,4,ffffffff830c4a60,0) at msleep+0x125 sys/kern/kern_synch.c:249 vm_map_lock_ln(fffffd806c1a0dd0,fffffd806ce58a48,0) at vm_map_lock_ln+0xcb sys/uvm/uvm_map.c:5250 uvm_mapanon(fffffd806c1a0dd0,ffff80002a5bee88,21000,1000,2080713) at uvm_mapanon+0x292 uvm_mmapanon(fffffd806c1a0dd0,ffff80002a5bee88,21000,3,7,5002,5347cc2df4ae4585,5002) at uvm_mmapanon+0x1d0 sys/uvm/uvm_mmap.c:1019 sys_mmap(ffff80002a4f31f0,ffff80002a5bf000,ffff80002a5bef50) at sys_mmap+0xaa4 sys/uvm/uvm_mmap.c:421 syscall(ffff80002a5bf000) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7e16880d8970, count: -10 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff83047ff8) at panic+0x1cf sys/kern/subr_prf.c:198 mtx_leave(fffffd806c1a0ec8) at mtx_leave+0x11c sys/kern/kern_lock.c:335 msleep(fffffd806c1a0e00,fffffd806c1a0ec8,4,ffffffff830c4a60,0) at msleep+0x125 sys/kern/kern_synch.c:249 vm_map_lock_ln(fffffd806c1a0dd0,fffffd806ce58a48,0) at vm_map_lock_ln+0xcb sys/uvm/uvm_map.c:5250 uvm_mapanon(fffffd806c1a0dd0,ffff80002a5bee88,21000,1000,2080713) at uvm_mapanon+0x292 uvm_mmapanon(fffffd806c1a0dd0,ffff80002a5bee88,21000,3,7,5002,5347cc2df4ae4585,5002) at uvm_mmapanon+0x1d0 sys/uvm/uvm_mmap.c:1019 sys_mmap(ffff80002a4f31f0,ffff80002a5bf000,ffff80002a5bef50) at sys_mmap+0xaa4 sys/uvm/uvm_mmap.c:421 syscall(ffff80002a5bf000) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7e16880d8970, count: -10