panic: mutex 0xfffffd806c19bec8 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(fffffd806c19bec8) at mtx_leave+0x11c sys/kern/kern_lock.c:335 msleep(fffffd806c19be00,fffffd806c19bec8,4,ffffffff830c4a60,0) a t msleep+0x125 vm_map_lock_ln(fffffd806c19bdd0,fffffd806e967c78,0) at vm_map_l ock_ln+0xcb uvm_mapanon(fffffd806c19bdd0,ffff80002a5a9938,21000,1000,208071 3) at uvm_mapanon+0x292 uvm_mmapanon(fffffd806c19bdd0,ffff80002a5a9938,21000,3,7,5002,a 1182262cbe8d9bd,5002) at uvm_mmapanon+0x1d0 sys/uvm/uvm_mmap.c:1019 sys_mmap(ffff80002a4b0520,ffff80002a5a9ab0,ffff80002a5a9a00) at sys_mmap+0xaa4 syscall(ffff80002a5a9ab0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x710da4c42ad0, count: 5 https://www.openbsd.org/ddb.html describes the minimum info req uired in bug reports. Insufficient info makes it difficult to find and fix b ugs. ddb> ddb> set $lines = 0 ddb> set $maxwidth = 0 ddb> show panic *cpu0: mutex 0xfffffd806c19bec8 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(fffffd806c19bec8) at mtx_leave+0x11c sys/kern/kern_lock.c:335 msleep(fffffd806c19be00,fffffd806c19bec8,4,ffffffff830c4a60,0) at msleep+0x125 sys/kern/kern_synch.c:249 vm_map_lock_ln(fffffd806c19bdd0,fffffd806e967c78,0) at vm_map_lock_ln+0xcb sys/uvm/uvm_map.c:5250 uvm_mapanon(fffffd806c19bdd0,ffff80002a5a9938,21000,1000,2080713) at uvm_mapanon+0x292 uvm_mmapanon(fffffd806c19bdd0,ffff80002a5a9938,21000,3,7,5002,a1182262cbe8d9bd,5002) at uvm_mmapanon+0x1d0 sys/uvm/uvm_mmap.c:1019 sys_mmap(ffff80002a4b0520,ffff80002a5a9ab0,ffff80002a5a9a00) at sys_mmap+0xaa4 sys/uvm/uvm_mmap.c:421 syscall(ffff80002a5a9ab0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x710da4c42ad0, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002a5a9540 rbx 0xfffffd806c19be00 rdx 0 rcx 0 rax 0xffff80002a4b0520 r8 0x101010101010101 r9 0x8080808080808080 r10 0xfa1f852d6c02ab82 r11 0x426445fec882332a r12 0 r13 0 r14 0 r15 0x1 rip 0xffffffff82d8cc75 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002a5a9530 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=111256 pid=10312 tcnt=2 stat=sleep flags process=0 proc=20 runpri=86, usrpri=86, slppri=4, nice=20 wchan=0xfffffd806c19be00, wmesg=vmmapbsy, ps_single=0x0 scnt=0 ecnt=0 forw=0x0, list=0xffff80002a4b0cb8,0xffff800037628ce0 process=0xffff80002a464450 user=0xffff80002a5a4000, vmspace=0xfffffd806c19bdd0 estcpu=36, cpticks=20, pctcpu=0.0, user=19, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *10312 111256 13794 0 3 0x20 vmmapbsy syz-executor 10312 319368 13794 0 2 0x4000000 syz-executor 13916 500083 17653 0 2 0x101004 sh 17653 354951 75627 0 3 0x10008a sigsusp sh 18956 66778 40396 0 2 0x10 syz-executor 18956 158159 40396 0 2 0x4000010 syz-executor 18956 27849 40396 0 3 0x4000090 fsleep syz-executor 70551 249210 32895 0 3 0 vmmaplk syz-executor 70551 460176 32895 0 2 0x4000000 syz-executor 80215 82342 58737 0 2 0x2 syz-executor 75627 489722 58737 0 3 0x82 wait syz-executor 99094 428988 58737 0 3 0x82 piperd syz-executor 40396 194197 58737 0 3 0x82 nanoslp syz-executor 70897 375559 58737 0 3 0x82 piperd syz-executor 898 75174 58737 0 3 0x2 biowait syz-executor 13794 60984 58737 0 3 0x82 nanoslp syz-executor 32895 498677 58737 0 3 0x82 nanoslp syz-executor 19204 231216 0 0 3 0x14200 acct acct 97948 37810 0 0 3 0x14280 nfsidl nfsio 24841 95811 0 0 3 0x14280 nfsidl nfsio 55466 104349 0 0 3 0x14280 nfsidl nfsio 89646 84097 0 0 3 0x14280 nfsidl nfsio 21321 450865 0 0 3 0x14280 nfsidl nfsio 532 206701 0 0 3 0x14280 nfsidl nfsio 1522 14830 0 0 3 0x14280 nfsidl nfsio 89138 291309 0 0 3 0x14280 nfsidl nfsio 60288 218943 0 0 3 0x14280 nfsidl nfsio 30800 109674 0 0 3 0x14280 nfsidl nfsio 71343 200062 0 0 3 0x14280 nfsidl nfsio 20206 102947 0 0 3 0x14280 nfsidl nfsio 60566 396313 0 0 3 0x14280 nfsidl nfsio 17362 29135 0 0 3 0x14280 nfsidl nfsio 36852 336721 0 0 3 0x14280 nfsidl nfsio 88268 403449 0 0 3 0x14280 nfsidl nfsio 63305 144768 0 0 3 0x14280 nfsidl nfsio 28246 220879 0 0 3 0x14280 nfsidl nfsio 81743 385729 0 0 3 0x14280 nfsidl nfsio 89984 390440 0 0 3 0x14280 nfsidl nfsio 82412 476962 0 0 3 0x14200 bored sosplice 58737 233822 70010 0 2 0x3 syz-executor 70010 150450 50531 0 3 0x10008a sigsusp ksh 50531 320665 62861 0 3 0x98 kqread sshd-session 62861 392154 57003 0 3 0x92 kqread sshd-session 99816 306513 1 0 3 0x100083 ttyin getty 57003 141015 1 0 3 0x88 kqread sshd 9863 465726 64735 73 3 0x1100010 ffs_fsync syslogd 64735 392254 1 0 3 0x100082 sbwait syslogd 10782 425033 1 0 3 0x100080 kqread resolvd 79878 295753 269 77 3 0x100092 kqread dhcpleased 62511 470551 269 77 3 0x100092 kqread dhcpleased 269 472608 1 0 3 0x80 kqread dhcpleased 88650 201991 0 0 3 0x14200 bored smr 84351 246761 0 0 2 0x14200 zerothread 44509 427868 0 0 3 0x14200 aiodoned aiodoned 8450 94399 0 0 3 0x14200 syncer update 80530 286741 0 0 3 0x14200 cleaner cleaner 79273 444935 0 0 3 0x14200 reaper reaper 60020 133168 0 0 3 0x14200 pgdaemon pagedaemon 25588 416186 0 0 3 0x14200 bored viomb 60752 103760 0 0 3 0x40014200 acpi0 acpi0 91019 451013 0 0 3 0x14200 bored softnet3 17716 427830 0 0 3 0x14200 bored softnet2 30294 304160 0 0 3 0x14200 bored softnet1 51832 503123 0 0 3 0x14200 bored softnet0 65505 61911 0 0 3 0x14200 bored systqmp 41099 300479 0 0 3 0x14200 bored systq 13790 252166 0 0 3 0x40014200 tmoslp softclock 31588 332577 0 0 3 0x40014200 idle0 1 488260 0 0 3 0x80082 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 10183 11059K 11473K 166960K 13344 0 pcb 17 16K 18K 166960K 362 0 rtable 185 7K 9K 166960K 2906 0 pf 41 15K 271K 166960K 266 0 ifaddr 37 6K 8K 166960K 375 0 ifgroup 55 2K 2K 166960K 431 0 sysctl 4 1K 1K 166960K 7 0 counters 31 17K 18K 166960K 131 0 ioctlops 0 0K 4K 166960K 358 0 iov 0 0K 16K 166960K 114 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1534 96K 97K 166960K 3686 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 31 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 120 0 dirhash 18 3K 3K 166960K 63 0 ACPI 1690 195K 286K 166960K 12468 0 file desc 15 53K 93K 166960K 2618 0 sigio 0 0K 0K 166960K 170 0 proc 60 59K 116K 166960K 2654 0 subproc 104 6K 7K 166960K 1066 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 2 0K 0K 166960K 382 0 in_multi 78 5K 7K 166960K 938 0 ether_multi 1 0K 0K 166960K 10 0 mrt 1 0K 0K 166960K 8 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 85 387K 387K 166960K 85 0 exec 1 0K 1K 166960K 1602 0 pfkey data 0 0K 0K 166960K 1 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 190 75K 106K 166960K 21610 0 UVM aobj 131 4K 4K 166960K 133 0 pinsyscall 38 76K 98K 166960K 5536 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 67 0 NDP 12 0K 2K 166960K 275 0 temp 76 6815K 6894K 166960K 99684 0 kqueue 13 20K 30K 166960K 268 0 SYN cache 2 2352K 2360K 166960K 3 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle rtpcb 120 316 0 313 2 1 1 2 0 8 0 rtentry 112 1046 0 966 4 1 3 4 0 8 0 unpcb 144 1683 0 1668 10 4 6 6 0 8 5 syncache 336 11 0 11 3 2 1 1 0 8 1 tcpqe 32 8 0 8 3 2 1 1 0 8 1 tcpcb 808 918 0 914 34 27 7 21 0 8 6 arp 88 203 0 188 1 0 1 1 0 8 0 ipq 40 5 0 5 2 1 1 1 0 8 1 ipqe 40 141 0 141 2 1 1 1 0 8 1 inpcb 336 2783 0 2768 30 22 8 18 0 8 6 nd6 104 254 0 236 1 0 1 1 0 8 0 pkpcb 40 10 0 10 3 2 1 1 0 8 1 kcovpl 48 82 0 74 1 0 1 1 0 8 0 ppxss 1072 17 0 17 3 2 1 1 0 8 1 pfstscr 40 6 0 5 3 2 1 1 0 8 0 pfrktable 1344 1 0 1 1 0 1 1 0 8 1 pftag 88 2 0 1 1 0 1 1 0 8 0 pfstitem 24 12 0 5 1 0 1 1 0 8 0 pfstkey 128 18 0 9 1 0 1 1 0 8 0 pfstate 344 10 0 6 1 0 1 1 0 8 0 pfrule 1344 10 0 10 3 2 1 1 0 8 1 art_heap8 4096 3 0 0 3 0 3 3 0 8 0 art_heap4 256 3870 0 3507 34 3 31 31 0 8 5 art_table 32 3873 0 3507 5 0 5 5 0 8 0 art_node 16 1043 0 971 1 0 1 1 0 8 0 sysvmsgpl 40 16 0 9 1 0 1 1 0 8 0 semapl 112 116 0 106 1 0 1 1 0 8 0 shmpl 112 130 0 2 4 0 4 4 0 8 0 dirhash 1024 52 0 31 3 0 3 3 0 8 0 dino2pl 256 4312 0 2675 103 0 103 103 0 8 0 ffsino 240 4312 0 2675 97 0 97 97 0 8 0 nchpl 144 6508 0 4740 66 0 66 66 0 8 0 uvmvnodes 80 6268 0 0 128 0 128 128 0 8 0 vnodes 216 6268 0 0 349 0 349 349 0 8 0 namei 1024 31237 0 31234 5 3 2 2 0 8 1 kstatmem 264 224 0 200 3 0 3 3 0 8 1 scsiplug 72 3 0 3 2 1 1 1 0 8 1 scxspl 216 48852 0 48850 9 8 1 8 1 8 0 plimitpl 152 569 0 551 1 0 1 1 0 8 0 sigapl 424 2796 0 2731 9 1 8 8 0 8 0 futexpl 64 22469 0 22468 2 1 1 1 0 8 0 knotepl 120 51769 0 51722 49 40 9 17 0 8 7 kqueuepl 184 629 0 620 7 3 4 4 0 8 3 pipepl 288 621 0 594 11 4 7 7 0 8 4 fdescpl 432 2736 0 2708 5 1 4 5 0 8 0 filepl 120 16628 0 16390 26 13 13 18 0 8 5 lockfpl 104 713 0 711 2 1 1 2 0 8 0 lockfspl 48 272 0 270 1 0 1 1 0 8 0 sessionpl 144 99 0 91 1 0 1 1 0 8 0 pgrppl 48 201 0 185 1 0 1 1 0 8 0 ucredpl 104 2761 0 2749 1 0 1 1 0 8 0 zombiepl 144 3142 0 3142 1 0 1 1 0 8 1 processpl 1096 2797 0 2731 6 0 6 6 0 8 0 procpl 648 5175 0 5105 10 1 9 9 0 8 2 sosppl 168 16 0 16 3 2 1 1 0 8 1 sockpl 504 4854 0 4821 75 61 14 38 0 8 8 mcl64k 65536 32 0 32 3 2 1 1 0 8 1 mcl16k 16384 3 0 3 1 0 1 1 0 8 1 mcl12k 12288 1 0 1 1 1 0 1 0 8 0 mcl9k 9216 1 0 1 1 0 1 1 0 8 1 mcl8k 8192 72 0 72 2 1 1 1 0 8 1 mcl4k 4096 4863 0 4811 17 9 8 15 0 8 1 mcl2k2 2112 1 0 1 1 0 1 1 0 8 1 mcl2k 2048 3663 0 3659 3 2 1 2 0 8 0 mtagpl 96 50 0 50 1 0 1 1 0 8 1 mbufpl 256 30532 0 30403 139 123 16 117 0 8 4 bufpl 280 9755 0 2972 485 0 485 485 0 8 0 anonpl 24 403999 0 396898 174 123 51 121 0 187 8 amapchunkpl 152 70948 0 70229 85 50 35 58 0 158 7 amappl16 200 6881 0 6871 48 40 8 15 0 8 7 amappl15 192 2 0 2 1 1 0 1 0 8 0 amappl14 184 258 0 247 1 0 1 1 0 8 0 amappl13 176 8 0 8 1 1 0 1 0 8 0 amappl12 168 4503 0 4476 3 1 2 3 0 8 0 amappl11 160 50 0 40 1 0 1 1 0 8 0 amappl10 152 16 0 16 1 1 0 1 0 8 0 amappl9 144 136 0 136 1 1 0 1 0 8 0 amappl8 136 28 0 26 1 0 1 1 0 8 0 amappl7 128 238 0 228 1 0 1 1 0 8 0 amappl6 120 892 0 889 1 0 1 1 0 8 0 amappl5 112 419 0 410 1 0 1 1 0 8 0 amappl4 104 512 0 497 1 0 1 1 0 8 0 amappl3 96 13629 0 13540 4 0 4 4 0 8 0 amappl2 88 1704 0 1640 2 0 2 2 0 8 0 amappl1 80 20007 0 19500 13 1 12 13 0 8 0 amappl 88 20607 0 20472 5 0 5 5 0 92 1 dma65536 65536 2 0 2 2 1 1 1 0 8 1 dma8192 8192 1 0 1 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 dma512 512 1 0 1 1 1 0 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma128 128 254 0 254 2 2 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 132 0 2 3 0 3 3 0 8 0 uaddrrnd 24 2735 0 2708 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2735 0 2708 1 0 1 1 0 8 0 vmmpekpl 168 22498 0 22438 4 0 4 4 0 8 0 vmmpepl 168 170742 0 169221 109 22 87 89 0 357 14 vmsppl 352 2734 0 2708 4 1 3 4 0 8 0 rwobjpl 24 54229 0 47023 44 0 44 44 0 8 0 pdppl 4096 5476 0 5416 220 154 66 80 0 8 6 pvpl 32 1306600 0 1285478 603 379 224 321 0 265 53 pmappl 216 2734 0 2708 3 1 2 3 0 8 0 extentpl 40 55 0 38 1 0 1 1 0 8 0 phpool 112 790 0 418 14 1 13 14 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(fffffd806c19bec8) at mtx_leave+0x11c sys/kern/kern_lock.c:335 msleep(fffffd806c19be00,fffffd806c19bec8,4,ffffffff830c4a60,0) at msleep+0x125 sys/kern/kern_synch.c:249 vm_map_lock_ln(fffffd806c19bdd0,fffffd806e967c78,0) at vm_map_lock_ln+0xcb sys/uvm/uvm_map.c:5250 uvm_mapanon(fffffd806c19bdd0,ffff80002a5a9938,21000,1000,2080713) at uvm_mapanon+0x292 uvm_mmapanon(fffffd806c19bdd0,ffff80002a5a9938,21000,3,7,5002,a1182262cbe8d9bd,5002) at uvm_mmapanon+0x1d0 sys/uvm/uvm_mmap.c:1019 sys_mmap(ffff80002a4b0520,ffff80002a5a9ab0,ffff80002a5a9a00) at sys_mmap+0xaa4 sys/uvm/uvm_mmap.c:421 syscall(ffff80002a5a9ab0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x710da4c42ad0, 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(fffffd806c19bec8) at mtx_leave+0x11c sys/kern/kern_lock.c:335 msleep(fffffd806c19be00,fffffd806c19bec8,4,ffffffff830c4a60,0) at msleep+0x125 sys/kern/kern_synch.c:249 vm_map_lock_ln(fffffd806c19bdd0,fffffd806e967c78,0) at vm_map_lock_ln+0xcb sys/uvm/uvm_map.c:5250 uvm_mapanon(fffffd806c19bdd0,ffff80002a5a9938,21000,1000,2080713) at uvm_mapanon+0x292 uvm_mmapanon(fffffd806c19bdd0,ffff80002a5a9938,21000,3,7,5002,a1182262cbe8d9bd,5002) at uvm_mmapanon+0x1d0 sys/uvm/uvm_mmap.c:1019 sys_mmap(ffff80002a4b0520,ffff80002a5a9ab0,ffff80002a5a9a00) at sys_mmap+0xaa4 sys/uvm/uvm_mmap.c:421 syscall(ffff80002a5a9ab0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x710da4c42ad0, count: -10