witness: thread 0xffff800020a88ee8 exiting with the following locks held: exclusive rrwlock inode r = 0 (0xfffffd8065d0c3d8) #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 0xffff800020a88ee8 cannot exit while holding sleeplocks Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 217982 90484 73 0x100010 0 1 syslogd * 29122 22237 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(ffff800020a88ee8) at witness_thread_exit+0x213 sys/kern/subr_witness.c:1364 reaper(ffff800020a5f8b8) 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 0xffff800020a88ee8 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(ffff800020a88ee8) at witness_thread_exit+0x213 sys/kern/subr_witness.c:1364 reaper(ffff800020a5f8b8) at reaper+0x14c sys/kern/kern_exit.c:423 end trace frame: 0x0, count: -4 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800020a5d440 rbx 0xffff800020a5d4f0 rdx 0xffff800020a5f8b8 rcx 0 rax 0 r8 0xffffffff8145b623 kprintf+0x173 r9 0x1 r10 0x25 r11 0x3fcba57003139fbe r12 0x3000000008 r13 0xffff800020a5d450 r14 0x100 r15 0x1 rip 0xffffffff81c821e8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020a5d430 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (reaper) pid=29122 stat=onproc flags process=14000 proc=200 pri=4, usrpri=54, nice=20 forw=0xffffffffffffffff, list=0xffff800020a11638,0xffff800020a5f3d8 process=0xffff800020a4a708 user=0xffff800020a58000, vmspace=0xffffffff8262f4c8 estcpu=4, cpticks=6, pctcpu=0.56 user=0, sys=5, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 69204 385119 11561 0 3 0x80 nanosleep syz-executor.0 69204 37946 11561 0 2 0x4000000 syz-executor.0 69204 396534 11561 0 3 0x4000080 fsleep syz-executor.0 81630 164892 1 0 3 0x100083 ttyin getty 91142 141038 55977 0 3 0x82 nanosleep syz-executor.1 11561 277804 55977 0 3 0x82 nanosleep syz-executor.0 9906 450981 0 0 3 0x14200 acct acct 9381 246697 0 0 3 0x14200 bored sosplice 55977 501458 23470 0 3 0x82 thrsleep syz-fuzzer 55977 381235 23470 0 3 0x4000082 thrsleep syz-fuzzer 55977 76182 23470 0 3 0x4000082 thrsleep syz-fuzzer 55977 18170 23470 0 3 0x4000082 kqread syz-fuzzer 55977 430867 23470 0 3 0x4000082 thrsleep syz-fuzzer 55977 28788 23470 0 3 0x4000082 thrsleep syz-fuzzer 55977 79617 23470 0 3 0x4000082 thrsleep syz-fuzzer 55977 139387 23470 0 3 0x4000082 thrsleep syz-fuzzer 55977 78272 23470 0 3 0x4000082 thrsleep syz-fuzzer 55977 359486 23470 0 3 0x4000082 thrsleep syz-fuzzer 23470 448002 17209 0 3 0x10008a pause ksh 17209 153262 96724 0 3 0x92 select sshd 96724 45571 1 0 3 0x80 select sshd 82750 142422 25175 74 3 0x100092 bpf pflogd 25175 231081 1 0 3 0x80 netio pflogd 90484 217982 30224 73 7 0x100010 syslogd 30224 111244 1 0 3 0x100082 netio syslogd 61054 75997 1 77 3 0x100090 poll dhclient 17181 3880 1 0 3 0x80 poll dhclient 74341 223289 0 0 2 0x14200 zerothread 42666 127156 0 0 3 0x14200 aiodoned aiodoned 25300 37605 0 0 3 0x14200 syncer update 44499 213700 0 0 3 0x14200 cleaner cleaner *22237 29122 0 0 7 0x14200 reaper 88799 45557 0 0 3 0x14200 pgdaemon pagedaemon 47921 502757 0 0 3 0x14200 bored crynlk 90358 270549 0 0 3 0x14200 bored crypto 49658 117439 0 0 3 0x40014200 acpi0 acpi0 18695 229697 0 0 3 0x40014200 idle1 98820 69969 0 0 3 0x14200 bored softnet 43652 152220 0 0 3 0x14200 bored systqmp 22291 404706 0 0 3 0x14200 bored systq 38166 413769 0 0 2 0x40014200 softclock 96193 314114 0 0 3 0x40014200 idle0 20938 142201 0 0 3 0x14200 bored smr 1 131101 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 90484 (syslogd) thread 0xffff800020ac1158 (217982) exclusive rrwlock inode r = 0 (0xfffffd806ec96c48) #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{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9507 6406K 6979K 78643K 12063 0 0 pcb 13 8K 8K 78643K 57 0 0 rtable 108 4K 4K 78643K 359 0 0 ifaddr 53 12K 13K 78643K 99 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1492 0 0 iov 0 0K 16K 78643K 55 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1216 76K 77K 78643K 1797 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 7 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 43 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 5 13K 25K 78643K 631 0 0 sigio 0 0K 0K 78643K 8 0 0 proc 53 50K 83K 78643K 575 0 0 subproc 32 2K 2K 78643K 68 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 39 0 0 in_multi 33 2K 2K 78643K 64 0 0 ether_multi 1 0K 0K 78643K 1 0 0 mrt 0 0K 0K 78643K 4 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 78 344K 344K 78643K 78 0 0 exec 0 0K 1K 78643K 296 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 97 21K 27K 78643K 3061 0 0 UVM aobj 27 2K 3K 78643K 31 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 34 0 0 NDP 10 0K 0K 78643K 28 0 0 temp 157 3539K 3605K 78643K 7554 0 0 kqueue 0 0K 0K 78643K 7 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 10 0 4 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 49 0 47 1 0 1 1 0 8 0 rtentry 112 69 0 25 2 0 2 2 0 8 0 unpcb 120 197 0 187 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 7419 0 7419 1 1 0 1 0 8 0 tcpcb 544 80 0 76 1 0 1 1 0 8 0 inpcb 280 277 0 269 1 0 1 1 0 8 0 rttmr 72 2 0 2 1 1 0 1 0 8 0 nd6 48 12 0 6 1 0 1 1 0 8 0 pkpcb 40 4 0 4 2 2 0 1 0 8 0 ppxss 1128 7 0 7 3 3 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 26 0 16 1 0 1 1 0 8 0 pfstkey 112 26 0 16 1 0 1 1 0 8 0 pfstate 328 26 0 16 2 0 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 308 0 120 14 2 12 12 0 8 0 art_table 32 309 0 120 2 0 2 2 0 8 0 art_node 16 68 0 28 1 0 1 1 0 8 0 sysvmsgpl 40 20 0 15 1 0 1 1 0 8 0 semupl 112 2 0 2 2 2 0 1 0 8 0 semapl 112 41 0 31 1 0 1 1 0 8 0 shmpl 112 29 0 4 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2372 0 943 47 0 47 47 0 8 0 ffsino 272 2372 0 943 96 0 96 96 0 8 0 nchpl 144 3471 0 1841 62 0 62 62 0 8 0 uvmvnodes 72 2826 0 0 52 0 52 52 0 8 0 vnodes 200 2826 0 0 149 0 149 149 0 8 0 namei 1024 10302 0 10302 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 2 0 2 1 1 0 1 0 8 0 scxspl 192 9894 0 9894 13 12 1 7 0 8 1 plimitpl 152 70 0 62 1 0 1 1 0 8 0 sigapl 432 828 0 813 4 2 2 3 0 8 0 futexpl 56 7077 0 7076 1 0 1 1 0 8 0 knotepl 112 186 0 167 1 0 1 1 0 8 0 kqueuepl 104 134 0 132 1 0 1 1 0 8 0 pipepl 112 492 0 473 1 0 1 1 0 8 0 fdescpl 488 829 0 813 3 0 3 3 0 8 0 filepl 152 4644 0 4544 6 1 5 5 0 8 1 lockfpl 104 264 0 264 2 1 1 1 0 8 1 lockfspl 48 96 0 96 2 1 1 1 0 8 1 sessionpl 112 23 0 12 1 0 1 1 0 8 0 pgrppl 48 25 0 14 1 0 1 1 0 8 0 ucredpl 96 701 0 692 1 0 1 1 0 8 0 zombiepl 144 815 0 814 2 1 1 1 0 8 0 processpl 896 848 0 814 5 1 4 5 0 8 0 procpl 632 2162 0 2117 5 0 5 5 0 8 1 srpgc 64 6 0 6 1 1 0 1 0 8 0 sosppl 128 8 0 8 3 3 0 1 0 8 0 sockpl 384 535 0 515 4 1 3 3 0 8 1 mcl64k 65536 3 0 0 1 0 1 1 0 8 0 mcl16k 16384 1 0 0 1 0 1 1 0 8 0 mcl12k 12288 4 0 0 1 0 1 1 0 8 0 mcl9k 9216 2 0 0 1 0 1 1 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 5 0 0 1 0 1 1 0 8 0 mcl2k2 2112 1 0 0 1 0 1 1 0 8 0 mcl2k 2048 182 0 0 20 0 20 20 0 8 0 mtagpl 80 15 0 0 1 0 1 1 0 8 0 mbufpl 256 196 0 0 12 0 12 12 0 8 0 bufpl 256 7192 0 1175 377 0 377 377 0 8 0 anonpl 16 98065 0 86097 80 15 65 66 0 124 15 amapchunkpl 152 4914 0 4801 14 6 8 8 0 158 3 amappl16 192 4541 0 3874 65 23 42 46 0 8 8 amappl15 184 8 0 8 1 1 0 1 0 8 0 amappl14 176 64 0 58 1 0 1 1 0 8 0 amappl13 168 120 0 118 2 1 1 1 0 8 0 amappl12 160 146 0 142 1 0 1 1 0 8 0 amappl11 152 66 0 50 1 0 1 1 0 8 0 amappl10 144 243 0 240 1 0 1 1 0 8 0 amappl9 136 625 0 622 1 0 1 1 0 8 0 amappl8 128 177 0 159 1 0 1 1 0 8 0 amappl7 120 211 0 206 1 0 1 1 0 8 0 amappl6 112 68 0 62 1 0 1 1 0 8 0 amappl5 104 276 0 259 1 0 1 1 0 8 0 amappl4 96 985 0 950 2 1 1 2 0 8 0 amappl3 88 331 0 320 1 0 1 1 0 8 0 amappl2 80 5706 0 5623 3 1 2 3 0 8 0 amappl1 72 27959 0 27493 25 15 10 20 0 8 0 amappl 80 2467 0 2426 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 30 0 4 1 0 1 1 0 8 0 uaddrrnd 24 829 0 812 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 829 0 812 1 0 1 1 0 8 0 vmmpekpl 168 10648 0 10615 2 0 2 2 0 8 0 vmmpepl 168 107509 0 105590 144 50 94 103 0 357 10 vmsppl 368 828 0 812 2 0 2 2 0 8 0 pdppl 4096 1665 0 1624 7 1 6 6 0 8 0 pvpl 32 282467 0 267243 198 39 159 161 0 265 34 pmappl 232 828 0 812 3 2 1 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 543 0 7 16 0 16 16 0 8 0