panic: thread 0xffff800020b5c720 cannot exit while holding sleeplocks Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 513685 10411 73 0x100010 0 1 syslogd *259442 65347 0 0x14000 0x200 0 reaper db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399 panic() at panic+0x174 sys/kern/subr_prf.c:208 witness_thread_exit(ffff800020b5c720) at witness_thread_exit+0x283 sys/kern/subr_witness.c:1422 reaper(ffff800020ac1518) at reaper+0x14f sys/kern/kern_exit.c:412 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 0xffff800020b5c720 cannot exit while holding sleeplocks ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399 panic() at panic+0x174 sys/kern/subr_prf.c:208 witness_thread_exit(ffff800020b5c720) at witness_thread_exit+0x283 sys/kern/subr_witness.c:1422 reaper(ffff800020ac1518) at reaper+0x14f sys/kern/kern_exit.c:412 end trace frame: 0x0, count: -4 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800020b07a80 rbx 0xffff800020b07b30 rdx 0xffffffff81f82d30 cy_pio_rec+0x6cd rcx 0 rax 0 r8 0xffffffff819f9293 kprintf+0x183 r9 0x1 r10 0x25 r11 0xa3d276758559fffc r12 0x3000000008 r13 0xffff800020b07a90 r14 0x100 r15 0x1 rip 0xffffffff81a98878 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020b07a70 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (reaper) pid=259442 stat=onproc flags process=14000 proc=200 pri=4, usrpri=52, nice=20 forw=0xffffffffffffffff, list=0xffff800020ac0e10,0xffff800020ac1780 process=0xffff800020afa350 user=0xffff800020b02000, vmspace=0xffffffff82349208 estcpu=2, cpticks=8, pctcpu=0.30 user=0, sys=7, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 17395 289662 21345 0 3 0x80 nanosleep syz-executor.1 17395 355134 21345 0 3 0x4000080 fsleep syz-executor.1 17395 172294 21345 0 3 0x4000080 pipewr syz-executor.1 35048 339923 1 0 3 0x100083 ttyin getty 9135 203405 43955 0 2 0x482 syz-executor.0 89123 490036 0 0 3 0x14200 bored sosplice 21345 50372 43955 0 2 0x482 syz-executor.1 43955 143215 93615 0 3 0x82 thrsleep syz-fuzzer 43955 320902 93615 0 3 0x4000082 thrsleep syz-fuzzer 43955 204718 93615 0 3 0x4000082 thrsleep syz-fuzzer 43955 32603 93615 0 3 0x4000082 thrsleep syz-fuzzer 43955 181160 93615 0 3 0x4000082 thrsleep syz-fuzzer 43955 424291 93615 0 3 0x4000082 thrsleep syz-fuzzer 43955 405152 93615 0 3 0x4000082 thrsleep syz-fuzzer 43955 76955 93615 0 3 0x4000082 thrsleep syz-fuzzer 43955 34386 93615 0 3 0x4000082 kqread syz-fuzzer 43955 364371 93615 0 3 0x4000082 thrsleep syz-fuzzer 93615 48687 4186 0 3 0x10008a pause ksh 4186 176786 11982 0 3 0x92 select sshd 11982 320148 1 0 3 0x80 select sshd 10411 513685 38733 73 7 0x100010 syslogd 38733 131974 1 0 3 0x100082 netio syslogd 45481 487275 1 77 3 0x100090 poll dhclient 62033 235663 1 0 3 0x80 poll dhclient 12009 488022 0 0 3 0x14200 pgzero zerothread 67745 371176 0 0 3 0x14200 aiodoned aiodoned 44745 272898 0 0 3 0x14200 syncer update 90388 383402 0 0 3 0x14200 cleaner cleaner *65347 259442 0 0 7 0x14200 reaper 55059 497856 0 0 3 0x14200 pgdaemon pagedaemon 28524 303519 0 0 3 0x14200 bored crynlk 25862 357484 0 0 3 0x14200 bored crypto 36881 362311 0 0 3 0x40014200 acpi0 acpi0 45039 168468 0 0 3 0x40014200 idle1 2104 475563 0 0 3 0x14200 bored softnet 19451 367155 0 0 3 0x14200 bored systqmp 4447 98714 0 0 3 0x14200 bored systq 3214 250021 0 0 3 0x40014200 bored softclock 97045 118820 0 0 3 0x40014200 idle0 1 148430 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 10411 (syslogd) thread 0xffff800020b85c30 (513685) exclusive rrwlock inode r = 0 (0xfffffd806eba73c8) locked @ /syzkaller/managers/multicore/kernel/sys/ufs/ufs/ufs_vnops.c:1547 #0 witness_lock+0x594 sys/kern/subr_witness.c:1205 #1 _rw_enter+0x45d sys/kern/kern_rwlock.c:280 #2 _rrw_enter+0x60 sys/kern/kern_rwlock.c:410 #3 VOP_LOCK+0x57 sys/kern/vfs_vops.c:602 #4 vn_lock+0x6e sys/kern/vfs_vnops.c:549 #5 sys_fsync+0x114 sys/kern/vfs_syscalls.c:2704 #6 syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] #6 syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 #7 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9514 6351K 6363K 78643K 10981 0 0 pcb 23 9K 10K 78643K 611 0 0 rtable 100 3K 4K 78643K 662 0 0 ifaddr 56 13K 14K 78643K 245 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 35 0 0 iov 0 0K 24K 78643K 108 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1197 75K 75K 78643K 1922 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 14 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 170 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1792 194K 288K 78643K 12592 0 0 file desc 5 13K 25K 78643K 1063 0 0 sigio 0 0K 0K 78643K 9 0 0 proc 42 38K 58K 78643K 600 0 0 subproc 64 65538K 67586K 78643K 342 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 123 0 0 in_multi 33 2K 2K 78643K 171 0 0 ether_multi 1 0K 0K 78643K 13 0 0 mrt 1 0K 0K 78643K 7 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 72 318K 318K 78643K 72 0 0 exec 0 0K 1K 78643K 322 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 105 21K 25K 78643K 4178 0 0 UVM aobj 48 3K 3K 78643K 59 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 1K 78643K 27 0 0 NDP 11 0K 0K 78643K 75 0 0 temp 163 2367K 2431K 78643K 6132 0 0 kqueue 0 0K 0K 78643K 5 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 12 0 8 1 0 1 1 0 8 0 inpcbpl 280 570 0 563 1 0 1 1 0 8 0 plimitpl 152 45 0 38 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 113 0 73 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 188 0 184 1 0 1 1 0 8 0 nd6 48 20 0 16 1 0 1 1 0 8 0 ppxss 1128 33 0 33 5 4 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 533 0 346 12 0 12 12 0 8 0 art_table 32 534 0 346 2 0 2 2 0 8 0 art_node 16 112 0 78 1 0 1 1 0 8 0 sysvmsgpl 40 4 0 2 1 0 1 1 0 8 0 semapl 112 166 0 156 1 0 1 1 0 8 0 shmpl 112 57 0 11 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3351 0 1928 46 0 46 46 0 8 0 ffsino 272 3351 0 1928 96 0 96 96 0 8 0 nchpl 144 5043 0 3433 61 0 61 61 0 8 0 uvmvnodes 72 3603 0 0 66 0 66 66 0 8 0 vnodes 200 3603 0 0 190 0 190 190 0 8 0 namei 1024 14907 0 14907 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 4 0 4 3 3 0 1 0 8 0 scxspl 192 13673 0 13673 13 12 1 6 0 8 1 sigapl 432 1209 0 1196 2 0 2 2 0 8 0 futexpl 56 11654 0 11653 1 0 1 1 0 8 0 knotepl 112 382 0 355 2 1 1 2 0 8 0 kqueuepl 104 240 0 238 1 0 1 1 0 8 0 pipepl 112 730 0 709 4 3 1 2 0 8 0 fdescpl 488 1210 0 1196 3 1 2 3 0 8 0 filepl 152 7257 0 7159 8 3 5 5 0 8 1 lockfpl 104 379 0 379 3 2 1 1 0 8 1 lockfspl 32 488 0 488 3 2 1 1 0 8 1 sessionpl 112 27 0 17 1 0 1 1 0 8 0 pgrppl 48 43 0 33 1 0 1 1 0 8 0 ucredpl 96 1852 0 1845 1 0 1 1 0 8 0 zombiepl 144 1196 0 1195 2 1 1 1 0 8 0 processpl 840 1225 0 1195 4 0 4 4 0 8 0 procpl 600 3420 0 3377 4 0 4 4 0 8 0 srpgc 64 48 0 48 1 1 0 1 0 8 0 sosppl 128 17 0 17 6 5 1 1 0 8 1 sockpl 384 1059 0 1042 5 2 3 3 0 8 1 mcl64k 65536 371 0 0 47 9 38 47 0 8 1 mcl16k 16384 4 0 0 1 0 1 1 0 8 0 mcl12k 12288 11 0 0 2 0 2 2 0 8 0 mcl9k 9216 6 0 0 1 0 1 1 0 8 0 mcl8k 8192 6 0 0 1 0 1 1 0 8 0 mcl4k 4096 14 0 0 2 0 2 2 0 8 0 mcl2k2 2112 5 0 0 1 0 1 1 0 8 0 mcl2k 2048 117 0 0 14 0 14 14 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 471 0 0 28 0 28 28 0 8 0 bufpl 256 7270 0 1016 391 0 391 391 0 8 0 anonpl 16 131612 0 123256 79 44 35 51 0 125 0 amapchunkpl 152 7094 0 6967 23 18 5 12 0 158 0 amappl16 192 7103 0 6681 73 51 22 34 0 8 0 amappl15 184 9 0 8 1 0 1 1 0 8 0 amappl14 176 10 0 9 2 1 1 1 0 8 0 amappl13 168 189 0 186 1 0 1 1 0 8 0 amappl12 160 379 0 374 1 0 1 1 0 8 0 amappl11 152 217 0 207 1 0 1 1 0 8 0 amappl10 144 70 0 66 2 1 1 1 0 8 0 amappl9 136 367 0 363 1 0 1 1 0 8 0 amappl8 128 529 0 507 1 0 1 1 0 8 0 amappl7 120 182 0 178 1 0 1 1 0 8 0 amappl6 112 60 0 52 1 0 1 1 0 8 0 amappl5 104 141 0 129 1 0 1 1 0 8 0 amappl4 96 783 0 762 1 0 1 1 0 8 0 amappl3 88 196 0 190 1 0 1 1 0 8 0 amappl2 80 10513 0 10448 2 0 2 2 0 8 0 amappl1 72 34715 0 34267 24 14 10 19 0 8 0 amappl 72 3691 0 3642 1 0 1 1 0 75 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 58 0 11 1 0 1 1 0 8 0 uaddrrnd 24 1210 0 1195 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1210 0 1195 1 0 1 1 0 8 0 vmmpekpl 168 13414 0 13389 2 0 2 2 0 8 0 vmmpepl 168 136550 0 135063 112 46 66 76 0 357 1 vmsppl 360 1209 0 1195 2 0 2 2 0 8 0 pdppl 4096 2428 0 2390 6 1 5 6 0 8 0 pvpl 32 373484 0 361967 174 60 114 132 0 265 20 pmappl 224 1209 0 1195 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 607 0 13 17 0 17 17 0 8 0