panic: assertwaitok: non-zero mutex count: 2 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *265172 82803 0 0 0 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82ff3a16) 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 preempt() at preempt+0x61 sys/kern/sched_bsd.c:338 ast(ffff80002a553930) at ast+0x13f mi_ast sys/sys/syscall_mi.h:261 [inline] ast(ffff80002a553930) at ast+0x13f sys/arch/amd64/amd64/trap.c:541 intr_user_exit() at intr_user_exit+0x3c end of kernel end trace frame: 0x7138f2dacd20, count: 8 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: assertwaitok: non-zero mutex count: 2 ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82ff3a16) 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 preempt() at preempt+0x61 sys/kern/sched_bsd.c:338 ast(ffff80002a553930) at ast+0x13f mi_ast sys/sys/syscall_mi.h:261 [inline] ast(ffff80002a553930) at ast+0x13f sys/arch/amd64/amd64/trap.c:541 intr_user_exit() at intr_user_exit+0x3c end of kernel end trace frame: 0x7138f2dacd20, count: -7 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002a5537c0 rbx 0 rdx 0 rcx 0 rax 0xffff80002a4d11e8 r8 0x101010101010101 r9 0x8080808080808080 r10 0x80614b874da046e9 r11 0x27dec5c16b034c36 r12 0 r13 0 r14 0 r15 0x1 rip 0xffffffff82391265 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002a5537b0 ss 0 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=265172 pid=82803 tcnt=3 stat=onproc flags process=0 proc=0 runpri=84, usrpri=85, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a457958,0xffff80002a4d1480 process=0xffff8000327f77c0 user=0xffff80002a54e000, vmspace=0xfffffd806c199820 estcpu=35, cpticks=4, pctcpu=0.0, user=3, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 90891 45238 75800 0 3 0x82 netio sshd-session 94084 155341 41231 0 2 0 syz-executor 71900 83613 80628 0 2 0 syz-executor 66300 373818 75800 0 3 0x82 netio sshd-session 94707 450167 54129 0 2 0 syz-executor 94707 115122 54129 0 3 0x4000080 rest syz-executor 94707 483489 54129 0 2 0x4000000 syz-executor 36123 15691 30952 0 2 0 syz-executor 36123 289043 30952 0 3 0x4000080 ttyout syz-executor 36123 517293 30952 0 3 0x4000080 ttyout syz-executor *82803 265172 88270 0 7 0 syz-executor 82803 220109 88270 0 2 0x4000000 syz-executor 82803 196957 88270 0 3 0x4000080 fsleep syz-executor 5376 474450 2825 0 3 0x80 nanoslp syz-executor 5376 27294 2825 0 2 0x4000000 syz-executor 5376 12699 2825 0 3 0x4000080 fsleep syz-executor 68770 381480 46159 0 2 0x100002 ndp 46159 20883 7129 0 3 0x10008a sigsusp sh 11980 180408 8559 0 2 0x2 syz-executor 7129 391384 8559 0 3 0x82 wait syz-executor 54129 110099 8559 0 3 0x82 nanoslp syz-executor 41231 256562 8559 0 3 0x82 nanoslp syz-executor 80628 37370 8559 0 3 0x82 nanoslp syz-executor 30952 170635 8559 0 3 0x82 nanoslp syz-executor 2825 36469 8559 0 3 0x82 nanoslp syz-executor 88270 141248 8559 0 3 0x82 nanoslp syz-executor 23605 55462 0 0 3 0x14200 bored sosplice 8559 115626 33556 0 3 0x82 kqread syz-executor 33556 163693 54389 0 3 0x10008a sigsusp ksh 54389 378716 14138 0 3 0x98 kqread sshd-session 14138 306728 75800 0 3 0x92 kqread sshd-session 11744 362463 1 0 3 0x100083 ttyin getty 75800 87278 1 0 3 0x88 kqread sshd 84105 9191 32189 73 2 0x1100010 syslogd 32189 285038 1 0 3 0x100082 sbwait syslogd 95098 299055 1 0 3 0x100080 kqread resolvd 44656 465208 98621 77 3 0x100092 kqread dhcpleased 20043 185523 98621 77 3 0x100092 kqread dhcpleased 98621 332146 1 0 3 0x80 kqread dhcpleased 33350 371237 0 0 3 0x14200 bored smr 52007 521769 0 0 2 0x14200 zerothread 32361 288524 0 0 3 0x14200 aiodoned aiodoned 26356 127996 0 0 3 0x14200 syncer update 43788 387891 0 0 3 0x14200 cleaner cleaner 65873 215639 0 0 3 0x14200 reaper reaper 45213 107759 0 0 3 0x14200 pgdaemon pagedaemon 42704 92957 0 0 3 0x14200 bored viomb 25406 145460 0 0 3 0x40014200 acpi0 acpi0 98973 158618 0 0 3 0x14200 bored softnet3 94832 242381 0 0 3 0x14200 bored softnet2 99087 325486 0 0 3 0x14200 bored softnet1 82980 240963 0 0 3 0x14200 bored softnet0 58067 119696 0 0 3 0x14200 bored systqmp 54631 411684 0 0 3 0x14200 bored systq 278 52588 0 0 3 0x40014200 tmoslp softclock 75162 513744 0 0 3 0x40014200 idle0 1 203234 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 10213 11132K 11500K 166960K 12343 0 pcb 17 12K 12K 166960K 132 0 rtable 247 9K 10K 166960K 1626 0 pf 38 14K 22K 166960K 158 0 ifaddr 45 8K 8K 166960K 196 0 ifgroup 58 2K 2K 166960K 226 0 sysctl 4 1K 3K 166960K 8 0 counters 32 17K 18K 166960K 78 0 ioctlops 0 0K 4K 166960K 130 0 iov 0 0K 24K 166960K 176 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1434 90K 91K 166960K 2419 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 3 5K 5K 166960K 9 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 27 0 dirhash 12 2K 2K 166960K 21 0 ACPI 1690 195K 286K 166960K 12468 0 file desc 19 69K 97K 166960K 1307 0 sigio 0 0K 0K 166960K 21 0 proc 60 59K 124K 166960K 1421 0 subproc 104 6K 6K 166960K 520 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 99 0 in_multi 103 7K 7K 166960K 507 0 ether_multi 1 0K 0K 166960K 11 0 mrt 1 0K 0K 166960K 2 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 229 1023K 1023K 166960K 229 0 exec 0 0K 1K 166960K 876 0 pfkey data 0 0K 4K 166960K 2 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 236 73K 91K 166960K 11642 0 UVM aobj 22 3K 3K 166960K 23 0 pinsyscall 45 90K 96K 166960K 3182 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 48 0 NDP 15 0K 2K 166960K 142 0 temp 75 6816K 6896K 166960K 32990 0 kqueue 14 22K 30K 166960K 144 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 275 0 271 3 2 1 3 0 8 0 rtentry 112 497 0 386 4 0 4 4 0 8 0 unpcb 144 1185 0 1167 13 7 6 8 0 8 5 syncache 336 10 0 10 2 1 1 1 0 8 1 tcpqe 32 3 0 3 2 1 1 1 0 8 1 tcpcb 808 293 0 282 8 6 2 7 0 8 0 arp 88 89 0 71 1 0 1 1 0 8 0 ipq 40 4 0 4 1 0 1 1 0 8 1 ipqe 40 93 0 93 1 0 1 1 0 8 1 inpcb 336 1053 0 1038 12 5 7 7 0 8 5 nd6 104 127 0 104 1 0 1 1 0 8 0 pkpcb 40 2 0 2 2 1 1 1 0 8 1 kcovpl 48 40 0 32 1 0 1 1 0 8 0 ppxss 1072 10 0 10 1 1 0 1 0 8 0 pfstscr 40 5 0 5 1 1 0 1 0 8 0 pfrktable 1344 5 0 5 1 1 0 1 0 8 0 pfanchor 1288 2 0 2 1 1 0 1 0 8 0 pftag 88 3 0 3 1 1 0 1 0 8 0 pfstitem 24 1 0 0 1 0 1 1 0 8 0 pfstkey 128 9 0 8 1 0 1 1 0 8 0 pfstate 344 5 0 4 1 0 1 1 0 8 0 pfrule 1344 6 0 6 2 1 1 1 0 8 1 art_heap8 4096 3 0 1 3 1 2 2 0 8 0 art_heap4 256 1989 0 1506 33 2 31 32 0 8 0 art_table 32 1992 0 1507 5 1 4 5 0 8 0 art_node 16 495 0 394 1 0 1 1 0 8 0 sysvmsgpl 40 4 0 3 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 25 0 15 1 0 1 1 0 8 0 shmpl 112 20 0 1 1 0 1 1 0 8 0 dirhash 1024 23 0 6 3 0 3 3 0 8 0 dino2pl 256 2926 0 1371 98 0 98 98 0 8 0 ffsino 240 2926 0 1371 92 0 92 92 0 8 0 nchpl 144 4122 0 2414 64 0 64 64 0 8 0 uvmvnodes 80 3803 0 0 78 0 78 78 0 8 0 vnodes 216 3803 0 0 212 0 212 212 0 8 0 namei 1024 17153 0 17153 3 1 2 2 0 8 2 pfiaddrpl 120 1 0 1 1 1 0 1 0 8 0 kstatmem 264 118 0 92 3 1 2 3 0 8 0 scsiplug 72 1 0 1 1 1 0 1 0 8 0 scxspl 216 26650 0 26650 8 7 1 8 1 8 1 plimitpl 152 285 0 267 1 0 1 1 0 8 0 sigapl 424 1531 0 1481 7 1 6 7 0 8 0 futexpl 64 11213 0 11210 2 1 1 1 0 8 0 knotepl 120 28389 0 28337 10 8 2 10 0 8 0 kqueuepl 184 345 0 335 7 6 1 7 0 8 0 pipepl 288 262 0 233 4 1 3 3 0 8 0 fdescpl 432 1510 0 1477 5 1 4 5 0 8 0 filepl 120 8643 0 8381 20 7 13 15 0 8 5 lockfpl 104 381 0 379 2 1 1 2 0 8 0 lockfspl 48 169 0 167 1 0 1 1 0 8 0 sessionpl 144 59 0 49 1 0 1 1 0 8 0 pgrppl 48 102 0 84 1 0 1 1 0 8 0 ucredpl 104 1080 0 1069 1 0 1 1 0 8 0 zombiepl 144 1639 0 1639 1 0 1 1 0 8 1 processpl 1096 1531 0 1481 4 0 4 4 0 8 0 procpl 648 2638 0 2580 7 1 6 6 0 8 1 sosppl 168 11 0 9 2 1 1 1 0 8 0 sockpl 504 2522 0 2485 56 44 12 29 0 8 7 mcl64k 65536 149 0 149 2 1 1 1 0 8 1 mcl16k 16384 2 0 2 1 0 1 1 0 8 1 mcl12k 12288 1 0 1 1 0 1 1 0 8 1 mcl8k 8192 20 0 20 2 1 1 1 0 8 1 mcl4k 4096 3711 0 3657 15 7 8 15 0 8 0 mcl2k 2048 1613 0 1612 4 3 1 4 0 8 0 mtagpl 96 27 0 26 1 0 1 1 0 8 0 mbufpl 256 15623 0 15457 20 5 15 19 0 8 4 bufpl 280 7934 0 1378 469 0 469 469 0 8 0 anonpl 24 252120 0 248431 94 45 49 74 0 187 17 amapchunkpl 152 37985 0 37512 39 11 28 33 0 158 9 amappl16 200 4882 0 4867 32 23 9 15 0 8 8 amappl15 192 7 0 7 1 1 0 1 0 8 0 amappl14 184 188 0 175 1 0 1 1 0 8 0 amappl13 176 9 0 9 1 1 0 1 0 8 0 amappl12 168 2634 0 2601 2 0 2 2 0 8 0 amappl11 160 48 0 38 1 0 1 1 0 8 0 amappl10 152 88 0 88 1 1 0 1 0 8 0 amappl9 144 122 0 122 1 1 0 1 0 8 0 amappl8 136 41 0 40 1 0 1 1 0 8 0 amappl7 128 162 0 148 1 0 1 1 0 8 0 amappl6 120 479 0 475 1 0 1 1 0 8 0 amappl5 112 279 0 268 1 0 1 1 0 8 0 amappl4 104 395 0 379 1 0 1 1 0 8 0 amappl3 96 7433 0 7322 4 0 4 4 0 8 0 amappl2 88 1161 0 1081 2 0 2 2 0 8 0 amappl1 80 14076 0 13377 16 1 15 15 0 8 0 amappl 88 10949 0 10782 5 0 5 5 0 92 1 dma65536 65536 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 7 0 7 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 8 0 8 1 1 0 1 0 8 0 dma16 16 18 0 17 1 0 1 1 0 8 0 aobjpl 72 22 0 1 1 0 1 1 0 8 0 uaddrrnd 24 1510 0 1477 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1510 0 1477 1 0 1 1 0 8 0 vmmpekpl 168 13344 0 13299 3 0 3 3 0 8 0 vmmpepl 168 99410 0 97380 107 12 95 95 0 357 6 vmsppl 344 1509 0 1477 4 1 3 4 0 8 0 rwobjpl 24 33933 0 29044 30 0 30 30 0 8 0 pdppl 4096 3026 0 2954 144 72 72 82 0 8 0 pvpl 32 732266 0 720938 369 150 219 249 0 265 124 pmappl 216 1509 0 1477 3 1 2 3 0 8 0 extentpl 40 55 0 38 1 0 1 1 0 8 0 phpool 112 506 0 153 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(ffffffff82ff3a16) 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 preempt() at preempt+0x61 sys/kern/sched_bsd.c:338 ast(ffff80002a553930) at ast+0x13f mi_ast sys/sys/syscall_mi.h:261 [inline] ast(ffff80002a553930) at ast+0x13f sys/arch/amd64/amd64/trap.c:541 intr_user_exit() at intr_user_exit+0x3c end of kernel end trace frame: 0x7138f2dacd20, count: -7 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82ff3a16) 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 preempt() at preempt+0x61 sys/kern/sched_bsd.c:338 ast(ffff80002a553930) at ast+0x13f mi_ast sys/sys/syscall_mi.h:261 [inline] ast(ffff80002a553930) at ast+0x13f sys/arch/amd64/amd64/trap.c:541 intr_user_exit() at intr_user_exit+0x3c end of kernel end trace frame: 0x7138f2dacd20, count: -7