panic: assertwaitok: non-zero mutex count: 1 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *245025 41632 0 0x2 0 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830425c6) at panic+0x1cf sys/kern/subr_prf.c:198 assertwaitok() at assertwaitok+0x16f sys/kern/subr_xxx.c:163 mi_switch() at mi_switch+0x2b6 sys/kern/sched_bsd.c:412 yield() at yield+0x61 sys/kern/sched_bsd.c:320 pool_get(ffffffff834dae78,1) at pool_get+0x1e9 sys/kern/subr_pool.c:589 uvm_mapent_alloc(ffffffff835b1338,1323) at uvm_mapent_alloc+0x3aa uvm_map(ffffffff835b1338,ffff80002a53fa30,6000,0,ffffffffffffffff,0,f5eb41124920cfd) at uvm_map+0x3b7 km_alloc(6000,ffffffff83247690,ffffffff8328d508,ffffffff8328d580) at km_alloc+0x20d sys/uvm/uvm_km.c:748 fork1(ffff80002a4b0f40,1,ffffffff8239fb20,0,ffff80002a53fb80,0) at fork1+0x30b sys/kern/kern_fork.c:393 syscall(ffff80002a53fc30) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7145d6c1c030, count: 3 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: assertwaitok: non-zero mutex count: 1 ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830425c6) at panic+0x1cf sys/kern/subr_prf.c:198 assertwaitok() at assertwaitok+0x16f sys/kern/subr_xxx.c:163 mi_switch() at mi_switch+0x2b6 sys/kern/sched_bsd.c:412 yield() at yield+0x61 sys/kern/sched_bsd.c:320 pool_get(ffffffff834dae78,1) at pool_get+0x1e9 sys/kern/subr_pool.c:589 uvm_mapent_alloc(ffffffff835b1338,1323) at uvm_mapent_alloc+0x3aa uvm_map(ffffffff835b1338,ffff80002a53fa30,6000,0,ffffffffffffffff,0,f5eb41124920cfd) at uvm_map+0x3b7 km_alloc(6000,ffffffff83247690,ffffffff8328d508,ffffffff8328d580) at km_alloc+0x20d sys/uvm/uvm_km.c:748 fork1(ffff80002a4b0f40,1,ffffffff8239fb20,0,ffff80002a53fb80,0) at fork1+0x30b sys/kern/kern_fork.c:393 syscall(ffff80002a53fc30) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7145d6c1c030, count: -12 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002a53f6e0 rbx 0 rdx 0 rcx 0 rax 0xffff80002a4b0f40 r8 0x101010101010101 r9 0x8080808080808080 r10 0xeea0485228565c15 r11 0x185bd21b54c6979b r12 0 r13 0 r14 0 r15 0x1 rip 0xffffffff81e36145 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002a53f6d0 ss 0 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=245025 pid=41632 tcnt=1 stat=onproc flags process=2 proc=0 runpri=50, usrpri=86, slppri=17, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a4b0520,0xffff80002a4b0cc8 process=0xffff8000ffffa698 user=0xffff80002a53a000, vmspace=0xfffffd806fc82b08 estcpu=36, cpticks=1, pctcpu=0.4, user=3, sys=14, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 83661 312098 95991 60929 3 0x10 vmmaplk syz-executor 83661 401061 95991 60929 3 0x4000010 vmmaplk syz-executor 83661 282180 95991 60929 2 0x4000010 syz-executor 96464 435747 42450 0 3 0x80 fsleep syz-executor 96464 301910 42450 0 2 0x4000000 syz-executor 18641 234640 86519 0 3 0x80 fsleep syz-executor 18641 424477 86519 0 3 0x4000080 kqpoll syz-executor 13546 369538 9358 0 3 0x80 fsleep syz-executor 13546 71972 9358 0 3 0x4000080 fsleep syz-executor 13546 146016 9358 0 3 0x4000080 kqsel syz-executor 13546 344307 9358 0 3 0x4000080 fsleep syz-executor 42450 226563 74141 0 3 0x82 nanoslp syz-executor 80244 487561 74141 0 2 0x2 syz-executor 9358 358837 74141 0 3 0x82 nanoslp syz-executor 42149 457349 0 0 3 0x14200 bored sosplice 77038 388650 74141 0 3 0x82 nanoslp syz-executor 86519 204784 74141 0 3 0x82 nanoslp syz-executor *41632 245025 74141 0 7 0x2 syz-executor 95991 452202 74141 0 3 0x82 nanoslp syz-executor 2071 201922 74141 0 3 0x82 wait syz-executor 74141 170518 95204 0 2 0x2 syz-executor 95204 469615 92601 0 3 0x10008a sigsusp ksh 92601 509185 94512 0 3 0x98 kqread sshd-session 94512 42605 1 0 3 0x92 kqread sshd-session 3425 193117 1 0 3 0x100083 ttyin getty 6537 439388 80481 73 3 0x1100090 kqread syslogd 80481 507564 1 0 3 0x100082 sbwait syslogd 9516 107726 1 0 3 0x100080 kqread resolvd 24135 214467 57199 77 3 0x100092 kqread dhcpleased 72104 465791 57199 77 3 0x100092 kqread dhcpleased 57199 152667 1 0 3 0x80 kqread dhcpleased 49331 408801 0 0 3 0x14200 bored smr 40667 337740 0 0 2 0x14200 zerothread 92022 470844 0 0 3 0x14200 aiodoned aiodoned 56823 354312 0 0 3 0x14200 syncer update 29640 287594 0 0 3 0x14200 cleaner cleaner 5412 520680 0 0 3 0x14200 reaper reaper 39578 474890 0 0 3 0x14200 pgdaemon pagedaemon 55435 152285 0 0 3 0x14200 bored viomb 56273 450455 0 0 3 0x40014200 acpi0 acpi0 53940 174241 0 0 3 0x14200 bored softnet3 20352 155365 0 0 3 0x14200 bored softnet2 65860 28212 0 0 3 0x14200 bored softnet1 75830 166606 0 0 3 0x14200 bored softnet0 82538 315132 0 0 3 0x14200 bored systqmp 96852 420208 0 0 3 0x14200 bored systq 52654 381651 0 0 3 0x40014200 tmoslp softclock 86060 263219 0 0 3 0x40014200 idle0 1 375056 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 10196 11121K 11510K 166960K 13796 0 pcb 17 20K 22K 166960K 539 0 rtable 191 7K 8K 166960K 675 0 pf 36 14K 22K 166960K 131 0 ifaddr 35 6K 7K 166960K 94 0 ifgroup 52 2K 2K 166960K 148 0 sysctl 3 0K 0K 166960K 3 0 counters 29 17K 17K 166960K 57 0 ioctlops 0 0K 4K 166960K 286 0 iov 0 0K 24K 166960K 169 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1456 92K 92K 166960K 2740 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 2K 6K 166960K 34 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 122 0 dirhash 12 2K 3K 166960K 48 0 ACPI 1690 195K 286K 166960K 12468 0 file desc 16 57K 97K 166960K 1484 0 sigio 0 0K 0K 166960K 19 0 proc 60 59K 124K 166960K 702 0 subproc 104 6K 6K 166960K 160 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 416 0 in_multi 80 6K 7K 166960K 203 0 ether_multi 1 0K 0K 166960K 6 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 145 652K 652K 166960K 145 0 exec 0 0K 1K 166960K 641 0 fusefs mount 1 32K 32K 166960K 1 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 204 71K 88K 166960K 15209 0 UVM aobj 112 3K 3K 166960K 113 0 pinsyscall 35 70K 96K 166960K 2596 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 81 0 NDP 10 0K 2K 166960K 65 0 temp 76 6821K 6891K 166960K 48530 0 kqueue 12 18K 30K 166960K 259 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 130 0 127 1 0 1 1 0 8 0 rtentry 112 188 0 105 4 0 4 4 0 8 0 unpcb 144 1333 0 1318 19 16 3 6 0 8 2 syncache 336 6 0 6 3 2 1 1 0 8 1 tcpqe 32 1 0 1 1 1 0 1 0 8 0 tcpcb 808 555 0 547 25 23 2 8 0 8 1 arp 88 32 0 16 1 0 1 1 0 8 0 ipq 40 6 0 3 1 0 1 1 0 8 0 ipqe 40 95 0 92 1 0 1 1 0 8 0 inpcb 336 2437 0 2420 56 51 5 13 0 8 3 nd6 104 42 0 22 1 0 1 1 0 8 0 pkpcb 40 6 0 6 4 3 1 1 0 8 1 kcovpl 48 12 0 4 1 0 1 1 0 8 0 ppxss 1072 13 0 13 5 4 1 1 0 8 1 pfstscr 40 1 0 1 1 1 0 1 0 8 0 pfanchor 1288 1 0 0 1 0 1 1 0 8 0 pftag 88 3 0 0 1 0 1 1 0 8 0 pfstitem 24 4 0 0 1 0 1 1 0 8 0 pfstkey 128 7 0 3 2 1 1 1 0 8 0 pfstate 344 4 0 2 2 1 1 1 0 8 0 pfrule 1344 15 0 14 3 2 1 1 0 8 0 art_heap8 4096 3 0 0 3 0 3 3 0 8 0 art_heap4 256 836 0 498 33 7 26 31 0 8 1 art_table 32 839 0 498 4 0 4 4 0 8 0 art_node 16 184 0 112 1 0 1 1 0 8 0 sysvmsgpl 40 14 0 13 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 118 0 108 1 0 1 1 0 8 0 shmpl 112 110 0 1 4 0 4 4 0 8 0 dirhash 1024 41 0 24 3 0 3 3 0 8 0 dino2pl 256 4017 0 2523 95 0 95 95 0 8 0 ffsino 240 4017 0 2523 89 0 89 89 0 8 0 nchpl 144 6072 0 5552 63 32 31 63 0 8 8 uvmvnodes 80 5031 0 0 103 0 103 103 0 8 0 vnodes 216 5031 0 0 280 0 280 280 0 8 0 namei 1024 21981 0 21980 3 2 1 2 0 8 0 kstatmem 264 76 0 56 2 0 2 2 0 8 0 scsiplug 72 10 0 10 5 4 1 1 0 8 1 scxspl 216 17656 0 17656 13 11 2 8 1 8 2 plimitpl 152 525 0 509 1 0 1 1 0 8 0 sigapl 424 1778 0 1734 9 2 7 8 0 8 0 futexpl 64 21954 0 21949 1 0 1 1 0 8 0 knotepl 120 61657 0 61612 71 60 11 16 0 8 8 kqueuepl 184 393 0 383 1 0 1 1 0 8 0 pipepl 288 249 0 222 5 0 5 5 0 8 2 fdescpl 432 1735 0 1708 5 1 4 5 0 8 0 filepl 120 12575 0 12335 26 15 11 14 0 8 0 lockfpl 104 382 0 380 1 0 1 1 0 8 0 lockfspl 48 160 0 158 1 0 1 1 0 8 0 sessionpl 144 26 0 19 1 0 1 1 0 8 0 pgrppl 48 54 0 39 1 0 1 1 0 8 0 ucredpl 104 2129 0 2117 1 0 1 1 0 8 0 zombiepl 144 2203 0 2201 4 3 1 1 0 8 0 processpl 1096 1778 0 1734 5 1 4 5 0 8 0 procpl 648 3887 0 3836 11 4 7 8 0 8 0 sosppl 168 8 0 8 5 4 1 1 0 8 1 sockpl 504 3963 0 3930 122 109 13 29 0 8 8 mcl64k 65536 19 0 19 6 5 1 1 0 8 1 mcl16k 16384 4 0 4 2 2 0 1 0 8 0 mcl8k 8192 17 0 17 5 5 0 1 0 8 0 mcl4k 4096 4363 0 4314 16 9 7 14 0 8 0 mcl2k 2048 1802 0 1798 6 4 2 2 0 8 1 mtagpl 96 37 0 14 1 0 1 1 0 8 0 mbufpl 256 19966 0 19783 37 20 17 20 0 8 3 bufpl 280 6967 0 720 447 0 447 447 0 8 0 anonpl 24 271781 0 268803 92 48 44 47 0 187 17 amapchunkpl 152 51079 0 50639 68 44 24 36 0 158 4 amappl16 200 6496 0 6469 53 42 11 15 0 8 8 amappl15 192 5 0 5 1 1 0 1 0 8 0 amappl14 184 115 0 106 1 0 1 1 0 8 0 amappl13 176 54 0 53 1 0 1 1 0 8 0 amappl12 168 2409 0 2381 3 1 2 3 0 8 0 amappl11 160 49 0 39 1 0 1 1 0 8 0 amappl10 152 9 0 9 1 1 0 1 0 8 0 amappl9 144 145 0 145 1 1 0 1 0 8 0 amappl8 136 36 0 35 1 0 1 1 0 8 0 amappl7 128 103 0 94 1 0 1 1 0 8 0 amappl6 120 196 0 195 1 0 1 1 0 8 0 amappl5 112 146 0 137 1 0 1 1 0 8 0 amappl4 104 292 0 282 1 0 1 1 0 8 0 amappl3 96 9341 0 9257 3 0 3 3 0 8 0 amappl2 88 2019 0 1949 2 0 2 2 0 8 0 amappl1 80 11562 0 11123 12 0 12 12 0 8 1 amappl 88 14741 0 14586 5 0 5 5 0 92 0 dma32768 32768 1 0 1 1 1 0 1 0 8 0 dma16384 16384 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 dma256 256 8 0 8 2 2 0 1 0 8 0 dma128 128 258 0 258 4 3 1 1 0 8 1 dma64 64 9 0 9 3 2 1 1 0 8 1 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 112 0 1 3 0 3 3 0 8 0 uaddrrnd 24 1735 0 1708 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1735 0 1708 1 0 1 1 0 8 0 vmmpekpl 168 14055 0 14007 4 1 3 3 0 8 0 vmmpepl 168 110332 0 108777 108 25 83 90 0 357 7 vmsppl 352 1734 0 1708 4 1 3 4 0 8 0 rwobjpl 24 35978 0 30097 36 0 36 36 0 8 0 pdppl 4096 3477 0 3416 119 54 65 83 0 8 4 pvpl 32 729616 0 721687 163 58 105 116 0 265 21 pmappl 216 1734 0 1708 3 0 3 3 0 8 0 extentpl 40 55 0 38 1 0 1 1 0 8 0 phpool 112 634 0 298 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(ffffffff830425c6) at panic+0x1cf sys/kern/subr_prf.c:198 assertwaitok() at assertwaitok+0x16f sys/kern/subr_xxx.c:163 mi_switch() at mi_switch+0x2b6 sys/kern/sched_bsd.c:412 yield() at yield+0x61 sys/kern/sched_bsd.c:320 pool_get(ffffffff834dae78,1) at pool_get+0x1e9 sys/kern/subr_pool.c:589 uvm_mapent_alloc(ffffffff835b1338,1323) at uvm_mapent_alloc+0x3aa uvm_map(ffffffff835b1338,ffff80002a53fa30,6000,0,ffffffffffffffff,0,f5eb41124920cfd) at uvm_map+0x3b7 km_alloc(6000,ffffffff83247690,ffffffff8328d508,ffffffff8328d580) at km_alloc+0x20d sys/uvm/uvm_km.c:748 fork1(ffff80002a4b0f40,1,ffffffff8239fb20,0,ffff80002a53fb80,0) at fork1+0x30b sys/kern/kern_fork.c:393 syscall(ffff80002a53fc30) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7145d6c1c030, count: -12 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff830425c6) at panic+0x1cf sys/kern/subr_prf.c:198 assertwaitok() at assertwaitok+0x16f sys/kern/subr_xxx.c:163 mi_switch() at mi_switch+0x2b6 sys/kern/sched_bsd.c:412 yield() at yield+0x61 sys/kern/sched_bsd.c:320 pool_get(ffffffff834dae78,1) at pool_get+0x1e9 sys/kern/subr_pool.c:589 uvm_mapent_alloc(ffffffff835b1338,1323) at uvm_mapent_alloc+0x3aa uvm_map(ffffffff835b1338,ffff80002a53fa30,6000,0,ffffffffffffffff,0,f5eb41124920cfd) at uvm_map+0x3b7 km_alloc(6000,ffffffff83247690,ffffffff8328d508,ffffffff8328d580) at km_alloc+0x20d sys/uvm/uvm_km.c:748 fork1(ffff80002a4b0f40,1,ffffffff8239fb20,0,ffff80002a53fb80,0) at fork1+0x30b sys/kern/kern_fork.c:393 syscall(ffff80002a53fc30) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7145d6c1c030, count: -12