witness: thread 0xffff800020b28018 exiting with the following locks held: exclusive rrwlock inode r = 0 (0xfffffd8064cd2b48) #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 0xffff800020b28018 cannot exit while holding sleeplocks Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 504647 5497 73 0x100010 0 0 syslogd *110335 3593 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(ffff800020b28018) at witness_thread_exit+0x213 sys/kern/subr_witness.c:1364 reaper(ffff800020aff640) 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 0xffff800020b28018 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(ffff800020b28018) at witness_thread_exit+0x213 sys/kern/subr_witness.c:1364 reaper(ffff800020aff640) at reaper+0x14c sys/kern/kern_exit.c:423 end trace frame: 0x0, count: -4 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800020afd6d0 rbx 0xffff800020afd780 rdx 0xffff800020aff640 rcx 0 rax 0 r8 0xffffffff815a9073 kprintf+0x173 r9 0x1 r10 0x25 r11 0x4d52a163f5ce668d r12 0x3000000008 r13 0xffff800020afd6e0 r14 0x100 r15 0x1 rip 0xffffffff81e595e8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020afd6c0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (reaper) pid=110335 stat=onproc flags process=14000 proc=200 pri=4, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff800020ab1b28,0xffff800020aff160 process=0xffff800020aea388 user=0xffff800020af8000, vmspace=0xffffffff8236a918 estcpu=1, cpticks=4, pctcpu=0.63 user=0, sys=4, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 59760 389720 87107 0 3 0x82 nanosleep syz-executor.1 53973 266274 1 0 3 0x100083 ttyin getty 81926 309256 87107 0 3 0x82 nanosleep syz-executor.0 30253 387682 0 0 3 0x14200 acct acct 46827 387686 0 0 3 0x14200 bored sosplice 87107 158475 88475 0 3 0x82 thrsleep syz-fuzzer 87107 510080 88475 0 3 0x4000082 thrsleep syz-fuzzer 87107 253432 88475 0 3 0x4000082 kqread syz-fuzzer 87107 280794 88475 0 3 0x4000082 thrsleep syz-fuzzer 87107 75992 88475 0 3 0x4000082 thrsleep syz-fuzzer 87107 490831 88475 0 3 0x4000082 thrsleep syz-fuzzer 87107 442286 88475 0 3 0x4000082 thrsleep syz-fuzzer 87107 211078 88475 0 3 0x4000082 thrsleep syz-fuzzer 87107 17055 88475 0 3 0x4000082 thrsleep syz-fuzzer 87107 239804 88475 0 3 0x4000082 thrsleep syz-fuzzer 88475 130803 79725 0 3 0x10008a pause ksh 79725 102881 1087 0 3 0x92 select sshd 1087 398650 1 0 3 0x80 select sshd 1161 294396 20698 74 3 0x100092 bpf pflogd 20698 438491 1 0 3 0x80 netio pflogd 5497 504647 60817 73 7 0x100010 syslogd 60817 103563 1 0 3 0x100082 netio syslogd 67168 367032 1 77 3 0x100090 poll dhclient 29508 383285 1 0 3 0x80 poll dhclient 86650 365486 0 0 3 0x14200 pgzero zerothread 63139 291272 0 0 3 0x14200 aiodoned aiodoned 52954 250872 0 0 3 0x14200 syncer update 1924 431016 0 0 3 0x14200 cleaner cleaner * 3593 110335 0 0 7 0x14200 reaper 59606 410825 0 0 3 0x14200 pgdaemon pagedaemon 47052 495328 0 0 3 0x14200 bored crynlk 27097 281290 0 0 3 0x14200 bored crypto 50239 78115 0 0 3 0x40014200 acpi0 acpi0 49066 257898 0 0 3 0x40014200 idle1 85342 453023 0 0 3 0x14200 bored softnet 176 467687 0 0 3 0x14200 bored systqmp 72291 374263 0 0 3 0x14200 bored systq 34911 151958 0 0 3 0x40014200 bored softclock 45732 395855 0 0 3 0x40014200 idle0 38715 118678 0 0 3 0x14200 bored smr 1 144287 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 5497 (syslogd) thread 0xffff800020b60500 (504647) exclusive rrwlock inode r = 0 (0xfffffd807b83cd58) #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 9590 6712K 14641K 78643K 17282 0 0 pcb 13 8K 8K 78643K 197 0 0 rtable 113 4K 5K 78643K 1014 0 0 ifaddr 73 16K 16K 78643K 360 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1612 0 0 iov 0 0K 32K 78643K 281 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1213 76K 77K 78643K 3645 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 33 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 1K 78643K 289 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 4 9K 25K 78643K 2625 0 0 sigio 0 0K 0K 78643K 27 0 0 proc 54 51K 83K 78643K 976 0 0 subproc 32 2K 2K 78643K 157 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 254 0 0 in_multi 33 2K 2K 78643K 196 0 0 ether_multi 1 0K 0K 78643K 13 0 0 mrt 0 0K 0K 78643K 17 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 84 371K 371K 78643K 84 0 0 exec 0 0K 1K 78643K 507 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 101 21K 30K 78643K 9515 0 0 UVM aobj 93 3K 3K 78643K 116 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 0K 78643K 120 0 0 NDP 17 0K 0K 78643K 108 0 0 temp 207 2752K 3392K 78643K 37992 0 0 kqueue 0 0K 0K 78643K 24 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 22 0 15 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 138 0 136 1 0 1 1 0 8 0 rtentry 112 128 0 83 2 0 2 2 0 8 0 unpcb 120 895 0 885 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 7883 0 7883 1 1 0 1 0 8 0 tcpcb 544 428 0 424 1 0 1 1 0 8 0 inpcb 280 1256 0 1245 5 3 2 2 0 8 1 rttmr 72 4 0 4 3 3 0 1 0 8 0 nd6 48 27 0 21 1 0 1 1 0 8 0 pkpcb 40 8 0 8 2 2 0 1 0 8 0 swfcl 56 1 0 0 1 0 1 1 0 8 0 ppxss 1128 51 0 51 5 4 1 1 0 8 1 pffrag 232 5 0 5 3 3 0 1 0 482 0 pffrnode 88 5 0 5 3 3 0 1 0 8 0 pffrent 40 18 0 18 4 3 1 1 0 8 1 pfosfp 40 846 0 423 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfstitem 24 76 0 49 1 0 1 1 0 8 0 pfstkey 112 76 0 49 1 0 1 1 0 8 0 pfstate 328 76 0 49 3 0 3 3 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 514 0 318 14 1 13 13 0 8 0 art_table 32 515 0 318 2 0 2 2 0 8 0 art_node 16 127 0 86 1 0 1 1 0 8 0 sysvmsgpl 40 16 0 8 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 285 0 275 1 0 1 1 0 8 0 shmpl 112 114 0 23 3 0 3 3 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 5553 0 4136 47 0 47 47 0 8 0 ffsino 272 5553 0 4136 96 0 96 96 0 8 0 nchpl 144 9355 0 7723 62 0 62 62 0 8 0 uvmvnodes 72 5926 0 0 108 0 108 108 0 8 0 vnodes 200 5926 0 0 312 0 312 312 0 8 0 namei 1024 29959 0 29959 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 6 0 6 4 4 0 1 0 8 0 scxspl 192 30258 0 30258 15 14 1 6 0 8 1 plimitpl 152 271 0 263 1 0 1 1 0 8 0 sigapl 432 2807 0 2793 3 1 2 3 0 8 0 futexpl 56 31813 0 31813 1 0 1 1 0 8 1 knotepl 112 547 0 528 1 0 1 1 0 8 0 kqueuepl 104 486 0 484 1 0 1 1 0 8 0 pipepl 112 1768 0 1749 6 4 2 2 0 8 1 fdescpl 488 2808 0 2793 5 2 3 3 0 8 0 filepl 152 16684 0 16585 7 2 5 6 0 8 1 lockfpl 104 962 0 962 2 1 1 1 0 8 1 lockfspl 48 314 0 314 2 1 1 1 0 8 1 sessionpl 112 28 0 17 1 0 1 1 0 8 0 pgrppl 48 53 0 42 1 0 1 1 0 8 0 ucredpl 96 3043 0 3034 1 0 1 1 0 8 0 zombiepl 144 2793 0 2791 3 2 1 1 0 8 0 processpl 896 2825 0 2791 4 0 4 4 0 8 0 procpl 632 8349 0 8305 5 0 5 5 0 8 1 srpgc 64 18 0 18 8 8 0 1 0 8 0 sosppl 128 42 0 42 7 6 1 1 0 8 1 sockpl 384 2324 0 2305 4 1 3 3 0 8 1 mcl64k 65536 13 0 0 2 0 2 2 0 8 0 mcl16k 16384 6 0 0 1 0 1 1 0 8 0 mcl12k 12288 25 0 0 2 0 2 2 0 8 0 mcl9k 9216 8 0 0 1 0 1 1 0 8 0 mcl8k 8192 10 0 0 2 0 2 2 0 8 0 mcl4k 4096 17 0 0 3 0 3 3 0 8 0 mcl2k2 2112 7 0 0 1 0 1 1 0 8 0 mcl2k 2048 148 0 0 18 2 16 18 0 8 0 mtagpl 80 30 0 0 1 0 1 1 0 8 0 mbufpl 256 262 0 0 11 0 11 11 0 8 0 bufpl 256 12248 0 5219 440 0 440 440 0 8 0 anonpl 16 299018 0 287090 115 55 60 65 0 125 8 amapchunkpl 152 16586 0 16476 27 17 10 10 0 158 4 amappl16 192 15663 0 14998 115 78 37 46 0 8 3 amappl15 184 285 0 282 1 0 1 1 0 8 0 amappl14 176 546 0 542 1 0 1 1 0 8 0 amappl13 168 295 0 295 2 2 0 1 0 8 0 amappl12 160 16 0 12 1 0 1 1 0 8 0 amappl11 152 895 0 877 1 0 1 1 0 8 0 amappl10 144 279 0 275 1 0 1 1 0 8 0 amappl9 136 827 0 824 1 0 1 1 0 8 0 amappl8 128 381 0 356 1 0 1 1 0 8 0 amappl7 120 261 0 252 1 0 1 1 0 8 0 amappl6 112 888 0 876 1 0 1 1 0 8 0 amappl5 104 209 0 194 1 0 1 1 0 8 0 amappl4 96 2919 0 2887 2 1 1 2 0 8 0 amappl3 88 905 0 894 1 0 1 1 0 8 0 amappl2 80 21489 0 21408 4 2 2 3 0 8 0 amappl1 72 70743 0 70287 26 16 10 20 0 8 0 amappl 80 8734 0 8695 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 115 0 23 2 0 2 2 0 8 0 uaddrrnd 24 2808 0 2791 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2808 0 2791 1 0 1 1 0 8 0 vmmpekpl 168 23219 0 23181 2 0 2 2 0 8 0 vmmpepl 168 353070 0 351164 200 102 98 102 0 357 14 vmsppl 368 2807 0 2791 2 0 2 2 0 8 0 pdppl 4096 5624 0 5582 8 2 6 6 0 8 0 pvpl 32 811956 0 796726 259 100 159 165 0 265 29 pmappl 232 2807 0 2791 2 1 1 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 608 0 9 18 0 18 18 0 8 0