witness: thread 0xffff800020b29650 exiting with the following locks held: exclusive rrwlock inode r = 0 (0xfffffd806e2233c8) #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 0xffff800020b29650 cannot exit while holding sleeplocks Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 503935 38581 0 0x2 0x480 0 syz-executor.0 *300252 4501 0 0x14000 0x200 1 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(ffff800020b29650) at witness_thread_exit+0x213 sys/kern/subr_witness.c:1364 reaper(ffff800020aff8b8) 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{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic thread 0xffff800020b29650 cannot exit while holding sleeplocks ddb{1}> 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(ffff800020b29650) at witness_thread_exit+0x213 sys/kern/subr_witness.c:1364 reaper(ffff800020aff8b8) at reaper+0x14c sys/kern/kern_exit.c:423 end trace frame: 0x0, count: -4 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800020afdbf0 rbx 0xffff800020afdca0 rdx 0xffff800020aff8b8 rcx 0 rax 0 r8 0xffffffff815a9073 kprintf+0x173 r9 0x1 r10 0x25 r11 0xc797564ae46c8779 r12 0x3000000008 r13 0xffff800020afdc00 r14 0x100 r15 0x1 rip 0xffffffff81e595e8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020afdbe0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (reaper) pid=300252 stat=onproc flags process=14000 proc=200 pri=4, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff800020ab1638,0xffff800020aff3d8 process=0xffff800020aea708 user=0xffff800020af8000, vmspace=0xffffffff8236a918 estcpu=1, cpticks=6, pctcpu=0.78 user=0, sys=6, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 22975 399609 38581 0 2 0x480 syz-executor.0 22975 390526 38581 0 3 0x4000080 fsleep syz-executor.0 22975 413549 38581 0 3 0x4000080 fsleep syz-executor.0 56101 97403 88698 0 2 0x482 syz-executor.1 30972 64568 1 0 3 0x100083 ttyin getty 38581 503935 88698 0 7 0x482 syz-executor.0 54498 333244 0 0 3 0x14200 acct acct 32422 151817 0 0 3 0x14200 bored sosplice 88698 368836 64042 0 3 0x82 kqread syz-fuzzer 88698 184221 64042 0 3 0x4000082 thrsleep syz-fuzzer 88698 230299 64042 0 3 0x4000082 thrsleep syz-fuzzer 88698 25661 64042 0 3 0x4000082 thrsleep syz-fuzzer 88698 422109 64042 0 3 0x4000082 thrsleep syz-fuzzer 88698 205435 64042 0 3 0x4000082 thrsleep syz-fuzzer 88698 132466 64042 0 3 0x4000082 thrsleep syz-fuzzer 88698 322816 64042 0 3 0x4000082 thrsleep syz-fuzzer 88698 45326 64042 0 3 0x4000082 thrsleep syz-fuzzer 88698 30625 64042 0 3 0x4000082 thrsleep syz-fuzzer 64042 211927 37939 0 3 0x10008a pause ksh 37939 70013 16262 0 3 0x92 select sshd 16262 306024 1 0 3 0x80 select sshd 97678 343227 31671 74 3 0x100092 bpf pflogd 31671 361626 1 0 3 0x80 netio pflogd 29862 396929 30523 73 3 0x100010 ffs_fsync syslogd 30523 131247 1 0 3 0x100082 netio syslogd 1779 221550 1 77 3 0x100090 poll dhclient 67730 50725 1 0 3 0x80 poll dhclient 17885 219147 0 0 3 0x14200 pgzero zerothread 31064 390380 0 0 3 0x14200 aiodoned aiodoned 99178 47193 0 0 3 0x14200 syncer update 17104 146724 0 0 3 0x14200 cleaner cleaner * 4501 300252 0 0 7 0x14200 reaper 27077 277847 0 0 3 0x14200 pgdaemon pagedaemon 98675 385229 0 0 3 0x14200 bored crynlk 42793 181518 0 0 3 0x14200 bored crypto 98814 210037 0 0 3 0x40014200 acpi0 acpi0 5995 107379 0 0 3 0x40014200 idle1 32045 26970 0 0 3 0x14200 bored softnet 26505 8836 0 0 3 0x14200 bored systqmp 208 193537 0 0 3 0x14200 bored systq 29011 10382 0 0 3 0x40014200 bored softclock 58654 32270 0 0 3 0x40014200 idle0 35012 432049 0 0 3 0x14200 bored smr 1 106128 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 29862 (syslogd) thread 0xffff800020b60778 (396929) exclusive rrwlock inode r = 0 (0xfffffd806ebb5c48) #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_lock+0x6e sys/kern/vfs_vnops.c:561 #5 sys_fsync+0x114 sys/kern/vfs_syscalls.c:2806 #6 syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] #6 syscall+0x552 sys/arch/amd64/amd64/trap.c:555 #7 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9675 6614K 7876K 78643K 67445 0 0 pcb 13 8K 8K 78643K 1582 0 0 rtable 121 13K 13K 78643K 5880 0 0 ifaddr 105 29K 37K 78643K 2242 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 2494 0 0 iov 0 0K 40K 78643K 2382 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1202 75K 77K 78643K 21293 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 5K 78643K 299 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 1K 78643K 2159 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 5 13K 25K 78643K 22203 0 0 sigio 0 0K 0K 78643K 308 0 0 proc 54 51K 83K 78643K 4341 0 0 subproc 32 2K 2K 78643K 839 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 1967 0 0 in_multi 33 2K 2K 78643K 1201 0 0 ether_multi 1 0K 0K 78643K 105 0 0 mrt 0 0K 0K 78643K 92 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 126 556K 556K 78643K 126 0 0 exec 0 0K 1K 78643K 2566 0 0 pfkey data 0 0K 4K 78643K 12 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 141 23K 33K 78643K 73275 0 0 UVM aobj 130 4K 4K 78643K 145 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 1091 0 0 NDP 27 0K 1K 78643K 671 0 0 temp 278 2754K 3394K 78643K 273981 0 0 kqueue 0 0K 0K 78643K 191 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{1}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 109 0 103 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 873 0 871 1 0 1 1 0 8 0 rtentry 112 608 0 564 4 2 2 2 0 8 0 unpcb 120 7213 0 7203 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpqe 32 8005 0 8005 2 2 0 2 0 8 0 tcpcb 544 3581 0 3577 1 0 1 1 0 8 0 inpcb 280 10787 0 10778 37 35 2 2 0 8 1 rttmr 72 7 0 7 6 6 0 1 0 8 0 nd6 48 147 0 141 1 0 1 1 0 8 0 pkpcb 40 124 0 124 43 42 1 1 0 8 1 swfcl 56 7 0 0 1 0 1 1 0 8 0 ppxss 1128 414 0 414 57 57 0 1 0 8 0 pffrag 232 89 0 89 11 11 0 1 0 482 0 pffrnode 88 89 0 89 11 11 0 1 0 8 0 pffrent 40 188 0 188 12 12 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 733 0 718 2 0 2 2 0 8 0 pfstkey 112 733 0 718 8 6 2 8 0 8 0 pfstate 328 733 0 718 29 27 2 22 0 8 0 pfrule 1360 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 2462 0 2265 24 11 13 14 0 8 0 art_table 32 2463 0 2265 2 0 2 2 0 8 0 art_node 16 577 0 537 1 0 1 1 0 8 0 sysvmsgpl 40 14 0 6 1 0 1 1 0 8 0 semapl 112 2157 0 2147 1 0 1 1 0 8 0 shmpl 112 143 0 15 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 35290 0 33845 47 0 47 47 0 8 0 ffsino 272 35290 0 33845 97 0 97 97 0 8 0 nchpl 144 66127 0 64490 62 0 62 62 0 8 0 uvmvnodes 72 6417 0 0 117 0 117 117 0 8 0 vnodes 200 6417 0 0 338 0 338 338 0 8 0 namei 1024 213074 0 213074 11 10 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 52 0 52 28 28 0 1 0 8 0 scxspl 192 203866 0 203865 86 85 1 6 0 8 0 plimitpl 152 2168 0 2160 1 0 1 1 0 8 0 sigapl 432 22270 0 22255 3 1 2 3 0 8 0 futexpl 56 264997 0 264995 6 5 1 1 0 8 0 knotepl 112 4467 0 4448 2 1 1 2 0 8 0 kqueuepl 104 4661 0 4659 1 0 1 1 0 8 0 pipepl 112 12296 0 12277 27 26 1 2 0 8 0 fdescpl 488 22271 0 22255 3 0 3 3 0 8 0 filepl 152 129021 0 128922 45 40 5 7 0 8 1 lockfpl 104 6783 0 6783 12 11 1 1 0 8 1 lockfspl 48 2393 0 2393 12 11 1 1 0 8 1 sessionpl 112 73 0 62 1 0 1 1 0 8 0 pgrppl 48 282 0 271 1 0 1 1 0 8 0 ucredpl 96 23753 0 23744 1 0 1 1 0 8 0 zombiepl 144 22259 0 22258 10 9 1 1 0 8 0 processpl 896 22292 0 22258 4 0 4 4 0 8 0 procpl 632 69699 0 69654 32 27 5 5 0 8 1 srpgc 64 101 0 101 41 41 0 1 0 8 0 sosppl 128 286 0 286 66 65 1 1 0 8 1 sockpl 384 19182 0 19163 33 30 3 4 0 8 1 mcl64k 65536 735 0 0 82 63 19 34 0 8 1 mcl16k 16384 41 0 0 6 4 2 3 0 8 0 mcl12k 12288 97 0 0 3 1 2 2 0 8 0 mcl9k 9216 74 0 0 4 2 2 2 0 8 0 mcl8k 8192 25 0 0 3 0 3 3 0 8 0 mcl4k 4096 25 0 0 3 0 3 3 0 8 0 mcl2k2 2112 19 0 0 2 0 2 2 0 8 0 mcl2k 2048 316 0 0 26 18 8 26 0 8 0 mtagpl 80 101 0 0 1 0 1 1 0 8 0 mbufpl 256 1401 0 0 27 4 23 23 0 8 0 bufpl 256 63955 0 56926 440 0 440 440 0 8 0 anonpl 16 1959137 0 1947058 362 305 57 67 0 125 0 amapchunkpl 152 131923 0 131807 128 122 6 18 0 158 0 amappl16 192 112817 0 112122 492 455 37 48 0 8 0 amappl15 184 2481 0 2481 6 6 0 1 0 8 0 amappl14 176 3481 0 3475 1 0 1 1 0 8 0 amappl13 168 4830 0 4830 8 8 0 1 0 8 0 amappl12 160 3006 0 3005 2 1 1 1 0 8 0 amappl11 152 2767 0 2752 1 0 1 1 0 8 0 amappl10 144 1597 0 1592 1 0 1 1 0 8 0 amappl9 136 5903 0 5900 1 0 1 1 0 8 0 amappl8 128 5407 0 5356 2 0 2 2 0 8 0 amappl7 120 1651 0 1642 1 0 1 1 0 8 0 amappl6 112 2659 0 2652 1 0 1 1 0 8 0 amappl5 104 3570 0 3555 1 0 1 1 0 8 0 amappl4 96 23285 0 23246 4 2 2 2 0 8 0 amappl3 88 4139 0 4127 1 0 1 1 0 8 0 amappl2 80 178681 0 178601 3 1 2 3 0 8 0 amappl1 72 481434 0 480966 25 15 10 20 0 8 0 amappl 80 70804 0 70762 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 144 0 15 3 0 3 3 0 8 0 uaddrrnd 24 22271 0 22254 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 22271 0 22254 1 0 1 1 0 8 0 vmmpekpl 168 167357 0 167325 2 0 2 2 0 8 0 vmmpepl 168 2694588 0 2692605 787 695 92 120 0 357 0 vmsppl 368 22270 0 22254 2 0 2 2 0 8 0 pdppl 4096 44550 0 44508 6 0 6 6 0 8 0 pvpl 32 5227456 0 5211917 881 732 149 166 0 265 14 pmappl 232 22270 0 22254 3 2 1 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 736 0 113 19 0 19 19 0 8 0