panic: mutex 0xfffffd806c1add68 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(fffffd806c1add68) at mtx_leave+0x11c sys/kern/kern_lock.c:335 msleep(fffffd806c1adca0,fffffd806c1add68,4,ffffffff830c4a60,0) at msleep+0x125 sys/kern/kern_synch.c:249 vm_map_lock_ln(fffffd806c1adc70,fffffd806c1b1580,0) at vm_map_lock_ln+0xcb sys/uvm/uvm_map.c:5250 uvm_mapanon(fffffd806c1adc70,ffff800032bf3578,21000,1000,2080713) at uvm_mapanon+0x292 uvm_mmapanon(fffffd806c1adc70,ffff800032bf3578,21000,3,7,5002,9f2ae38a185b272e,5002) at uvm_mmapanon+0x1d0 sys/uvm/uvm_mmap.c:1019 sys_mmap(ffff80003761d460,ffff800032bf36f0,ffff800032bf3640) at sys_mmap+0xaa4 sys/uvm/uvm_mmap.c:421 syscall(ffff800032bf36f0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7bcd6202bee0, 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 0xfffffd806c1add68 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(fffffd806c1add68) at mtx_leave+0x11c sys/kern/kern_lock.c:335 msleep(fffffd806c1adca0,fffffd806c1add68,4,ffffffff830c4a60,0) at msleep+0x125 sys/kern/kern_synch.c:249 vm_map_lock_ln(fffffd806c1adc70,fffffd806c1b1580,0) at vm_map_lock_ln+0xcb sys/uvm/uvm_map.c:5250 uvm_mapanon(fffffd806c1adc70,ffff800032bf3578,21000,1000,2080713) at uvm_mapanon+0x292 uvm_mmapanon(fffffd806c1adc70,ffff800032bf3578,21000,3,7,5002,9f2ae38a185b272e,5002) at uvm_mmapanon+0x1d0 sys/uvm/uvm_mmap.c:1019 sys_mmap(ffff80003761d460,ffff800032bf36f0,ffff800032bf3640) at sys_mmap+0xaa4 sys/uvm/uvm_mmap.c:421 syscall(ffff800032bf36f0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7bcd6202bee0, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800032bf3180 rbx 0xfffffd806c1adca0 rdx 0 rcx 0 rax 0xffff80003761d460 r8 0x101010101010101 r9 0x8080808080808080 r10 0x227e06d85a4da835 r11 0x4de3d1613c26f9e0 r12 0 r13 0 r14 0 r15 0x1 rip 0xffffffff82d8cc75 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff800032bf3170 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=461732 pid=41689 tcnt=2 stat=sleep flags process=0 proc=20 runpri=78, usrpri=78, slppri=4, nice=20 wchan=0xfffffd806c1adca0, wmesg=vmmapbsy, ps_single=0x0 scnt=0 ecnt=0 forw=0x0, list=0xffff80002a4c2a38,0xffff80003761c2b8 process=0xffff800032bf59c8 user=0xffff800032bee000, vmspace=0xfffffd806c1adc70 estcpu=28, cpticks=4, pctcpu=0.4, user=7, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 2249 186617 41776 0 2 0 syz-executor 2249 157999 41776 0 3 0x4000080 fsleep syz-executor 2249 440207 41776 0 3 0x4000000 biowait syz-executor 16792 376618 41430 0 2 0x4000000 syz-executor 16792 496913 41430 0 3 0x4000080 fsleep syz-executor 35752 67040 17791 0 2 0 syz-executor 35752 245405 17791 0 3 0x4000080 fsleep syz-executor 72829 170062 58511 0 2 0 syz-executor 72829 272853 58511 0 3 0x4000080 fsleep syz-executor 8982 417180 10769 0 2 0 syz-executor 8982 25677 10769 0 3 0x4000080 fsleep syz-executor *41689 461732 44103 0 3 0x20 vmmapbsy syz-executor 41689 87206 44103 0 2 0x4000000 syz-executor 84190 325491 0 0 3 0x14200 acct acct 75223 291574 0 0 3 0x14200 bored sosplice 44103 236114 85578 0 3 0x82 nanoslp syz-executor 72597 450396 85578 0 3 0x82 nanoslp syz-executor 41776 215197 85578 0 3 0x82 nanoslp syz-executor 58511 10599 85578 0 3 0x82 nanoslp syz-executor 57160 56690 85578 0 2 0x2 syz-executor 10769 495070 85578 0 3 0x82 nanoslp syz-executor 17791 55639 85578 0 3 0x82 nanoslp syz-executor 41430 440849 85578 0 3 0x82 nanoslp syz-executor 85578 438805 45827 0 3 0x82 kqread syz-executor 45827 233091 76394 0 3 0x10008a sigsusp ksh 76394 229708 21986 0 3 0x98 kqread sshd-session 21986 213050 27556 0 3 0x92 kqread sshd-session 76586 491305 1 0 3 0x100083 ttyin getty 27556 510051 1 0 3 0x88 kqread sshd 26740 110183 18231 73 3 0x1100090 kqread syslogd 18231 100424 1 0 3 0x100082 sbwait syslogd 85514 207310 1 0 3 0x100080 kqread resolvd 55365 59198 90297 77 3 0x100092 kqread dhcpleased 36599 185156 90297 77 3 0x100092 kqread dhcpleased 90297 191564 1 0 3 0x80 kqread dhcpleased 65426 126460 0 0 3 0x14200 bored smr 81536 350725 0 0 2 0x14200 zerothread 60286 272247 0 0 3 0x14200 aiodoned aiodoned 45282 312709 0 0 3 0x14200 syncer update 8064 32231 0 0 3 0x14200 cleaner cleaner 95237 3556 0 0 3 0x14200 reaper reaper 65516 397555 0 0 3 0x14200 pgdaemon pagedaemon 57289 271519 0 0 3 0x14200 bored viomb 82407 118244 0 0 3 0x40014200 acpi0 acpi0 40013 392492 0 0 3 0x14200 bored softnet3 91549 125313 0 0 3 0x14200 bored softnet2 61443 67835 0 0 3 0x14200 bored softnet1 9420 285848 0 0 3 0x14200 bored softnet0 95279 446563 0 0 3 0x14200 bored systqmp 18757 120682 0 0 3 0x14200 bored systq 52817 377535 0 0 3 0x40014200 tmoslp softclock 1824 402935 0 0 3 0x40014200 idle0 1 288356 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 10174 11107K 11180K 166960K 11350 0 pcb 18 12K 12K 166960K 43 0 rtable 238 6K 7K 166960K 361 0 pf 31 13K 13K 166960K 35 0 ifaddr 42 7K 7K 166960K 45 0 ifgroup 50 2K 2K 166960K 52 0 sysctl 3 0K 0K 166960K 3 0 counters 30 17K 17K 166960K 31 0 ioctlops 0 0K 4K 166960K 39 0 iov 0 0K 20K 166960K 18 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1398 88K 88K 166960K 1465 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 3 0K 0K 166960K 3 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1690 195K 286K 166960K 12468 0 file desc 17 61K 97K 166960K 239 0 sigio 0 0K 0K 166960K 9 0 proc 60 59K 124K 166960K 488 0 subproc 104 6K 6K 166960K 104 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 5 0 in_multi 99 7K 7K 166960K 99 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 67 307K 307K 166960K 67 0 exec 0 0K 1K 166960K 359 0 pfkey data 0 0K 0K 166960K 2 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 221 74K 74K 166960K 3712 0 UVM aobj 8 2K 2K 166960K 10 0 pinsyscall 38 76K 98K 166960K 1252 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 4 0 NDP 11 0K 2K 166960K 28 0 temp 35 6806K 6934K 166960K 4127 0 kqueue 13 20K 28K 166960K 43 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 44 0 41 1 0 1 1 0 8 0 rtentry 112 114 0 2 4 0 4 4 0 8 0 unpcb 144 129 0 110 2 0 2 2 0 8 1 syncache 336 3 0 3 1 1 0 1 0 8 0 tcpcb 808 63 0 59 4 0 4 4 0 8 3 arp 88 18 0 0 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 336 236 0 228 10 0 10 10 0 8 8 nd6 104 26 0 1 1 0 1 1 0 8 0 pkpcb 40 2 0 2 1 1 0 1 0 8 0 kcovpl 48 8 0 0 1 0 1 1 0 8 0 ppxss 1072 1 0 1 1 1 0 1 0 8 0 pfstscr 40 2 0 2 1 0 1 1 0 8 1 pfstkey 128 2 0 2 1 0 1 1 0 8 1 pfstate 344 1 0 1 1 0 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 456 0 2 29 0 29 29 0 8 0 art_table 32 457 0 2 4 0 4 4 0 8 0 art_node 16 113 0 11 1 0 1 1 0 8 0 semapl 112 1 0 0 1 0 1 1 0 8 0 shmpl 112 7 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1723 0 225 95 0 95 95 0 8 0 ffsino 240 1723 0 225 89 0 89 89 0 8 0 nchpl 144 2051 0 377 63 0 63 63 0 8 0 uvmvnodes 80 1897 0 0 39 0 39 39 0 8 0 vnodes 216 1897 0 0 106 0 106 106 0 8 0 namei 1024 6121 0 6120 3 2 1 2 0 8 0 kstatmem 264 24 0 2 2 0 2 2 0 8 0 scsiplug 72 2 0 2 2 1 1 1 0 8 1 scxspl 216 5757 0 5756 3 2 1 3 1 8 0 plimitpl 152 46 0 29 1 0 1 1 0 8 0 sigapl 424 518 0 471 7 1 6 7 0 8 0 futexpl 64 1671 0 1666 1 0 1 1 0 8 0 knotepl 120 6720 0 6673 15 7 8 9 0 8 6 kqueuepl 184 48 0 39 1 0 1 1 0 8 0 pipepl 288 117 0 90 3 0 3 3 0 8 1 fdescpl 432 500 0 471 5 1 4 5 0 8 0 filepl 120 2085 0 1841 12 1 11 11 0 8 3 lockfpl 104 24 0 22 1 0 1 1 0 8 0 lockfspl 48 12 0 10 1 0 1 1 0 8 0 sessionpl 144 21 0 13 1 0 1 1 0 8 0 pgrppl 48 29 0 13 1 0 1 1 0 8 0 ucredpl 104 181 0 169 1 0 1 1 0 8 0 zombiepl 144 520 0 519 2 1 1 1 0 8 0 processpl 1096 518 0 471 4 0 4 4 0 8 0 procpl 648 695 0 641 7 1 6 6 0 8 1 sockpl 504 413 0 383 17 0 17 17 0 8 13 mcl64k 65536 3 0 3 1 0 1 1 0 8 1 mcl8k 8192 7 0 7 1 1 0 1 0 8 0 mcl4k 4096 2736 0 2684 14 7 7 14 0 8 0 mcl2k 2048 205 0 205 1 0 1 1 0 8 1 mtagpl 96 7 0 5 2 1 1 1 0 8 0 mbufpl 256 5318 0 5133 12 0 12 12 0 8 0 bufpl 280 2284 0 95 157 0 157 157 0 8 0 anonpl 24 157898 0 150667 67 23 44 44 0 187 0 amapchunkpl 152 12220 0 11495 29 1 28 28 0 158 0 amappl16 200 4222 0 4197 15 13 2 14 0 8 0 amappl15 192 10 0 10 1 1 0 1 0 8 0 amappl14 184 105 0 95 1 0 1 1 0 8 0 amappl13 176 5 0 5 1 1 0 1 0 8 0 amappl12 168 1131 0 1102 3 1 2 3 0 8 0 amappl11 160 64 0 53 1 0 1 1 0 8 0 amappl10 152 26 0 26 1 1 0 1 0 8 0 amappl9 144 127 0 127 1 1 0 1 0 8 0 amappl8 136 30 0 29 1 0 1 1 0 8 0 amappl7 128 99 0 89 1 0 1 1 0 8 0 amappl6 120 164 0 163 1 0 1 1 0 8 0 amappl5 112 123 0 114 1 0 1 1 0 8 0 amappl4 104 278 0 264 1 0 1 1 0 8 0 amappl3 96 2355 0 2247 4 0 4 4 0 8 1 amappl2 88 663 0 604 2 0 2 2 0 8 0 amappl1 80 7515 0 7005 13 0 13 13 0 8 2 amappl 88 3363 0 3197 5 0 5 5 0 92 1 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 9 0 2 1 0 1 1 0 8 0 uaddrrnd 24 500 0 471 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 500 0 471 1 0 1 1 0 8 0 vmmpekpl 168 5221 0 5181 3 0 3 3 0 8 0 vmmpepl 168 39449 0 37742 89 11 78 87 0 357 1 vmsppl 352 499 0 471 4 1 3 4 0 8 0 rwobjpl 24 17376 0 14643 17 0 17 17 0 8 0 pdppl 4096 1006 0 942 98 32 66 82 0 8 2 pvpl 32 296401 0 283638 138 35 103 109 0 265 0 pmappl 216 499 0 471 3 0 3 3 0 8 0 extentpl 40 55 0 38 1 0 1 1 0 8 0 phpool 112 385 0 45 10 0 10 10 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(fffffd806c1add68) at mtx_leave+0x11c sys/kern/kern_lock.c:335 msleep(fffffd806c1adca0,fffffd806c1add68,4,ffffffff830c4a60,0) at msleep+0x125 sys/kern/kern_synch.c:249 vm_map_lock_ln(fffffd806c1adc70,fffffd806c1b1580,0) at vm_map_lock_ln+0xcb sys/uvm/uvm_map.c:5250 uvm_mapanon(fffffd806c1adc70,ffff800032bf3578,21000,1000,2080713) at uvm_mapanon+0x292 uvm_mmapanon(fffffd806c1adc70,ffff800032bf3578,21000,3,7,5002,9f2ae38a185b272e,5002) at uvm_mmapanon+0x1d0 sys/uvm/uvm_mmap.c:1019 sys_mmap(ffff80003761d460,ffff800032bf36f0,ffff800032bf3640) at sys_mmap+0xaa4 sys/uvm/uvm_mmap.c:421 syscall(ffff800032bf36f0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7bcd6202bee0, 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(fffffd806c1add68) at mtx_leave+0x11c sys/kern/kern_lock.c:335 msleep(fffffd806c1adca0,fffffd806c1add68,4,ffffffff830c4a60,0) at msleep+0x125 sys/kern/kern_synch.c:249 vm_map_lock_ln(fffffd806c1adc70,fffffd806c1b1580,0) at vm_map_lock_ln+0xcb sys/uvm/uvm_map.c:5250 uvm_mapanon(fffffd806c1adc70,ffff800032bf3578,21000,1000,2080713) at uvm_mapanon+0x292 uvm_mmapanon(fffffd806c1adc70,ffff800032bf3578,21000,3,7,5002,9f2ae38a185b272e,5002) at uvm_mmapanon+0x1d0 sys/uvm/uvm_mmap.c:1019 sys_mmap(ffff80003761d460,ffff800032bf36f0,ffff800032bf3640) at sys_mmap+0xaa4 sys/uvm/uvm_mmap.c:421 syscall(ffff800032bf36f0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7bcd6202bee0, count: -10