witness: thread 0xffff800020a88a00 exiting with the following locks held: exclusive rrwlock inode r = 0 (0xfffffd807bd43810) #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 spec_write+0xec sys/kern/spec_vnops.c:312 #6 VOP_WRITE+0xce sys/kern/vfs_vops.c:268 #7 vn_write+0x1be sys/kern/vfs_vnops.c:405 #8 dofilewritev+0x1ac sys/kern/sys_generic.c:364 #9 sys_write+0x83 sys/kern/sys_generic.c:284 #10 syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] #10 syscall+0x552 sys/arch/amd64/amd64/trap.c:555 #11 Xsyscall+0x128 panic: thread 0xffff800020a88a00 cannot exit while holding sleeplocks Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 450130 61976 73 0x100010 0 1 syslogd *305236 20540 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(ffff800020a88a00) at witness_thread_exit+0x213 sys/kern/subr_witness.c:1364 reaper(ffff800020a5f640) 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}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic thread 0xffff800020a88a00 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(ffff800020a88a00) at witness_thread_exit+0x213 sys/kern/subr_witness.c:1364 reaper(ffff800020a5f640) at reaper+0x14c sys/kern/kern_exit.c:423 end trace frame: 0x0, count: -4 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800020a5d490 rbx 0xffff800020a5d540 rdx 0xffff800020a5f640 rcx 0 rax 0 r8 0xffffffff81254693 kprintf+0x173 r9 0x1 r10 0x25 r11 0x107345f15fe3bed0 r12 0x3000000008 r13 0xffff800020a5d4a0 r14 0x100 r15 0x1 rip 0xffffffff819fbe58 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020a5d480 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (reaper) pid=305236 stat=onproc flags process=14000 proc=200 pri=4, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800020a11638,0xffff800020a5f160 process=0xffff800020a4aa88 user=0xffff800020a58000, vmspace=0xffffffff8264ea98 estcpu=0, cpticks=6, pctcpu=0.47 user=0, sys=5, intr=1 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 44989 172971 89923 32767 3 0x90 piperd syz-executor.1 89923 211773 21692 0 3 0x82 wait syz-executor.1 83752 165789 5019 32767 2 0x490 syz-executor.0 5019 269764 21692 0 3 0x82 wait syz-executor.0 67340 341826 0 0 3 0x14200 bored sosplice 21692 473576 64347 0 3 0x82 thrsleep syz-fuzzer 21692 95062 64347 0 3 0x4000082 thrsleep syz-fuzzer 21692 441722 64347 0 3 0x4000082 thrsleep syz-fuzzer 21692 385277 64347 0 3 0x4000082 thrsleep syz-fuzzer 21692 396616 64347 0 3 0x4000082 thrsleep syz-fuzzer 21692 52806 64347 0 3 0x4000082 kqread syz-fuzzer 21692 348714 64347 0 3 0x4000082 thrsleep syz-fuzzer 21692 156996 64347 0 3 0x4000082 thrsleep syz-fuzzer 21692 216224 64347 0 3 0x4000082 thrsleep syz-fuzzer 21692 364628 64347 0 3 0x4000082 thrsleep syz-fuzzer 64347 47955 96787 0 3 0x10008a pause ksh 96787 260924 81202 0 3 0x92 select sshd 61132 5673 1 0 2 0x100083 getty 81202 497564 1 0 3 0x80 select sshd 61976 450130 79826 73 7 0x100010 syslogd 79826 406166 1 0 3 0x100082 netio syslogd 74138 234131 1 77 3 0x100090 poll dhclient 71715 299439 1 0 3 0x80 poll dhclient 78322 347853 0 0 3 0x14200 pgzero zerothread 14994 51934 0 0 3 0x14200 aiodoned aiodoned 94737 116667 0 0 3 0x14200 syncer update 66569 353501 0 0 3 0x14200 cleaner cleaner *20540 305236 0 0 7 0x14200 reaper 79864 273902 0 0 3 0x14200 pgdaemon pagedaemon 55445 282232 0 0 3 0x14200 bored crynlk 46091 60468 0 0 3 0x14200 bored crypto 78820 114050 0 0 3 0x40014200 acpi0 acpi0 78941 251194 0 0 3 0x40014200 idle1 23885 48386 0 0 3 0x14200 bored softnet 52463 468281 0 0 3 0x14200 bored systqmp 51629 355374 0 0 3 0x14200 bored systq 17275 319339 0 0 2 0x40014200 softclock 41466 373008 0 0 3 0x40014200 idle0 80892 25424 0 0 3 0x14200 bored smr 1 197292 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 61976 (syslogd) thread 0xffff800020ac0778 (450130) exclusive rrwlock inode r = 0 (0xfffffd806ec65918) #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 9463 6322K 6322K 78643K 11510 0 0 pcb 13 8K 8K 78643K 13 0 0 rtable 105 3K 3K 78643K 8820 0 0 ifaddr 36 14K 15K 78643K 1209 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 516 0 0 iov 0 0K 28K 78643K 827 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1215 76K 76K 78643K 5903 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 130 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 1038 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 6 17K 33K 78643K 10647 0 0 sigio 0 0K 0K 78643K 150 0 0 proc 41 38K 70K 78643K 9187 0 0 subproc 34 2K 2K 78643K 3298 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 1170 0 0 in_multi 33 2K 2K 78643K 2434 0 0 ether_multi 1 0K 0K 78643K 63 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 66 291K 291K 78643K 66 0 0 exec 0 0K 1K 78643K 3412 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 122 22K 31K 78643K 35664 0 0 UVM aobj 130 6K 6K 78643K 146 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 631 0 0 NDP 5 0K 0K 78643K 585 0 0 temp 121 3554K 3650K 78643K 47523 0 0 kqueue 0 0K 0K 78643K 148 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 393 0 387 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 854 0 852 1 0 1 1 0 8 0 rtentry 112 2160 0 2116 2 0 2 2 0 8 0 unpcb 120 4253 0 4245 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 4942 0 4942 1 1 0 1 0 8 0 tcpcb 544 2365 0 2361 1 0 1 1 0 8 0 ipq 40 21 0 21 10 10 0 1 0 8 0 ipqe 40 60 0 60 10 10 0 1 0 8 0 inpcb 280 5928 0 5919 12 11 1 2 0 8 0 nd6 48 582 0 576 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 8823 0 8632 24 12 12 13 0 8 0 art_table 32 8824 0 8632 2 0 2 2 0 8 0 art_node 16 2159 0 2119 1 0 1 1 0 8 0 sysvmsgpl 40 17 0 11 1 0 1 1 0 8 0 semapl 112 1036 0 1026 1 0 1 1 0 8 0 shmpl 112 144 0 16 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 12102 0 10642 50 2 48 48 0 8 0 ffsino 272 12102 0 10642 98 0 98 98 0 8 0 nchpl 144 24648 0 23017 61 0 61 61 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 103050 0 103050 5 4 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 70861 0 70861 39 38 1 6 0 8 1 plimitpl 152 1865 0 1856 1 0 1 1 0 8 0 sigapl 432 10242 0 10228 7 5 2 3 0 8 0 futexpl 56 98367 0 98367 3 2 1 1 0 8 1 knotepl 112 6091 0 6072 1 0 1 1 0 8 0 kqueuepl 104 2351 0 2349 1 0 1 1 0 8 0 pipepl 112 6912 0 6893 18 17 1 2 0 8 0 fdescpl 488 10243 0 10228 3 0 3 3 0 8 1 filepl 152 62609 0 62513 23 18 5 7 0 8 1 lockfpl 104 1993 0 1993 12 11 1 1 0 8 1 lockfspl 48 636 0 636 12 11 1 1 0 8 1 sessionpl 112 209 0 199 1 0 1 1 0 8 0 pgrppl 48 320 0 310 1 0 1 1 0 8 0 ucredpl 96 16807 0 16798 1 0 1 1 0 8 0 zombiepl 144 10228 0 10227 4 3 1 1 0 8 0 processpl 896 10259 0 10227 4 0 4 4 0 8 0 procpl 632 26898 0 26856 33 28 5 5 0 8 1 srpgc 64 384 0 384 28 27 1 1 0 8 1 sosppl 128 234 0 234 41 41 0 1 0 8 0 sockpl 384 11214 0 11197 10 7 3 4 0 8 1 mcl64k 65536 22 0 0 3 0 3 3 0 8 0 mcl16k 16384 18 0 0 3 0 3 3 0 8 0 mcl12k 12288 17 0 0 2 0 2 2 0 8 0 mcl9k 9216 28 0 0 2 1 1 2 0 8 0 mcl8k 8192 19 0 0 3 1 2 3 0 8 0 mcl4k 4096 17 0 0 3 0 3 3 0 8 0 mcl2k2 2112 15 0 0 1 0 1 1 0 8 0 mcl2k 2048 192 0 0 21 5 16 21 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 708 0 0 14 0 14 14 0 8 0 bufpl 256 21874 0 14860 439 0 439 439 0 8 0 anonpl 16 1053353 0 1046298 232 188 44 47 0 124 2 amapchunkpl 152 80510 0 80417 122 114 8 18 0 158 3 amappl16 192 45139 0 44757 256 228 28 32 0 8 4 amappl15 184 1247 0 1247 22 22 0 1 0 8 0 amappl14 176 2372 0 2361 1 0 1 1 0 8 0 amappl13 168 2071 0 2071 20 20 0 1 0 8 0 amappl12 160 1592 0 1587 1 0 1 1 0 8 0 amappl11 152 1521 0 1510 1 0 1 1 0 8 0 amappl10 144 1679 0 1673 1 0 1 1 0 8 0 amappl9 136 3787 0 3784 1 0 1 1 0 8 0 amappl8 128 2654 0 2600 2 0 2 2 0 8 0 amappl7 120 1828 0 1819 1 0 1 1 0 8 0 amappl6 112 1054 0 1041 1 0 1 1 0 8 0 amappl5 104 2897 0 2884 1 0 1 1 0 8 0 amappl4 96 9780 0 9749 2 1 1 2 0 8 0 amappl3 88 3046 0 3033 1 0 1 1 0 8 0 amappl2 80 66784 0 66713 3 1 2 3 0 8 0 amappl1 72 281925 0 281473 23 13 10 19 0 8 0 amappl 80 30121 0 30082 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 145 0 16 3 0 3 3 0 8 0 uaddrrnd 24 10243 0 10227 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 10243 0 10227 1 0 1 1 0 8 0 vmmpekpl 168 87514 0 87479 2 0 2 2 0 8 0 vmmpepl 168 1312177 0 1310534 317 230 87 96 0 357 9 vmsppl 368 10242 0 10227 2 0 2 2 0 8 0 pdppl 4096 20493 0 20454 6 0 6 6 0 8 1 pvpl 32 2920084 0 2909785 552 435 117 126 0 265 17 pmappl 232 10242 0 10227 17 15 2 2 0 8 1 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 628 0 24 18 0 18 18 0 8 0