panic: assertwaitok: non-zero mutex count: 2 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *167648 31103 0 0 0x4000000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82ff36d9) 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(ffffffff8351a640,1) at pool_get+0x1e9 sys/kern/subr_pool.c:589 m_copym(fffffd8074a2f400,0,1,1) at m_copym+0x1f5 sys/kern/uipc_mbuf.c:653 somove(fffffd806e470be8,1) at somove+0xd0d sys/kern/uipc_socket.c:1803 sosplice(fffffd806e470be8,4,1,fffffd8074a2f030) at sosplice+0x88c sys/kern/uipc_socket.c:1510 sys_setsockopt(ffff80002a49b6e0,ffff800035c03ee0,ffff800035c03e30) at sys_setsockopt+0x2b9 sys/kern/uipc_syscalls.c:1231 syscall(ffff800035c03ee0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x3ff464472b0, 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: 2 ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82ff36d9) 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(ffffffff8351a640,1) at pool_get+0x1e9 sys/kern/subr_pool.c:589 m_copym(fffffd8074a2f400,0,1,1) at m_copym+0x1f5 sys/kern/uipc_mbuf.c:653 somove(fffffd806e470be8,1) at somove+0xd0d sys/kern/uipc_socket.c:1803 sosplice(fffffd806e470be8,4,1,fffffd8074a2f030) at sosplice+0x88c sys/kern/uipc_socket.c:1510 sys_setsockopt(ffff80002a49b6e0,ffff800035c03ee0,ffff800035c03e30) at sys_setsockopt+0x2b9 sys/kern/uipc_syscalls.c:1231 syscall(ffff800035c03ee0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x3ff464472b0, count: -12 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800035c039e0 rbx 0 rdx 0xffff800001279700 rcx 0 rax 0xffff80002a49b6e0 r8 0x101010101010101 r9 0x8080808080808080 r10 0xa2e5112e75317701 r11 0x5ad3c4dc881c6de6 r12 0 r13 0 r14 0 r15 0x1 rip 0xffffffff81cf7a65 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff800035c039d0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=167648 pid=31103 tcnt=2 stat=onproc flags process=0 proc=4000000 runpri=50, usrpri=50, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a49a528,0xffff80003761d980 process=0xffff8000327f6258 user=0xffff800035bfe000, vmspace=0xfffffd80693eb2c8 estcpu=36, cpticks=0, pctcpu=0.0, user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 18604 1448 161 0 3 0x82 netio sshd-session 17516 247672 5962 0 2 0 syz-executor 17516 139648 5962 0 3 0x4000080 fsleep syz-executor 97575 446259 161 0 3 0x82 netio sshd-session 79772 518641 71951 0 2 0 syz-executor 79772 209513 71951 0 3 0x4000080 fsleep syz-executor 51650 262002 72367 0 2 0 syz-executor 51650 141838 72367 0 3 0x4000080 fsleep syz-executor 31103 513427 42061 0 2 0 syz-executor *31103 167648 42061 0 7 0x4000000 syz-executor 60394 88201 19047 0 2 0 syz-executor 60394 234358 19047 0 3 0x4000080 fsleep syz-executor 59584 284908 63123 0 2 0 syz-executor 59584 505208 63123 0 3 0x4000080 fsleep syz-executor 63775 431116 41856 0 3 0x80 nanoslp syz-executor 63775 364703 41856 0 3 0x4000080 fsleep syz-executor 63775 393502 41856 0 3 0x4000080 ttyout syz-executor 63775 185252 41856 0 3 0x4000080 fsleep syz-executor 63775 287547 41856 0 3 0x4000080 fsleep syz-executor 36161 465624 0 0 3 0x14200 bored sosplice 19047 313773 33246 0 3 0x82 nanoslp syz-executor 5962 769 33246 0 3 0x82 nanoslp syz-executor 42061 109965 33246 0 3 0x82 nanoslp syz-executor 71951 424686 33246 0 3 0x82 nanoslp syz-executor 72367 201244 33246 0 3 0x82 nanoslp syz-executor 41856 106928 33246 0 3 0x82 nanoslp syz-executor 63123 229635 33246 0 3 0x82 nanoslp syz-executor 34958 47191 33246 0 3 0x82 nanoslp syz-executor 33246 157806 99499 0 3 0x82 kqread syz-executor 99499 12992 54 0 3 0x10008a sigsusp ksh 54 112141 70605 0 3 0x98 kqread sshd-session 70605 136151 161 0 3 0x92 kqread sshd-session 72891 241112 1 0 3 0x100083 ttyin getty 161 437482 1 0 3 0x88 kqread sshd 30005 329100 18846 73 3 0x1100090 kqread syslogd 18846 403609 1 0 3 0x100082 sbwait syslogd 56423 266409 1 0 3 0x100080 kqread resolvd 53162 519736 18629 77 3 0x100092 kqread dhcpleased 175 352357 18629 77 3 0x100092 kqread dhcpleased 18629 140744 1 0 3 0x80 kqread dhcpleased 75657 133345 0 0 3 0x14200 bored smr 16903 51687 0 0 2 0x14200 zerothread 93856 508506 0 0 3 0x14200 aiodoned aiodoned 59320 374558 0 0 3 0x14200 syncer update 4848 480976 0 0 3 0x14200 cleaner cleaner 24439 225120 0 0 3 0x14200 reaper reaper 34159 37122 0 0 3 0x14200 pgdaemon pagedaemon 74955 271326 0 0 3 0x14200 bored viomb 61267 495204 0 0 3 0x40014200 acpi0 acpi0 7738 387893 0 0 3 0x14200 bored softnet3 26792 88361 0 0 3 0x14200 bored softnet2 1338 233564 0 0 3 0x14200 bored softnet1 37854 293232 0 0 3 0x14200 bored softnet0 33409 485597 0 0 3 0x14200 bored systqmp 60047 77135 0 0 3 0x14200 bored systq 43252 143565 0 0 3 0x40014200 tmoslp softclock 83305 349714 0 0 3 0x40014200 idle0 1 233803 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 10180 11049K 11178K 166960K 11333 0 pcb 17 12K 12K 166960K 68 0 rtable 214 6K 6K 166960K 369 0 pf 34 13K 17K 166960K 48 0 ifaddr 43 7K 8K 166960K 50 0 ifgroup 50 2K 2K 166960K 62 0 counters 30 17K 17K 166960K 33 0 ioctlops 0 0K 4K 166960K 50 0 iov 0 0K 12K 166960K 10 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1370 86K 86K 166960K 1469 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 1K 166960K 2 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 12 0 dirhash 12 2K 2K 166960K 30 0 ACPI 1690 195K 286K 166960K 12468 0 file desc 18 65K 97K 166960K 374 0 sigio 1 0K 0K 166960K 13 0 proc 61 59K 108K 166960K 486 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 25 0 in_multi 103 7K 7K 166960K 113 0 ether_multi 1 0K 0K 166960K 2 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 55 254K 254K 166960K 55 0 exec 0 0K 1K 166960K 365 0 pfkey data 0 0K 4K 166960K 1 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 250 73K 74K 166960K 4963 0 UVM aobj 5 2K 2K 166960K 5 0 pinsyscall 43 86K 94K 166960K 1412 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 2 0K 1K 166960K 40 0 NDP 11 0K 2K 166960K 32 0 temp 40 6803K 6874K 166960K 12471 0 kqueue 13 20K 26K 166960K 56 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 47 0 44 1 0 1 1 0 8 0 rtentry 112 120 0 20 4 0 4 4 0 8 0 unpcb 144 159 0 140 1 0 1 1 0 8 0 syncache 336 12 0 12 2 1 1 1 0 8 1 tcpqe 32 5 0 5 2 1 1 1 0 8 1 tcpcb 808 131 0 114 2 0 2 2 0 8 0 arp 88 20 0 2 1 0 1 1 0 8 0 ipq 40 4 0 2 2 1 1 1 0 8 0 ipqe 40 93 0 90 2 1 1 1 0 8 0 inpcb 336 406 0 384 3 0 3 3 0 8 0 nd6 104 26 0 1 1 0 1 1 0 8 0 pkpcb 40 2 0 2 2 1 1 1 0 8 1 kcovpl 48 8 0 0 1 0 1 1 0 8 0 ppxss 1072 1 0 1 1 0 1 1 0 8 1 pfstscr 40 3 0 2 1 0 1 1 0 8 0 pfanchor 1288 3 0 0 1 0 1 1 0 8 0 pfstitem 24 6 0 0 1 0 1 1 0 8 0 pfstkey 128 9 0 4 1 0 1 1 0 8 0 pfstate 344 5 0 2 1 0 1 1 0 8 0 pfrule 1344 3 0 2 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 518 0 76 30 0 30 30 0 8 2 art_table 32 519 0 76 4 0 4 4 0 8 0 art_node 16 119 0 30 1 0 1 1 0 8 0 sysvmsgpl 40 3 0 2 2 1 1 1 0 8 0 semapl 112 10 0 0 1 0 1 1 0 8 0 shmpl 112 2 0 0 1 0 1 1 0 8 0 dirhash 1024 30 0 13 3 0 3 3 0 8 0 dino2pl 256 1934 0 434 95 0 95 95 0 8 0 ffsino 240 1934 0 434 89 0 89 89 0 8 0 nchpl 144 2390 0 712 63 0 63 63 0 8 0 uvmvnodes 80 2089 0 0 43 0 43 43 0 8 0 vnodes 216 2089 0 0 117 0 117 117 0 8 0 namei 1024 6923 0 6923 3 2 1 2 0 8 1 kstatmem 264 28 0 6 2 0 2 2 0 8 0 scsiplug 72 2 0 2 1 0 1 1 0 8 1 scxspl 216 7055 0 7055 2 1 1 2 1 8 1 plimitpl 152 62 0 46 1 0 1 1 0 8 0 sigapl 424 657 0 608 7 1 6 7 0 8 0 futexpl 64 3214 0 3206 1 0 1 1 0 8 0 knotepl 120 13024 0 12974 10 0 10 10 0 8 8 kqueuepl 184 76 0 63 1 0 1 1 0 8 0 pipepl 288 126 0 96 4 1 3 3 0 8 0 fdescpl 432 640 0 608 5 1 4 5 0 8 0 filepl 120 2470 0 2206 9 0 9 9 0 8 1 lockfpl 104 48 0 45 1 0 1 1 0 8 0 lockfspl 48 20 0 17 1 0 1 1 0 8 0 sessionpl 144 26 0 16 1 0 1 1 0 8 0 pgrppl 48 41 0 23 1 0 1 1 0 8 0 ucredpl 104 234 0 222 1 0 1 1 0 8 0 zombiepl 144 695 0 694 1 0 1 1 0 8 0 processpl 1096 657 0 608 4 0 4 4 0 8 0 procpl 648 1022 0 963 6 0 6 6 0 8 1 sosppl 168 31 0 29 1 0 1 1 0 8 0 sockpl 504 614 0 570 6 0 6 6 0 8 0 mcl64k 65536 136 0 136 2 1 1 1 0 8 1 mcl16k 16384 57 0 57 2 1 1 1 0 8 1 mcl12k 12288 14 0 14 2 1 1 1 0 8 1 mcl9k 9216 9 0 9 2 1 1 1 0 8 1 mcl8k 8192 50 0 50 2 1 1 1 0 8 1 mcl4k 4096 3075 0 3027 13 6 7 13 0 8 0 mcl2k2 2112 1 0 1 1 1 0 1 0 8 0 mcl2k 2048 363 0 357 3 0 3 3 0 8 2 mtagpl 96 8 0 4 1 0 1 1 0 8 0 mbufpl 256 8417 0 8212 30 10 20 21 0 8 6 bufpl 280 3677 0 96 256 0 256 256 0 8 0 anonpl 24 156439 0 152722 48 2 46 46 0 187 21 amapchunkpl 152 16694 0 16166 37 8 29 29 0 158 8 amappl16 200 3850 0 3826 17 8 9 14 0 8 7 amappl15 192 8 0 8 1 1 0 1 0 8 0 amappl14 184 123 0 111 1 0 1 1 0 8 0 amappl13 176 6 0 6 1 1 0 1 0 8 0 amappl12 168 1255 0 1223 3 1 2 3 0 8 0 amappl11 160 47 0 37 1 0 1 1 0 8 0 amappl10 152 31 0 31 1 1 0 1 0 8 0 amappl9 144 164 0 164 1 1 0 1 0 8 0 amappl8 136 27 0 26 1 0 1 1 0 8 0 amappl7 128 100 0 88 1 0 1 1 0 8 0 amappl6 120 169 0 167 1 0 1 1 0 8 0 amappl5 112 125 0 115 1 0 1 1 0 8 0 amappl4 104 300 0 286 1 0 1 1 0 8 0 amappl3 96 3284 0 3165 4 0 4 4 0 8 0 amappl2 88 694 0 618 2 0 2 2 0 8 0 amappl1 80 9029 0 8344 16 1 15 15 0 8 0 amappl 88 4590 0 4406 5 0 5 5 0 92 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 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 4 0 0 1 0 1 1 0 8 0 uaddrrnd 24 640 0 608 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 640 0 608 1 0 1 1 0 8 0 vmmpekpl 168 6273 0 6230 3 0 3 3 0 8 0 vmmpepl 168 48224 0 46180 94 5 89 89 0 357 0 vmsppl 344 639 0 608 4 1 3 4 0 8 0 rwobjpl 24 19570 0 16428 20 1 19 19 0 8 0 pdppl 4096 1286 0 1216 104 34 70 82 0 8 0 pvpl 32 349810 0 338674 116 1 115 115 0 265 25 pmappl 216 639 0 608 3 0 3 3 0 8 0 extentpl 40 55 0 38 1 0 1 1 0 8 0 phpool 112 397 0 59 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(ffffffff82ff36d9) 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(ffffffff8351a640,1) at pool_get+0x1e9 sys/kern/subr_pool.c:589 m_copym(fffffd8074a2f400,0,1,1) at m_copym+0x1f5 sys/kern/uipc_mbuf.c:653 somove(fffffd806e470be8,1) at somove+0xd0d sys/kern/uipc_socket.c:1803 sosplice(fffffd806e470be8,4,1,fffffd8074a2f030) at sosplice+0x88c sys/kern/uipc_socket.c:1510 sys_setsockopt(ffff80002a49b6e0,ffff800035c03ee0,ffff800035c03e30) at sys_setsockopt+0x2b9 sys/kern/uipc_syscalls.c:1231 syscall(ffff800035c03ee0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x3ff464472b0, 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(ffffffff82ff36d9) 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(ffffffff8351a640,1) at pool_get+0x1e9 sys/kern/subr_pool.c:589 m_copym(fffffd8074a2f400,0,1,1) at m_copym+0x1f5 sys/kern/uipc_mbuf.c:653 somove(fffffd806e470be8,1) at somove+0xd0d sys/kern/uipc_socket.c:1803 sosplice(fffffd806e470be8,4,1,fffffd8074a2f030) at sosplice+0x88c sys/kern/uipc_socket.c:1510 sys_setsockopt(ffff80002a49b6e0,ffff800035c03ee0,ffff800035c03e30) at sys_setsockopt+0x2b9 sys/kern/uipc_syscalls.c:1231 syscall(ffff800035c03ee0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x3ff464472b0, count: -12