witness: thread 0xffff800020acf658 exiting with the following locks held: exclusive rrwlock inode r = 0 (0xfffffd8068f5f5f8) #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_writev+0xa7 sys/kern/sys_generic.c:311 #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 0xffff800020acf658 cannot exit while holding sleeplocks Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 1653 5305 32767 0x10 0x4000000 0K syz-executor.1 *258118 635 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(ffff800020acf658) at witness_thread_exit+0x213 sys/kern/subr_witness.c:1364 reaper(ffff800020a5fb30) 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}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic thread 0xffff800020acf658 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(ffff800020acf658) at witness_thread_exit+0x213 sys/kern/subr_witness.c:1364 reaper(ffff800020a5fb30) at reaper+0x14c sys/kern/kern_exit.c:423 end trace frame: 0x0, count: -4 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800020a5d470 rbx 0xffff800020a5d520 rdx 0xffff800020a5fb30 rcx 0 rax 0 r8 0xffffffff81adb933 kprintf+0x173 r9 0x1 r10 0x25 r11 0x6527a4dcbce84636 r12 0x3000000008 r13 0xffff800020a5d480 r14 0x100 r15 0x1 rip 0xffffffff81a7b868 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020a5d460 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (reaper) pid=258118 stat=onproc flags process=14000 proc=200 pri=4, usrpri=52, nice=20 forw=0xffffffffffffffff, list=0xffff800020a11b28,0xffff800020a5f3d8 process=0xffff800020a4a708 user=0xffff800020a58000, vmspace=0xffffffff82664870 estcpu=2, cpticks=6, pctcpu=0.37 user=0, sys=6, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 5305 121860 53708 32767 2 0x10 syz-executor.1 5305 1653 53708 32767 7 0x4000010 syz-executor.1 5305 90273 53708 32767 3 0x4000090 fsleep syz-executor.1 53708 439213 34085 32767 2 0x10 syz-executor.1 34085 466195 46461 0 3 0x82 wait syz-executor.1 22265 500920 89137 32767 2 0x10 syz-executor.0 89137 710 46461 0 3 0x82 wait syz-executor.0 51436 501301 0 0 3 0x14200 bored sosplice 46461 310146 71196 0 3 0x82 kqread syz-fuzzer 46461 78722 71196 0 3 0x4000082 thrsleep syz-fuzzer 46461 258459 71196 0 3 0x4000082 thrsleep syz-fuzzer 46461 131688 71196 0 3 0x4000082 thrsleep syz-fuzzer 46461 68390 71196 0 3 0x4000082 thrsleep syz-fuzzer 46461 300350 71196 0 3 0x4000082 thrsleep syz-fuzzer 46461 168128 71196 0 3 0x4000082 thrsleep syz-fuzzer 46461 20377 71196 0 3 0x4000082 thrsleep syz-fuzzer 46461 126351 71196 0 3 0x4000082 thrsleep syz-fuzzer 46461 492966 71196 0 3 0x4000082 thrsleep syz-fuzzer 71196 272328 84985 0 3 0x10008a pause ksh 84985 289707 61587 0 3 0x92 select sshd 90115 288069 1 0 2 0x100083 getty 61587 438489 1 0 3 0x80 select sshd 37241 297443 70265 73 2 0x100090 syslogd 70265 102528 1 0 3 0x100082 netio syslogd 46146 164706 1 77 3 0x100090 poll dhclient 70772 297496 1 0 3 0x80 poll dhclient 14501 196214 0 0 3 0x14200 pgzero zerothread 2032 5957 0 0 3 0x14200 aiodoned aiodoned 54414 166957 0 0 3 0x14200 syncer update 57024 267986 0 0 3 0x14200 cleaner cleaner * 635 258118 0 0 7 0x14200 reaper 54185 145713 0 0 3 0x14200 pgdaemon pagedaemon 67742 132790 0 0 3 0x14200 bored crynlk 23313 175714 0 0 3 0x14200 bored crypto 63954 121082 0 0 3 0x40014200 acpi0 acpi0 72420 452901 0 0 3 0x40014200 idle1 40745 184581 0 0 3 0x14200 bored softnet 31127 486422 0 0 3 0x14200 bored systqmp 16364 318001 0 0 3 0x14200 bored systq 37805 415954 0 0 3 0x40014200 bored softclock 14002 217557 0 0 3 0x40014200 idle0 39599 108464 0 0 3 0x14200 bored smr 1 45727 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 5305 (syz-executor.1) thread 0xffff800020acfb48 (1653) shared rwlock vmmaplk r = 0 (0xfffffd807f00bb98) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 uvmfault_lookup+0xd9 sys/uvm/uvm_fault.c:1448 #2 uvm_fault+0x7c sys/uvm/uvm_fault.c:524 #3 pageflttrap+0x20b sys/arch/amd64/amd64/trap.c:199 #4 kerntrap+0xec sys/arch/amd64/amd64/trap.c:287 #5 alltraps_kern_meltdown+0x7b #6 copyout+0x53 #7 syscall+0x552 mi_syscall sys/sys/syscall_mi.h:92 [inline] #7 syscall+0x552 sys/arch/amd64/amd64/trap.c:555 #8 Xsyscall+0x128 exclusive kernel_lock &kernel_lock r = 1 (0xffffffff82651a60) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 syscall+0x412 mi_syscall sys/sys/syscall_mi.h:83 [inline] #1 syscall+0x412 sys/arch/amd64/amd64/trap.c:555 #2 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9463 6322K 6322K 78643K 12190 0 0 pcb 13 8K 8K 78643K 13 0 0 rtable 105 3K 3K 78643K 14925 0 0 ifaddr 37 18K 21K 78643K 2045 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 757 0 0 iov 0 0K 36K 78643K 1266 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1216 76K 76K 78643K 9083 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 227 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 1843 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 8 25K 33K 78643K 16957 0 0 sigio 0 0K 0K 78643K 214 0 0 proc 41 38K 70K 78643K 15225 0 0 subproc 34 2K 2K 78643K 5610 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 2025 0 0 in_multi 33 2K 2K 78643K 4159 0 0 ether_multi 1 0K 0K 78643K 105 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 5533 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 115 22K 32K 78643K 56558 0 0 UVM aobj 130 5K 5K 78643K 141 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 1030 0 0 NDP 5 0K 0K 78643K 993 0 0 temp 123 3558K 3650K 78643K 76396 0 0 kqueue 0 0K 0K 78643K 218 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 662 0 656 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 1468 0 1466 1 0 1 1 0 8 0 rtentry 112 3653 0 3609 2 0 2 2 0 8 0 unpcb 120 6541 0 6531 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 4067 0 4067 1 1 0 1 0 8 0 tcpcb 544 3742 0 3738 1 0 1 1 0 8 0 ipq 40 28 0 28 14 14 0 1 0 8 0 ipqe 40 69 0 69 14 14 0 1 0 8 0 inpcb 280 9211 0 9201 17 15 2 2 0 8 1 nd6 48 990 0 984 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 15011 0 14817 28 15 13 13 0 8 0 art_table 32 15012 0 14817 2 0 2 2 0 8 0 art_node 16 3652 0 3612 1 0 1 1 0 8 0 sysvmsgpl 40 8 0 2 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 1841 0 1831 1 0 1 1 0 8 0 shmpl 112 139 0 11 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 18211 0 16737 48 0 48 48 0 8 0 ffsino 272 18211 0 16737 102 3 99 99 0 8 0 nchpl 144 37821 0 36188 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 163903 0 163903 4 3 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 103436 0 103436 59 58 1 7 0 8 1 plimitpl 152 2906 0 2897 1 0 1 1 0 8 0 sigapl 432 16144 0 16128 17 15 2 3 0 8 0 futexpl 56 153340 0 153339 3 2 1 1 0 8 0 knotepl 112 10049 0 10026 3 2 1 2 0 8 0 kqueuepl 104 3707 0 3703 1 0 1 1 0 8 0 pipepl 112 10880 0 10861 27 25 2 2 0 8 0 fdescpl 488 16145 0 16128 4 1 3 3 0 8 0 filepl 152 98761 0 98656 47 42 5 7 0 8 0 lockfpl 104 2843 0 2843 26 25 1 1 0 8 1 lockfspl 48 927 0 927 26 25 1 1 0 8 1 sessionpl 112 345 0 335 1 0 1 1 0 8 0 pgrppl 48 533 0 523 1 0 1 1 0 8 0 ucredpl 96 26887 0 26878 1 0 1 1 0 8 0 zombiepl 144 16129 0 16128 3 2 1 1 0 8 0 processpl 896 16161 0 16128 4 0 4 4 0 8 0 procpl 632 41997 0 41952 51 46 5 5 0 8 1 srpgc 64 656 0 656 47 46 1 1 0 8 1 sosppl 128 312 0 312 65 64 1 1 0 8 1 sockpl 384 17539 0 17520 20 17 3 4 0 8 1 mcl64k 65536 41 0 0 6 3 3 3 0 8 1 mcl16k 16384 17 0 0 3 0 3 3 0 8 0 mcl12k 12288 73 0 0 3 1 2 2 0 8 0 mcl9k 9216 41 0 0 2 0 2 2 0 8 0 mcl8k 8192 25 0 0 3 0 3 3 0 8 0 mcl4k 4096 40 0 0 4 1 3 3 0 8 0 mcl2k2 2112 12 0 0 1 0 1 1 0 8 0 mcl2k 2048 168 0 0 15 7 8 15 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 980 0 0 12 0 12 12 0 8 0 bufpl 256 32329 0 25315 439 0 439 439 0 8 0 anonpl 16 1758393 0 1751665 212 168 44 48 0 124 1 amapchunkpl 152 127563 0 127463 103 97 6 18 0 158 0 amappl16 192 77101 0 76684 369 337 32 34 0 8 7 amappl15 184 2347 0 2344 37 36 1 1 0 8 0 amappl14 176 5060 0 5047 1 0 1 1 0 8 0 amappl13 168 2372 0 2372 28 27 1 1 0 8 1 amappl12 160 1822 0 1819 20 19 1 1 0 8 0 amappl11 152 2747 0 2735 1 0 1 1 0 8 0 amappl10 144 2505 0 2496 1 0 1 1 0 8 0 amappl9 136 6073 0 6070 1 0 1 1 0 8 0 amappl8 128 4808 0 4759 2 0 2 2 0 8 0 amappl7 120 3080 0 3067 1 0 1 1 0 8 0 amappl6 112 1880 0 1867 1 0 1 1 0 8 0 amappl5 104 4193 0 4182 1 0 1 1 0 8 0 amappl4 96 15981 0 15953 1 0 1 1 0 8 0 amappl3 88 3980 0 3970 1 0 1 1 0 8 0 amappl2 80 104740 0 104660 3 1 2 3 0 8 0 amappl1 72 443602 0 443136 23 13 10 19 0 8 0 amappl 80 47469 0 47427 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 140 0 11 3 0 3 3 0 8 0 uaddrrnd 24 16145 0 16128 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 16145 0 16128 1 0 1 1 0 8 0 vmmpekpl 168 134692 0 134662 2 0 2 2 0 8 0 vmmpepl 168 2080968 0 2079179 468 382 86 95 0 357 8 vmsppl 368 16144 0 16128 2 0 2 2 0 8 0 pdppl 4096 32297 0 32256 8 2 6 6 0 8 0 pvpl 32 4706573 0 4695520 673 555 118 132 0 265 11 pmappl 232 16144 0 16128 32 31 1 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 633 0 36 18 0 18 18 0 8 0