witness: thread 0xffff800020b50018 exiting with the following locks held: exclusive rrwlock inode r = 0 (0xfffffd806eb424e0) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 rw_enter+0x46d sys/kern/kern_rwlock.c:306 #2 rrw_enter+0x4f sys/kern/kern_rwlock.c:435 #3 VOP_LOCK+0x4b sys/kern/vfs_vops.c:602 #4 vn_rdwr+0x109 vn_lock sys/kern/vfs_vnops.c:561 [inline] #4 vn_rdwr+0x109 sys/kern/vfs_vnops.c:317 #5 acct_process+0x5db sys/kern/kern_acct.c:221 #6 exit1+0x361 sys/kern/kern_exit.c:208 #7 sys_exit+0x17 sys/kern/kern_exit.c:94 #8 syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] #8 syscall+0x552 sys/arch/amd64/amd64/trap.c:555 #9 Xsyscall+0x128 panic: thread 0xffff800020b50018 cannot exit while holding sleeplocks Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *265359 43540 0 0x14000 0x200 0 reaper db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:207 witness_thread_exit(ffff800020b50018) at witness_thread_exit+0x213 sys/kern/subr_witness.c:1364 reaper(ffff800020affb30) at reaper+0x14c sys/kern/kern_exit.c:423 end trace frame: 0x0, count: 11 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{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic thread 0xffff800020b50018 cannot exit while holding sleeplocks ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:207 witness_thread_exit(ffff800020b50018) at witness_thread_exit+0x213 sys/kern/subr_witness.c:1364 reaper(ffff800020affb30) at reaper+0x14c sys/kern/kern_exit.c:423 end trace frame: 0x0, count: -4 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800020afcee0 rbx 0xffff800020afcf90 rdx 0xffff800020affb30 rcx 0 rax 0 r8 0xffffffff817eab83 kprintf+0x173 r9 0x1 r10 0x25 r11 0xff3f68a6dee5db45 r12 0x3000000008 r13 0xffff800020afcef0 r14 0x100 r15 0x1 rip 0xffffffff81ee4248 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020afced0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (reaper) pid=265359 stat=onproc flags process=14000 proc=200 pri=4, usrpri=54, nice=20 forw=0xffffffffffffffff, list=0xffff800020ab1b28,0xffff800020aff8c8 process=0xffff800020aea388 user=0xffff800020af8000, vmspace=0xffffffff823b0ae0 estcpu=4, cpticks=8, pctcpu=0.61 user=0, sys=5, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 87065 93834 70448 0 3 0x82 nanosleep syz-executor.1 5643 75461 70448 0 2 0x482 syz-executor.0 64303 261796 0 0 3 0x14200 acct acct 9612 267136 1 0 3 0x100083 ttyin getty 32096 277500 0 0 3 0x14200 bored sosplice 70448 67960 14729 0 3 0x82 kqread syz-fuzzer 70448 201169 14729 0 3 0x4000082 thrsleep syz-fuzzer 70448 358378 14729 0 3 0x4000082 thrsleep syz-fuzzer 70448 202137 14729 0 3 0x4000082 thrsleep syz-fuzzer 70448 406655 14729 0 3 0x4000082 thrsleep syz-fuzzer 70448 432872 14729 0 3 0x4000082 thrsleep syz-fuzzer 70448 330489 14729 0 3 0x4000082 thrsleep syz-fuzzer 70448 303228 14729 0 3 0x4000082 thrsleep syz-fuzzer 70448 223426 14729 0 3 0x4000082 thrsleep syz-fuzzer 70448 71542 14729 0 3 0x4000082 thrsleep syz-fuzzer 14729 64928 8588 0 3 0x10008a pause ksh 8588 261463 88742 0 3 0x92 select sshd 88742 95393 1 0 3 0x80 select sshd 78918 306469 18267 74 3 0x100092 bpf pflogd 18267 311419 1 0 3 0x80 netio pflogd 13677 495666 38994 73 2 0x100090 syslogd 38994 403111 1 0 3 0x100082 netio syslogd 30978 153938 0 0 3 0x14200 pgzero zerothread 19148 470974 0 0 3 0x14200 aiodoned aiodoned 29430 166689 0 0 3 0x14200 syncer update 32506 399371 0 0 3 0x14200 cleaner cleaner *43540 265359 0 0 7 0x14200 reaper 97967 244185 0 0 3 0x14200 pgdaemon pagedaemon 58845 400487 0 0 3 0x14200 bored crynlk 64597 62798 0 0 3 0x14200 bored crypto 19069 274079 0 0 3 0x40014200 acpi0 acpi0 66289 165693 0 0 7 0x40014200 idle1 78508 34959 0 0 3 0x14200 bored softnet 39595 353784 0 0 3 0x14200 bored systqmp 93191 247506 0 0 3 0x14200 bored systq 14558 499561 0 0 2 0x40014200 softclock 15389 280583 0 0 3 0x40014200 idle0 32454 471930 0 0 3 0x14200 bored smr 1 172430 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9651 6424K 14746K 78643K 82055 0 0 pcb 13 8K 8K 78643K 2064 0 0 rtable 131 13K 14K 78643K 6392 0 0 ifaddr 99 29K 37K 78643K 2971 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 2912 0 0 iov 0 0K 32K 78643K 3349 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1189 75K 77K 78643K 27104 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 9K 78643K 366 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 1K 78643K 2976 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 4 9K 25K 78643K 28452 0 0 sigio 0 0K 0K 78643K 364 0 0 proc 55 51K 83K 78643K 6335 0 0 subproc 32 2K 2K 78643K 1368 0 0 NFS srvsock 1 0K 0K 78643K 1 0 0 NFS daemon 1 16K 16K 78643K 1 0 0 ip_moptions 0 0K 0K 78643K 2614 0 0 in_multi 33 2K 2K 78643K 1780 0 0 ether_multi 1 0K 0K 78643K 117 0 0 mrt 0 0K 0K 78643K 102 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 156 689K 689K 78643K 156 0 0 exec 0 0K 1K 78643K 3509 0 0 pfkey data 0 0K 4K 78643K 9 0 0 pagedep 1 8K 8K 78643K 1 0 0 inodedep 1 32K 32K 78643K 1 0 0 newblk 1 0K 0K 78643K 1 0 0 VM swap 7 26K 26K 78643K 7 0 0 UVM amap 102 21K 31K 78643K 95092 0 0 UVM aobj 130 5K 5K 78643K 149 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 1K 78643K 1445 0 0 NDP 25 0K 1K 78643K 902 0 0 temp 263 2753K 2881K 78643K 356937 0 0 kqueue 0 0K 0K 78643K 215 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 172 0 165 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 1230 0 1230 27 26 1 1 0 8 1 rtentry 112 968 0 922 3 1 2 2 0 8 0 unpcb 120 8748 0 8740 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 8156 0 8156 1 1 0 1 0 8 0 tcpcb 544 4359 0 4355 1 0 1 1 0 8 0 inpcb 280 13122 0 13116 32 31 1 2 0 8 0 rttmr 72 13 0 13 10 10 0 1 0 8 0 ip6q 72 3 0 3 3 3 0 1 0 8 0 ip6af 48 7 0 7 3 3 0 1 0 8 0 nd6 48 237 0 231 1 0 1 1 0 8 0 pkpcb 40 112 0 112 46 46 0 1 0 8 0 swfcl 56 13 0 0 1 0 1 1 0 8 0 ppxss 1128 536 0 536 83 82 1 1 0 8 1 pffrag 232 40 0 40 26 26 0 1 0 482 0 pffrnode 88 40 0 40 26 26 0 1 0 8 0 pffrent 40 101 0 101 28 28 0 1 0 8 0 pfosfp 40 846 0 846 5 5 0 5 0 8 0 pfosfpen 112 1428 0 1428 21 21 0 21 0 8 0 pfstitem 24 665 0 648 1 0 1 1 0 8 0 pfstkey 112 665 0 648 2 1 1 2 0 8 0 pfstate 328 665 0 648 11 9 2 4 0 8 0 pfrule 1360 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 3880 0 3677 22 9 13 14 0 8 0 art_table 32 3882 0 3677 2 0 2 2 0 8 0 art_node 16 917 0 875 1 0 1 1 0 8 0 sysvmsgpl 40 14 0 8 1 0 1 1 0 8 0 semapl 112 2972 0 2962 1 0 1 1 0 8 0 shmpl 112 147 0 19 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 45445 0 43977 50 2 48 48 0 8 0 ffsino 272 45445 0 43977 99 0 99 99 0 8 0 nchpl 144 85118 0 83482 62 0 62 62 0 8 0 uvmvnodes 72 7706 0 0 141 0 141 141 0 8 0 vnodes 200 7706 0 0 406 0 406 406 0 8 0 namei 1024 279310 0 279310 7 6 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 71 0 71 41 41 0 1 0 8 0 scxspl 192 267475 0 267475 129 128 1 6 0 8 1 plimitpl 152 2540 0 2533 1 0 1 1 0 8 0 sigapl 432 28427 0 28415 3 1 2 3 0 8 0 futexpl 56 331219 0 331219 3 2 1 1 0 8 1 knotepl 112 5946 0 5927 1 0 1 1 0 8 0 kqueuepl 104 6116 0 6114 1 0 1 1 0 8 0 pipepl 112 16216 0 16197 33 31 2 2 0 8 1 fdescpl 488 28428 0 28415 3 0 3 3 0 8 0 filepl 152 167145 0 167056 67 62 5 7 0 8 1 lockfpl 104 9279 0 9279 12 11 1 1 0 8 1 lockfspl 48 3209 0 3209 12 11 1 1 0 8 1 sessionpl 112 101 0 92 1 0 1 1 0 8 0 pgrppl 48 394 0 385 1 0 1 1 0 8 0 ucredpl 96 32222 0 32213 1 0 1 1 0 8 0 zombiepl 144 28420 0 28418 6 5 1 1 0 8 0 processpl 896 28450 0 28418 4 0 4 4 0 8 0 procpl 632 90067 0 90025 56 52 4 5 0 8 0 srpgc 64 167 0 167 72 72 0 1 0 8 0 sosppl 128 351 0 351 76 76 0 1 0 8 0 sockpl 384 23449 0 23437 49 46 3 4 0 8 1 mcl64k 65536 1256 0 0 142 128 14 64 0 8 1 mcl16k 16384 33 0 0 4 1 3 3 0 8 0 mcl12k 12288 73 0 0 3 1 2 2 0 8 0 mcl9k 9216 65 0 0 4 2 2 2 0 8 0 mcl8k 8192 44 0 0 5 3 2 3 0 8 0 mcl4k 4096 33 0 0 3 0 3 3 0 8 0 mcl2k2 2112 13 0 0 1 0 1 1 0 8 0 mcl2k 2048 248 0 0 21 10 11 21 0 8 0 mtagpl 80 124 0 0 2 0 2 2 0 8 0 mbufpl 256 2007 0 0 52 22 30 36 0 8 0 bufpl 256 88776 0 80543 515 0 515 515 0 8 0 anonpl 16 2651693 0 2641991 482 417 65 68 0 125 6 amapchunkpl 152 176066 0 175956 220 214 6 19 0 158 0 amappl16 192 144071 0 143368 749 705 44 48 0 8 7 amappl15 184 3816 0 3815 8 7 1 1 0 8 0 amappl14 176 5416 0 5411 1 0 1 1 0 8 0 amappl13 168 6723 0 6723 10 10 0 1 0 8 0 amappl12 160 1885 0 1885 10 10 0 1 0 8 0 amappl11 152 3849 0 3838 1 0 1 1 0 8 0 amappl10 144 4341 0 4337 1 0 1 1 0 8 0 amappl9 136 7053 0 7050 1 0 1 1 0 8 0 amappl8 128 6430 0 6400 3 1 2 2 0 8 0 amappl7 120 4445 0 4435 1 0 1 1 0 8 0 amappl6 112 3584 0 3571 1 0 1 1 0 8 0 amappl5 104 2707 0 2696 1 0 1 1 0 8 0 amappl4 96 28946 0 28914 2 1 1 2 0 8 0 amappl3 88 4674 0 4664 1 0 1 1 0 8 0 amappl2 80 228470 0 228395 3 1 2 3 0 8 0 amappl1 72 621006 0 620580 25 15 10 20 0 8 0 amappl 80 91740 0 91702 1 0 1 1 0 84 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma64 64 259 0 259 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 17 0 17 1 1 0 1 0 8 0 aobjpl 64 148 0 19 3 0 3 3 0 8 0 uaddrrnd 24 28428 0 28413 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 28428 0 28413 1 0 1 1 0 8 0 vmmpekpl 168 223867 0 223838 3 1 2 2 0 8 0 vmmpepl 168 3454954 0 3453081 905 802 103 111 0 357 14 vmsppl 368 28427 0 28413 2 0 2 2 0 8 0 pdppl 4096 56863 0 56826 7 1 6 6 0 8 0 pvpl 32 6900315 0 6887361 1129 969 160 168 0 265 24 pmappl 232 28427 0 28413 3 2 1 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 889 0 183 21 0 21 21 0 8 0