witness: thread 0xffff800020a88780 exiting with the following locks held: exclusive rrwlock inode r = 0 (0xfffffd807d9dff88) #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 0xffff800020a88780 cannot exit while holding sleeplocks Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 172253 57595 73 0x100010 0 1 syslogd * 65982 59119 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(ffff800020a88780) 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 0xffff800020a88780 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(ffff800020a88780) 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 0xffff800020a5db30 rbx 0xffff800020a5dbe0 rdx 0xffff800020a5f640 rcx 0 rax 0 r8 0xffffffff81b4c2a3 kprintf+0x173 r9 0x1 r10 0x25 r11 0x5fa02b8f471a2b3f r12 0x3000000008 r13 0xffff800020a5db40 r14 0x100 r15 0x1 rip 0xffffffff82139998 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020a5db20 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (reaper) pid=65982 stat=onproc flags process=14000 proc=200 pri=4, usrpri=52, nice=20 forw=0xffffffffffffffff, list=0xffff800020a11b28,0xffff800020a5f3d8 process=0xffff800020a4a388 user=0xffff800020a58000, vmspace=0xffffffff826485d0 estcpu=2, cpticks=7, pctcpu=0.58 user=0, sys=6, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 37511 479240 36680 32767 2 0x490 syz-executor.0 36680 74064 77777 0 3 0x82 wait syz-executor.0 16008 324163 684 32767 3 0x90 piperd syz-executor.1 684 203132 77777 0 3 0x82 wait syz-executor.1 13439 430907 0 0 3 0x14200 bored sosplice 77777 39194 95775 0 3 0x82 thrsleep syz-fuzzer 77777 225055 95775 0 3 0x4000082 thrsleep syz-fuzzer 77777 143135 95775 0 3 0x4000082 thrsleep syz-fuzzer 77777 341857 95775 0 3 0x4000082 thrsleep syz-fuzzer 77777 422634 95775 0 3 0x4000082 kqread syz-fuzzer 77777 99948 95775 0 3 0x4000082 thrsleep syz-fuzzer 77777 124423 95775 0 3 0x4000082 thrsleep syz-fuzzer 77777 331144 95775 0 3 0x4000082 thrsleep syz-fuzzer 77777 421536 95775 0 3 0x4000082 thrsleep syz-fuzzer 77777 468204 95775 0 3 0x4000082 thrsleep syz-fuzzer 95775 384538 22382 0 3 0x10008a pause ksh 22382 51288 86751 0 3 0x92 select sshd 33811 28423 1 0 2 0x100083 getty 86751 60870 1 0 3 0x80 select sshd 57595 172253 464 73 7 0x100010 syslogd 464 237589 1 0 3 0x100082 netio syslogd 56463 484170 1 77 3 0x100090 poll dhclient 38808 97235 1 0 3 0x80 poll dhclient 87780 360536 0 0 3 0x14200 pgzero zerothread 68364 108196 0 0 3 0x14200 aiodoned aiodoned 95798 397387 0 0 3 0x14200 syncer update 36280 316950 0 0 3 0x14200 cleaner cleaner *59119 65982 0 0 7 0x14200 reaper 82478 297594 0 0 3 0x14200 pgdaemon pagedaemon 36325 210880 0 0 3 0x14200 bored crynlk 37239 252841 0 0 3 0x14200 bored crypto 40490 121334 0 0 3 0x40014200 acpi0 acpi0 65309 465023 0 0 3 0x40014200 idle1 22257 124866 0 0 3 0x14200 bored softnet 12988 355777 0 0 3 0x14200 bored systqmp 7059 297931 0 0 3 0x14200 bored systq 95371 182191 0 0 2 0x40014200 softclock 65360 432705 0 0 3 0x40014200 idle0 86436 463146 0 0 3 0x14200 bored smr 1 290103 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 57595 (syslogd) thread 0xffff800020ac0ee0 (172253) exclusive rrwlock inode r = 0 (0xfffffd806eb503c8) #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 9462 6321K 6321K 78643K 11709 0 0 pcb 13 8K 8K 78643K 13 0 0 rtable 105 3K 3K 78643K 10610 0 0 ifaddr 35 13K 15K 78643K 1451 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 646 0 0 iov 0 0K 32K 78643K 952 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1215 76K 76K 78643K 7106 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 9K 78643K 162 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 1K 78643K 1432 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 6 17K 33K 78643K 13268 0 0 sigio 0 0K 0K 78643K 139 0 0 proc 41 38K 70K 78643K 10976 0 0 subproc 34 2K 2K 78643K 3978 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 1801 0 0 in_multi 33 2K 2K 78643K 3026 0 0 ether_multi 1 0K 0K 78643K 90 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 60 265K 265K 78643K 60 0 0 exec 0 0K 1K 78643K 4041 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 98 21K 32K 78643K 43788 0 0 UVM aobj 130 4K 4K 78643K 165 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 825 0 0 NDP 5 0K 0K 78643K 705 0 0 temp 121 3554K 3650K 78643K 57935 0 0 kqueue 0 0K 0K 78643K 182 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 475 0 469 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 1117 0 1115 1 0 1 1 0 8 0 rtentry 112 2602 0 2558 2 0 2 2 0 8 0 unpcb 120 5206 0 5198 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 3175 0 3175 1 1 0 1 0 8 0 tcpcb 544 3125 0 3121 1 0 1 1 0 8 0 ipq 40 29 0 29 17 17 0 1 0 8 0 ipqe 40 57 0 57 17 17 0 1 0 8 0 inpcb 280 7576 0 7566 14 12 2 2 0 8 1 nd6 48 702 0 696 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 10613 0 10421 33 21 12 13 0 8 0 art_table 32 10614 0 10421 2 0 2 2 0 8 0 art_node 16 2601 0 2561 1 0 1 1 0 8 0 sysvmsgpl 40 12 0 10 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 1430 0 1420 1 0 1 1 0 8 0 shmpl 112 163 0 35 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 15061 0 13603 49 1 48 48 0 8 0 ffsino 272 15061 0 13603 102 4 98 98 0 8 0 nchpl 144 30838 0 29210 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 129518 0 129518 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 84601 0 84601 46 45 1 7 0 8 1 plimitpl 152 2252 0 2243 1 0 1 1 0 8 0 sigapl 432 12743 0 12729 14 12 2 3 0 8 0 futexpl 56 127732 0 127732 1 0 1 1 0 8 1 knotepl 112 7481 0 7462 2 0 2 2 0 8 0 kqueuepl 104 3004 0 3002 1 0 1 1 0 8 0 pipepl 112 8516 0 8497 26 24 2 2 0 8 1 fdescpl 488 12744 0 12729 3 0 3 3 0 8 1 filepl 152 79259 0 79163 35 30 5 7 0 8 1 lockfpl 104 2168 0 2168 22 21 1 1 0 8 1 lockfspl 48 686 0 686 22 21 1 1 0 8 1 sessionpl 112 249 0 239 1 0 1 1 0 8 0 pgrppl 48 385 0 375 1 0 1 1 0 8 0 ucredpl 96 22102 0 22093 1 0 1 1 0 8 0 zombiepl 144 12729 0 12728 2 1 1 1 0 8 0 processpl 896 12760 0 12728 4 0 4 4 0 8 0 procpl 632 33319 0 33276 36 32 4 5 0 8 0 srpgc 64 464 0 464 36 35 1 1 0 8 1 sosppl 128 257 0 257 43 43 0 1 0 8 0 sockpl 384 14162 0 14145 11 8 3 4 0 8 1 mcl64k 65536 30 0 0 4 2 2 3 0 8 0 mcl16k 16384 19 0 0 3 1 2 3 0 8 0 mcl12k 12288 65 0 0 2 0 2 2 0 8 0 mcl9k 9216 40 0 0 3 1 2 2 0 8 0 mcl8k 8192 25 0 0 4 1 3 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 144 0 0 15 3 12 15 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 789 0 0 16 2 14 14 0 8 0 bufpl 256 26931 0 19917 439 0 439 439 0 8 0 anonpl 16 1383719 0 1377451 289 248 41 49 0 124 0 amapchunkpl 152 102413 0 102324 167 160 7 18 0 158 3 amappl16 192 57972 0 57564 350 317 33 35 0 8 8 amappl15 184 1336 0 1332 1 0 1 1 0 8 0 amappl14 176 3068 0 3062 1 0 1 1 0 8 0 amappl13 168 2049 0 2048 1 0 1 1 0 8 0 amappl12 160 1461 0 1456 2 1 1 1 0 8 0 amappl11 152 2027 0 2016 1 0 1 1 0 8 0 amappl10 144 2167 0 2164 1 0 1 1 0 8 0 amappl9 136 4934 0 4931 1 0 1 1 0 8 0 amappl8 128 3931 0 3900 4 2 2 2 0 8 0 amappl7 120 2583 0 2572 1 0 1 1 0 8 0 amappl6 112 1448 0 1442 1 0 1 1 0 8 0 amappl5 104 3144 0 3132 1 0 1 1 0 8 0 amappl4 96 12708 0 12677 2 1 1 2 0 8 0 amappl3 88 2910 0 2900 1 0 1 1 0 8 0 amappl2 80 84122 0 84054 3 1 2 3 0 8 0 amappl1 72 347802 0 347349 23 13 10 19 0 8 0 amappl 80 37195 0 37158 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 164 0 35 3 0 3 3 0 8 0 uaddrrnd 24 12744 0 12728 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 12744 0 12728 1 0 1 1 0 8 0 vmmpekpl 168 107362 0 107331 2 0 2 2 0 8 0 vmmpepl 168 1634885 0 1633251 392 296 96 96 0 357 16 vmsppl 368 12743 0 12728 2 0 2 2 0 8 0 pdppl 4096 25495 0 25456 6 0 6 6 0 8 0 pvpl 32 3702853 0 3693357 637 522 115 129 0 265 14 pmappl 232 12743 0 12728 24 22 2 2 0 8 1 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 636 0 37 18 0 18 18 0 8 0