panic: thread 0xffff800020b93530 cannot exit while holding sleeplocks Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *355556 71389 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(f088f3fd32a3d69c) 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 0xffff800020b93530 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(f088f3fd32a3d69c) 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 0xffff800020b67b00 rbx 0xffff800020b67ba0 rdx 0xffffffff81ec88ae cmd0646_9_tim_udma+0x18cbf rcx 0 rax 0 r8 0xffffffff81aa9b64 kprintf+0x174 r9 0x1 r10 0x808dc1ac3cd08c05 r11 0x9355d53c61bf9f17 r12 0x3000000008 r13 0xffff800020b67b10 r14 0x100 r15 0x1 rip 0xffffffff819d4fa8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020b67af0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (reaper) pid=355556 stat=onproc flags process=14000 proc=200 pri=4, usrpri=53, nice=20 forw=0xffffffffffffffff, list=0xffff800020b212c0,0xffff800020b219d8 process=0xffff800020b5b070 user=0xffff800020b62000, vmspace=0xffffffff822dc6f0 estcpu=3, cpticks=2, pctcpu=0.58 user=0, sys=2, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 42158 92453 71618 32767 3 0x90 nanosleep syz-executor0 71618 372380 1425 0 3 0x82 wait syz-executor0 32906 242383 0 0 3 0x14200 bored sosplice 1425 52654 92214 0 3 0x82 thrsleep syz-fuzzer 1425 364771 92214 0 3 0x4000082 thrsleep syz-fuzzer 1425 277732 92214 0 3 0x4000082 thrsleep syz-fuzzer 1425 477145 92214 0 3 0x4000082 thrsleep syz-fuzzer 1425 282719 92214 0 3 0x4000082 thrsleep syz-fuzzer 1425 28420 92214 0 3 0x4000082 thrsleep syz-fuzzer 1425 434138 92214 0 3 0x4000082 kqread syz-fuzzer 1425 14516 92214 0 3 0x4000082 thrsleep syz-fuzzer 1425 229032 92214 0 3 0x4000082 thrsleep syz-fuzzer 1425 318484 92214 0 3 0x4000082 thrsleep syz-fuzzer 1425 265470 92214 0 3 0x4000082 thrsleep syz-fuzzer 1425 314891 92214 0 3 0x4000082 thrsleep syz-fuzzer 92214 269411 52228 0 3 0x10008a pause ksh 52228 142773 54022 0 3 0x92 select sshd 33730 507434 1 0 3 0x100083 ttyin getty 54022 226109 1 0 3 0x80 select sshd 28493 377054 31210 73 3 0x100010 ffs_fsync syslogd 31210 367501 1 0 3 0x100082 netio syslogd 73059 52144 1 77 3 0x100090 poll dhclient 66124 362328 1 0 3 0x80 poll dhclient 24653 270069 0 0 3 0x14200 pgzero zerothread 5180 491347 0 0 3 0x14200 aiodoned aiodoned 85787 126364 0 0 3 0x14200 syncer update 98870 160222 0 0 3 0x14200 cleaner cleaner *71389 355556 0 0 7 0x14200 reaper 43008 91809 0 0 3 0x14200 pgdaemon pagedaemon 84392 461395 0 0 3 0x14200 bored crynlk 89084 431041 0 0 3 0x14200 bored crypto 19170 101933 0 0 3 0x40014200 acpi0 acpi0 82733 513106 0 0 3 0x40014200 idle1 64419 323735 0 0 3 0x14200 bored softnet 49446 195363 0 0 3 0x14200 bored systqmp 80502 354934 0 0 3 0x14200 bored systq 18139 72259 0 0 3 0x40014200 bored softclock 35519 256024 0 0 7 0x40014200 idle0 1 288520 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 28493 (syslogd) thread 0xffff800020be5c30 (377054) exclusive rrwlock inode r = 0 (0xfffffd806ebbb6f8) 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 9458 6319K 6321K 78643K 11525 0 0 pcb 23 9K 11K 78643K 4285 0 0 rtable 79 2K 3K 78643K 6413 0 0 ifaddr 30 13K 15K 78643K 1221 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 243 0 0 iov 0 0K 32K 78643K 594 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 75K 78643K 7079 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 115 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 612 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1792 194K 288K 78643K 12592 0 0 file desc 5 13K 33K 78643K 8164 0 0 sigio 0 0K 0K 78643K 131 0 0 proc 41 38K 70K 78643K 5266 0 0 subproc 34 34817K 69634K 78643K 6698 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 1174 0 0 in_multi 22 1K 2K 78643K 2443 0 0 ether_multi 1 0K 0K 78643K 53 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 78 344K 344K 78643K 78 0 0 exec 0 0K 1K 78643K 1626 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 91 13K 61K 78643K 25755 0 0 UVM aobj 130 6K 6K 78643K 151 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 220 0 0 NDP 4 0K 0K 78643K 594 0 0 temp 97 2361K 2436K 78643K 33313 0 0 kqueue 0 0K 0K 78643K 116 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 199 0 196 1 0 1 1 0 8 0 inpcbpl 280 3441 0 3434 1 0 1 1 0 8 0 plimitpl 152 492 0 485 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 1796 0 1765 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 1331 0 1327 1 0 1 1 0 8 0 nd6 48 394 0 392 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 8333 0 8186 12 0 12 12 0 8 1 art_table 32 8334 0 8186 2 0 2 2 0 8 0 art_node 16 1795 0 1767 1 0 1 1 0 8 0 sysvmsgpl 40 10 0 6 1 0 1 1 0 8 0 semapl 112 610 0 600 1 0 1 1 0 8 0 shmpl 112 149 0 21 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 12104 0 10567 50 0 50 50 0 8 0 ffsino 272 12104 0 10567 104 1 103 103 0 8 0 nchpl 144 23069 0 21502 59 0 59 59 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 85561 0 85561 3 2 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 61030 0 61029 47 44 3 6 0 8 2 sigapl 432 7746 0 7733 7 5 2 3 0 8 0 futexpl 56 76384 0 76384 2 1 1 1 0 8 1 knotepl 112 5396 0 5375 6 4 2 2 0 8 0 kqueuepl 104 2378 0 2376 1 0 1 1 0 8 0 pipepl 112 7052 0 7039 24 23 1 2 0 8 0 fdescpl 488 7747 0 7733 3 0 3 3 0 8 0 filepl 152 53776 0 53701 30 25 5 7 0 8 1 lockfpl 96 1671 0 1671 11 10 1 1 0 8 1 lockfspl 24 3773 0 3773 9 8 1 1 0 8 1 sessionpl 112 212 0 203 1 0 1 1 0 8 0 pgrppl 48 342 0 333 1 0 1 1 0 8 0 ucredpl 96 19660 0 19652 1 0 1 1 0 8 0 zombiepl 144 7734 0 7733 4 3 1 1 0 8 0 processpl 840 7762 0 7733 4 0 4 4 0 8 0 procpl 600 21460 0 21418 6 2 4 5 0 8 0 srpgc 64 1154 0 1154 21 20 1 1 0 8 1 sosppl 128 175 0 175 29 29 0 1 0 8 0 sockpl 384 7897 0 7880 12 9 3 4 0 8 1 mcl64k 65536 21 0 0 3 1 2 3 0 8 0 mcl16k 16384 4 0 0 1 0 1 1 0 8 0 mcl12k 12288 33 0 0 2 0 2 2 0 8 0 mcl9k 9216 21 0 0 2 0 2 2 0 8 0 mcl8k 8192 29 0 0 4 2 2 3 0 8 0 mcl4k 4096 41 0 0 6 3 3 3 0 8 0 mcl2k2 2112 9 0 0 1 0 1 1 0 8 0 mcl2k 2048 108 0 0 11 1 10 11 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 433 0 0 10 0 10 10 0 8 0 bufpl 256 16937 0 9968 436 0 436 436 0 8 0 anonpl 16 848043 0 843379 225 185 40 58 0 125 6 amapchunkpl 152 69456 0 69368 361 356 5 189 0 158 0 amappl16 192 44340 0 44071 207 181 26 39 0 8 6 amappl15 184 1520 0 1519 1 0 1 1 0 8 0 amappl14 176 846 0 840 2 1 1 1 0 8 0 amappl13 168 885 0 882 1 0 1 1 0 8 0 amappl12 160 1147 0 1137 1 0 1 1 0 8 0 amappl11 152 2069 0 2060 1 0 1 1 0 8 0 amappl10 144 786 0 782 2 1 1 1 0 8 0 amappl9 136 1454 0 1452 1 0 1 1 0 8 0 amappl8 128 2830 0 2766 3 0 3 3 0 8 0 amappl7 120 902 0 892 1 0 1 1 0 8 0 amappl6 112 752 0 739 1 0 1 1 0 8 0 amappl5 104 1701 0 1690 1 0 1 1 0 8 0 amappl4 96 1509 0 1476 2 1 1 2 0 8 0 amappl3 88 1236 0 1229 1 0 1 1 0 8 0 amappl2 80 66427 0 66370 2 0 2 2 0 8 0 amappl1 72 200188 0 199748 24 14 10 19 0 8 0 amappl 72 23198 0 23164 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 150 0 21 3 0 3 3 0 8 0 uaddrrnd 24 7747 0 7733 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 7747 0 7733 1 0 1 1 0 8 0 vmmpekpl 168 67610 0 67587 2 0 2 2 0 8 0 vmmpepl 168 891703 0 890394 257 185 72 87 0 357 5 vmsppl 360 7746 0 7733 2 0 2 2 0 8 0 pdppl 4096 15501 0 15466 6 1 5 6 0 8 0 pvpl 32 2278460 0 2270723 422 312 110 151 0 265 24 pmappl 224 7746 0 7733 28 27 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 603 0 13 17 0 17 17 0 8 0