witness: thread 0xffff800020b50290 exiting with the following locks held: exclusive rrwlock inode r = 0 (0xfffffd8067c46a38) #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 0xffff800020b50290 cannot exit while holding sleeplocks Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 97564 22353 73 0x100010 0 0 syslogd *338423 84924 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(ffff800020b50290) 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{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic thread 0xffff800020b50290 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(ffff800020b50290) 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{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800020afcfe0 rbx 0xffff800020afd090 rdx 0xffff800020affb30 rcx 0 rax 0 r8 0xffffffff817eab83 kprintf+0x173 r9 0x1 r10 0x25 r11 0xa9924398656b06c4 r12 0x3000000008 r13 0xffff800020afcff0 r14 0x100 r15 0x1 rip 0xffffffff81ee4248 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020afcfd0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (reaper) pid=338423 stat=onproc flags process=14000 proc=200 pri=4, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff800020ab18b0,0xffff800020aff8c8 process=0xffff800020aea008 user=0xffff800020af8000, vmspace=0xffffffff823b0ae0 estcpu=1, cpticks=8, pctcpu=0.93 user=0, sys=5, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 3059 343639 33645 0 3 0x82 nanosleep syz-executor.0 68152 252439 33645 0 3 0x82 nanosleep syz-executor.1 91485 190166 1 0 3 0x100083 ttyin getty 23319 338378 0 0 3 0x14200 acct acct 50947 462756 0 0 3 0x14200 bored sosplice 33645 87436 70187 0 3 0x82 thrsleep syz-fuzzer 33645 114988 70187 0 3 0x4000082 thrsleep syz-fuzzer 33645 136064 70187 0 3 0x4000082 thrsleep syz-fuzzer 33645 473110 70187 0 3 0x4000082 thrsleep syz-fuzzer 33645 89352 70187 0 3 0x4000082 thrsleep syz-fuzzer 33645 459613 70187 0 3 0x4000082 kqread syz-fuzzer 33645 330171 70187 0 3 0x4000082 thrsleep syz-fuzzer 33645 108010 70187 0 3 0x4000082 thrsleep syz-fuzzer 33645 61479 70187 0 3 0x4000082 thrsleep syz-fuzzer 33645 276653 70187 0 3 0x4000082 thrsleep syz-fuzzer 70187 242862 73504 0 3 0x10008a pause ksh 73504 360608 34475 0 3 0x92 select sshd 34475 460335 1 0 3 0x80 select sshd 21865 409434 85119 74 3 0x100092 bpf pflogd 85119 59955 1 0 3 0x80 netio pflogd 22353 97564 12146 73 7 0x100010 syslogd 12146 30866 1 0 3 0x100082 netio syslogd 16661 174334 1 77 3 0x100090 poll dhclient 97394 10094 1 0 3 0x80 poll dhclient 2304 380892 0 0 3 0x14200 pgzero zerothread 90503 478380 0 0 3 0x14200 aiodoned aiodoned 50008 138439 0 0 3 0x14200 syncer update 83821 133665 0 0 3 0x14200 cleaner cleaner *84924 338423 0 0 7 0x14200 reaper 71876 79493 0 0 3 0x14200 pgdaemon pagedaemon 42395 63201 0 0 3 0x14200 bored crynlk 90434 170139 0 0 3 0x14200 bored crypto 99496 254992 0 0 3 0x40014200 acpi0 acpi0 25386 166947 0 0 3 0x40014200 idle1 22381 33232 0 0 3 0x14200 bored softnet 38176 121354 0 0 3 0x14200 bored systqmp 3988 311575 0 0 3 0x14200 bored systq 98489 468638 0 0 3 0x40014200 bored softclock 27935 157275 0 0 3 0x40014200 idle0 75696 159511 0 0 3 0x14200 bored smr 1 199563 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 22353 (syslogd) thread 0xffff800020b60288 (97564) exclusive rrwlock inode r = 0 (0xfffffd806eb9bd58) #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 9582 6697K 7707K 78643K 18064 0 0 pcb 13 8K 8K 78643K 219 0 0 rtable 108 4K 4K 78643K 1066 0 0 ifaddr 72 16K 16K 78643K 350 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1660 0 0 iov 0 0K 32K 78643K 369 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1207 76K 77K 78643K 3880 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 51 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 312 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 4 9K 25K 78643K 2952 0 0 sigio 0 0K 0K 78643K 50 0 0 proc 55 51K 83K 78643K 1101 0 0 subproc 32 2K 2K 78643K 208 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 220 0 0 in_multi 33 2K 2K 78643K 212 0 0 ether_multi 1 0K 0K 78643K 15 0 0 mrt 0 0K 0K 78643K 19 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 541 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 99 21K 26K 78643K 10626 0 0 UVM aobj 130 4K 4K 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 0K 78643K 109 0 0 NDP 18 0K 0K 78643K 106 0 0 temp 200 2752K 3393K 78643K 44373 0 0 kqueue 0 0K 0K 78643K 25 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 26 0 20 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 153 0 151 1 0 1 1 0 8 0 rtentry 112 161 0 117 2 0 2 2 0 8 0 unpcb 120 936 0 926 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 9093 0 9093 1 1 0 1 0 8 0 tcpcb 544 437 0 433 1 0 1 1 0 8 0 inpcb 280 1378 0 1371 2 1 1 2 0 8 0 rttmr 72 2 0 2 1 1 0 1 0 8 0 nd6 48 36 0 30 1 0 1 1 0 8 0 pkpcb 40 14 0 14 6 5 1 1 0 8 1 ppxss 1128 45 0 45 8 8 0 1 0 8 0 pffrag 232 4 0 4 2 2 0 1 0 482 0 pffrnode 88 4 0 4 2 2 0 1 0 8 0 pffrent 40 10 0 10 2 2 0 1 0 8 0 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 71 0 55 1 0 1 1 0 8 0 pfstkey 112 71 0 55 1 0 1 1 0 8 0 pfstate 328 71 0 55 3 1 2 2 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 672 0 477 17 4 13 14 0 8 0 art_table 32 673 0 477 2 0 2 2 0 8 0 art_node 16 156 0 116 1 0 1 1 0 8 0 sysvmsgpl 40 10 0 4 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 310 0 300 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 5851 0 4431 47 0 47 47 0 8 0 ffsino 272 5851 0 4431 96 0 96 96 0 8 0 nchpl 144 10197 0 8556 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 32966 0 32966 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 4 0 4 4 4 0 1 0 8 0 scxspl 192 33201 0 33201 26 25 1 6 0 8 1 plimitpl 152 264 0 256 1 0 1 1 0 8 0 sigapl 432 3125 0 3111 3 1 2 3 0 8 0 futexpl 56 35180 0 35180 1 0 1 1 0 8 1 knotepl 112 730 0 711 1 0 1 1 0 8 0 kqueuepl 104 654 0 652 1 0 1 1 0 8 0 pipepl 112 1724 0 1705 2 1 1 2 0 8 0 fdescpl 488 3126 0 3111 3 0 3 3 0 8 0 filepl 152 18373 0 18274 9 4 5 7 0 8 0 lockfpl 104 1110 0 1110 2 1 1 1 0 8 1 lockfspl 48 393 0 393 2 1 1 1 0 8 1 sessionpl 112 31 0 20 1 0 1 1 0 8 0 pgrppl 48 81 0 70 1 0 1 1 0 8 0 ucredpl 96 3465 0 3456 1 0 1 1 0 8 0 zombiepl 144 3111 0 3109 2 1 1 1 0 8 0 processpl 896 3143 0 3109 4 0 4 4 0 8 0 procpl 632 9297 0 9253 6 1 5 5 0 8 1 srpgc 64 22 0 22 10 9 1 1 0 8 1 sosppl 128 28 0 28 9 8 1 1 0 8 1 sockpl 384 2510 0 2491 5 2 3 4 0 8 1 mcl64k 65536 15 0 0 2 0 2 2 0 8 0 mcl16k 16384 9 0 0 2 0 2 2 0 8 0 mcl12k 12288 17 0 0 2 0 2 2 0 8 0 mcl9k 9216 10 0 0 1 0 1 1 0 8 0 mcl8k 8192 9 0 0 2 0 2 2 0 8 0 mcl4k 4096 17 0 0 3 0 3 3 0 8 0 mcl2k2 2112 5 0 0 1 0 1 1 0 8 0 mcl2k 2048 173 0 0 21 1 20 21 0 8 1 mtagpl 80 21 0 0 1 0 1 1 0 8 0 mbufpl 256 292 0 0 13 1 12 12 0 8 0 bufpl 256 16176 0 9147 440 0 440 440 0 8 0 anonpl 16 297949 0 288157 127 75 52 66 0 125 0 amapchunkpl 152 19098 0 18990 27 20 7 10 0 158 1 amappl16 192 14863 0 14167 100 64 36 47 0 8 1 amappl15 184 599 0 598 1 0 1 1 0 8 0 amappl14 176 451 0 447 1 0 1 1 0 8 0 amappl13 168 303 0 302 1 0 1 1 0 8 0 amappl12 160 121 0 119 2 1 1 1 0 8 0 amappl11 152 620 0 605 1 0 1 1 0 8 0 amappl10 144 1038 0 1030 1 0 1 1 0 8 0 amappl9 136 1081 0 1078 1 0 1 1 0 8 0 amappl8 128 606 0 584 1 0 1 1 0 8 0 amappl7 120 1017 0 1006 1 0 1 1 0 8 0 amappl6 112 580 0 571 1 0 1 1 0 8 0 amappl5 104 319 0 304 1 0 1 1 0 8 0 amappl4 96 3382 0 3347 2 1 1 2 0 8 0 amappl3 88 956 0 946 1 0 1 1 0 8 0 amappl2 80 23673 0 23594 3 1 2 3 0 8 0 amappl1 72 77003 0 76562 24 14 10 19 0 8 0 amappl 80 9745 0 9707 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 3126 0 3109 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 3126 0 3109 1 0 1 1 0 8 0 vmmpekpl 168 26687 0 26654 2 0 2 2 0 8 0 vmmpepl 168 386701 0 384779 232 128 104 104 0 357 20 vmsppl 368 3125 0 3109 2 0 2 2 0 8 0 pdppl 4096 6259 0 6218 7 1 6 6 0 8 0 pvpl 32 833511 0 820419 273 138 135 163 0 265 4 pmappl 232 3125 0 3109 2 1 1 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 616 0 11 18 0 18 18 0 8 0