witness: thread 0xffff800020b92270 exiting with the following locks held: exclusive rrwlock inode r = 0 (0xfffffd807aadd920) locked @ /syzkaller/managers/setuid/kernel/sys/ufs/ufs/ufs_vnops.c:1547 panic: thread 0xffff800020b92270 cannot exit while holding sleeplocks Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 206341 18782 32767 0x10 0x480 0 syz-executor1 *442815 80856 0 0x14000 0x200 1 reaper db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399 panic() at panic+0x16c sys/kern/subr_prf.c:208 witness_thread_exit(588ab0833d92fd20) at witness_thread_exit+0x244 sys/kern/subr_witness.c:1377 reaper(0) 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{1}> ddb{1}> set $lines = 0 ddb{1}> show panic thread 0xffff800020b92270 cannot exit while holding sleeplocks ddb{1}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399 panic() at panic+0x16c sys/kern/subr_prf.c:208 witness_thread_exit(588ab0833d92fd20) at witness_thread_exit+0x244 sys/kern/subr_witness.c:1377 reaper(0) at reaper+0x14f sys/kern/kern_exit.c:412 end trace frame: 0x0, count: -4 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800020b67200 rbx 0xffff800020b672a0 rdx 0xffffffff81ec9049 cmd0646_9_tim_udma+0x1780c rcx 0 rax 0 r8 0xffffffff816aa1c4 kprintf+0x174 r9 0x1 r10 0x6bc5b923a5bf1366 r11 0xf6edcfb0482f4ec5 r12 0x3000000008 r13 0xffff800020b67210 r14 0x100 r15 0x1 rip 0xffffffff8156b348 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020b671f0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (reaper) pid=442815 stat=onproc flags process=14000 proc=200 pri=4, usrpri=52, nice=20 forw=0xffffffffffffffff, list=0xffff800020b21518,0xffff800020b21c30 process=0xffff800020b5a350 user=0xffff800020b62000, vmspace=0xffffffff822fcba8 estcpu=2, cpticks=3, pctcpu=0.46 user=0, sys=3, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 23338 221588 18782 32767 3 0x3010 suspend syz-executor1 23338 79714 18782 32767 3 0x4081010 inode syz-executor1 28088 463838 2630 32767 3 0x90 nanosleep syz-executor0 2630 352981 94910 0 3 0x82 wait syz-executor0 18782 206341 98249 32767 7 0x490 syz-executor1 98249 352582 94910 0 3 0x82 wait syz-executor1 70314 279636 0 0 3 0x14200 bored sosplice 94910 115717 69835 0 3 0x82 thrsleep syz-fuzzer 94910 224405 69835 0 3 0x4000082 thrsleep syz-fuzzer 94910 336086 69835 0 3 0x4000082 thrsleep syz-fuzzer 94910 317411 69835 0 3 0x4000082 thrsleep syz-fuzzer 94910 434457 69835 0 3 0x4000082 thrsleep syz-fuzzer 94910 210145 69835 0 3 0x4000082 thrsleep syz-fuzzer 94910 271587 69835 0 3 0x4000082 thrsleep syz-fuzzer 94910 139931 69835 0 3 0x4000082 kqread syz-fuzzer 94910 206800 69835 0 3 0x4000082 thrsleep syz-fuzzer 94910 183762 69835 0 3 0x4000082 thrsleep syz-fuzzer 69835 61925 70732 0 3 0x10008a pause ksh 70732 478455 56437 0 3 0x92 select sshd 35959 57415 1 0 3 0x100083 ttyin getty 56437 121405 1 0 3 0x80 select sshd 39763 453339 13888 73 3 0x100010 ffs_fsync syslogd 13888 440906 1 0 3 0x100082 netio syslogd 3324 506871 1 77 3 0x100090 poll dhclient 54110 178955 1 0 3 0x80 poll dhclient 61523 380076 0 0 3 0x14200 pgzero zerothread 24731 421866 0 0 3 0x14200 aiodoned aiodoned 55790 339195 0 0 3 0x14200 syncer update 36270 143276 0 0 3 0x14200 cleaner cleaner *80856 442815 0 0 7 0x14200 reaper 32130 69890 0 0 3 0x14200 pgdaemon pagedaemon 62235 319273 0 0 3 0x14200 bored crynlk 25801 332393 0 0 3 0x14200 bored crypto 93186 508083 0 0 3 0x40014200 acpi0 acpi0 34803 39638 0 0 3 0x40014200 idle1 18677 124814 0 0 3 0x14200 bored softnet 19896 230769 0 0 3 0x14200 bored systqmp 239 283966 0 0 3 0x14200 bored systq 31898 27262 0 0 3 0x40014200 bored softclock 19122 203911 0 0 3 0x40014200 idle0 1 387468 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 39763 (syslogd) thread 0xffff800020be5c30 (453339) exclusive rrwlock inode r = 0 (0xfffffd806eb91098) locked @ /syzkaller/managers/setuid/kernel/sys/ufs/ufs/ufs_vnops.c:1547 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9460 6321K 6321K 78643K 10597 0 0 pcb 23 9K 10K 78643K 624 0 0 rtable 97 3K 3K 78643K 489 0 0 ifaddr 34 9K 9K 78643K 95 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 31 0 0 iov 0 0K 16K 78643K 56 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 75K 78643K 1793 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 19 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 1K 1K 78643K 12 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1792 194K 288K 78643K 12592 0 0 file desc 7 21K 33K 78643K 1411 0 0 sigio 0 0K 0K 78643K 27 0 0 proc 41 38K 58K 78643K 579 0 0 subproc 68 69634K 69634K 78643K 408 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 175 0 0 in_multi 33 2K 2K 78643K 193 0 0 ether_multi 1 0K 0K 78643K 9 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 253 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 90 20K 29K 78643K 4477 0 0 UVM aobj 23 2K 2K 78643K 58 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 29 0 0 NDP 5 0K 0K 78643K 39 0 0 temp 121 2366K 2437K 78643K 6461 0 0 kqueue 0 0K 0K 78643K 11 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 14 0 10 1 0 1 1 0 8 0 inpcbpl 280 525 0 518 1 0 1 1 0 8 0 plimitpl 152 42 0 33 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 131 0 91 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 227 0 223 1 0 1 1 0 8 0 nd6 48 24 0 20 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 594 0 409 12 0 12 12 0 8 0 art_table 32 595 0 409 2 0 2 2 0 8 0 art_node 16 130 0 96 1 0 1 1 0 8 0 sysvmsgpl 40 9 0 5 2 1 1 1 0 8 0 semupl 112 7 0 7 1 1 0 1 0 8 0 semapl 112 10 0 0 1 0 1 1 0 8 0 shmpl 112 56 0 35 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3338 0 1930 46 0 46 46 0 8 0 ffsino 272 3338 0 1930 95 0 95 95 0 8 0 nchpl 144 5244 0 3671 59 0 59 59 0 8 0 uvmvnodes 72 3551 0 0 65 0 65 65 0 8 0 vnodes 200 3551 0 0 187 0 187 187 0 8 0 namei 1024 15018 0 15018 1 0 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 13909 0 13908 12 11 1 6 0 8 0 sigapl 432 1548 0 1533 3 1 2 3 0 8 0 futexpl 56 9288 0 9288 1 0 1 1 0 8 1 knotepl 112 470 0 443 2 1 1 2 0 8 0 kqueuepl 104 260 0 258 1 0 1 1 0 8 0 pipepl 112 654 0 635 3 2 1 2 0 8 0 fdescpl 488 1549 0 1533 3 0 3 3 0 8 0 filepl 152 7782 0 7674 8 3 5 6 0 8 0 lockfpl 96 178 0 176 8 7 1 1 0 8 0 lockfspl 24 462 0 461 8 7 1 1 0 8 0 sessionpl 112 27 0 17 1 0 1 1 0 8 0 pgrppl 48 34 0 24 1 0 1 1 0 8 0 ucredpl 96 3085 0 3076 1 0 1 1 0 8 0 zombiepl 144 1534 0 1532 1 0 1 1 0 8 0 processpl 840 1564 0 1532 4 0 4 4 0 8 0 procpl 600 3680 0 3632 4 0 4 4 0 8 0 srpgc 64 60 0 60 4 4 0 1 0 8 0 sosppl 128 28 0 28 6 6 0 1 0 8 0 sockpl 384 1154 0 1137 8 5 3 4 0 8 1 mcl64k 65536 1 0 0 1 0 1 1 0 8 0 mcl9k 9216 4 0 0 1 0 1 1 0 8 0 mcl8k 8192 6 0 0 1 0 1 1 0 8 0 mcl4k 4096 9 0 0 2 0 2 2 0 8 0 mcl2k2 2112 4 0 0 1 0 1 1 0 8 0 mcl2k 2048 144 0 0 13 0 13 13 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 206 0 0 11 0 11 11 0 8 0 bufpl 256 7200 0 968 390 0 390 390 0 8 0 anonpl 16 175305 0 170508 62 26 36 36 0 125 14 amapchunkpl 152 7732 0 7630 18 13 5 9 0 158 0 amappl16 192 8751 0 8534 62 43 19 23 0 8 8 amappl15 184 5 0 4 1 0 1 1 0 8 0 amappl14 176 149 0 147 2 1 1 1 0 8 0 amappl13 168 56 0 51 1 0 1 1 0 8 0 amappl12 160 455 0 451 1 0 1 1 0 8 0 amappl11 152 376 0 364 1 0 1 1 0 8 0 amappl10 144 483 0 477 1 0 1 1 0 8 0 amappl9 136 472 0 469 1 0 1 1 0 8 0 amappl8 128 679 0 655 1 0 1 1 0 8 0 amappl7 120 74 0 66 1 0 1 1 0 8 0 amappl6 112 60 0 53 1 0 1 1 0 8 0 amappl5 104 147 0 136 1 0 1 1 0 8 0 amappl4 96 681 0 657 2 1 1 2 0 8 0 amappl3 88 141 0 136 1 0 1 1 0 8 0 amappl2 80 13776 0 13712 2 0 2 2 0 8 0 amappl1 72 42825 0 42346 24 14 10 19 0 8 0 amappl 72 3978 0 3935 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 57 0 35 1 0 1 1 0 8 0 uaddrrnd 24 1549 0 1532 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1549 0 1532 1 0 1 1 0 8 0 vmmpekpl 168 14203 0 14178 2 0 2 2 0 8 0 vmmpepl 168 172426 0 171042 110 40 70 71 0 357 9 vmsppl 360 1548 0 1532 2 0 2 2 0 8 0 pdppl 4096 3105 0 3064 6 0 6 6 0 8 0 pvpl 32 482688 0 474535 156 55 101 106 0 265 31 pmappl 224 1548 0 1532 4 3 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 539 0 2 16 0 16 16 0 8 0