panic: Thread 0xffff800020b92018 cannot exit while holding sleeplocks Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 4491 72480 32767 0x10 0x480 0 syz-executor0 *142175 11400 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(3c0ae4125b873b79) 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 0xffff800020b92018 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(3c0ae4125b873b79) 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 0xffff800020b67b20 rbx 0xffff800020b67bc0 rdx 0xffffffff81ec5817 cmd0646_9_tim_udma+0x133e5 rcx 0 rax 0 r8 0xffffffff819810f4 kprintf+0x174 r9 0x1 r10 0x69e25e220bde05e r11 0xe6f4978bef97ae7d r12 0x3000000008 r13 0xffff800020b67b30 r14 0x100 r15 0x1 rip 0xffffffff816f2378 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020b67b10 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (reaper) pid=142175 stat=onproc flags process=14000 proc=200 pri=4, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800020b21068,0xffff800020b219d8 process=0xffff800020b5a008 user=0xffff800020b62000, vmspace=0xffffffff823219e8 estcpu=0, cpticks=3, pctcpu=0.40 user=0, sys=3, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 64841 383939 72480 32767 2 0x10 syz-executor0 64841 103285 72480 32767 2 0x4000010 syz-executor0 52563 403684 7626 32767 3 0x90 nanosleep syz-executor1 7626 512931 98314 0 3 0x82 wait syz-executor1 72480 4491 38136 32767 7 0x490 syz-executor0 38136 319652 98314 0 3 0x82 wait syz-executor0 86087 17605 0 0 3 0x14200 bored sosplice 98314 455032 20523 0 3 0x82 thrsleep syz-fuzzer 98314 82952 20523 0 3 0x4000082 thrsleep syz-fuzzer 98314 194019 20523 0 3 0x4000082 thrsleep syz-fuzzer 98314 230537 20523 0 3 0x4000082 thrsleep syz-fuzzer 98314 502542 20523 0 3 0x4000082 thrsleep syz-fuzzer 98314 266875 20523 0 3 0x4000082 thrsleep syz-fuzzer 98314 222579 20523 0 3 0x4000082 thrsleep syz-fuzzer 98314 68004 20523 0 3 0x4000082 thrsleep syz-fuzzer 98314 305465 20523 0 3 0x4000082 thrsleep syz-fuzzer 98314 465814 20523 0 3 0x4000082 kqread syz-fuzzer 98314 79883 20523 0 3 0x4000082 thrsleep syz-fuzzer 20523 77151 74431 0 3 0x10008a pause ksh 74431 193307 76631 0 3 0x92 select sshd 39161 183198 1 0 3 0x100083 ttyin getty 76631 207862 1 0 3 0x80 select sshd 25291 317268 38915 73 3 0x100010 biowait syslogd 38915 455640 1 0 3 0x100082 netio syslogd 61566 204736 1 77 3 0x100090 poll dhclient 69049 155793 1 0 3 0x80 poll dhclient 32462 431263 0 0 2 0x14200 zerothread 7752 15873 0 0 3 0x14200 aiodoned aiodoned 32759 516229 0 0 3 0x14200 syncer update 73051 227386 0 0 3 0x14200 cleaner cleaner *11400 142175 0 0 7 0x14200 reaper 65161 393713 0 0 3 0x14200 pgdaemon pagedaemon 40393 130520 0 0 3 0x14200 bored crynlk 18845 375588 0 0 3 0x14200 bored crypto 53758 2220 0 0 3 0x40014200 acpi0 acpi0 96395 424509 0 0 3 0x40014200 idle1 17049 308613 0 0 3 0x14200 bored softnet 59257 11788 0 0 3 0x14200 bored systqmp 67761 478772 0 0 3 0x14200 bored systq 8465 339359 0 0 3 0x40014200 bored softclock 65509 175233 0 0 3 0x40014200 idle0 1 200710 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 25291 (syslogd) thread 0xffff800020be59d8 (317268) exclusive rrwlock inode r = 0 (0xfffffd806ebb9098) 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 9461 6321K 6321K 78643K 12003 0 0 pcb 23 9K 11K 78643K 6716 0 0 rtable 97 3K 3K 78643K 9481 0 0 ifaddr 37 18K 21K 78643K 1808 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 368 0 0 iov 0 0K 24K 78643K 862 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 75K 78643K 9915 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 153 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 1K 1K 78643K 1050 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1792 194K 288K 78643K 12592 0 0 file desc 8 25K 33K 78643K 12845 0 0 sigio 0 0K 0K 78643K 163 0 0 proc 41 38K 70K 78643K 7927 0 0 subproc 68 69634K 69634K 78643K 9962 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 1905 0 0 in_multi 33 2K 2K 78643K 3647 0 0 ether_multi 1 0K 0K 78643K 89 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 2303 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 111 22K 41K 78643K 40379 0 0 UVM aobj 130 9K 9K 78643K 144 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 308 0 0 NDP 5 0K 0K 78643K 882 0 0 temp 121 2362K 2442K 78643K 49699 0 0 kqueue 0 0K 0K 78643K 144 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 295 0 291 1 0 1 1 0 8 0 inpcbpl 280 5656 0 5649 1 0 1 1 0 8 0 plimitpl 152 719 0 710 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 2660 0 2620 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 2 0 2 1 1 0 1 0 8 0 tcpcb 544 2266 0 2262 1 0 1 1 0 8 0 nd6 48 586 0 582 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 12396 0 12205 14 1 13 13 0 8 0 art_table 32 12397 0 12205 2 0 2 2 0 8 0 art_node 16 2659 0 2625 1 0 1 1 0 8 0 sysvmsgpl 40 25 0 10 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 1044 0 1034 1 0 1 1 0 8 0 shmpl 112 142 0 14 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 17920 0 16243 55 0 55 55 0 8 0 ffsino 272 17920 0 16243 113 1 112 112 0 8 0 nchpl 144 35156 0 33578 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 129379 0 129379 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 90896 0 90895 65 64 1 6 0 8 0 sigapl 432 12139 0 12123 6 4 2 3 0 8 0 futexpl 56 123566 0 123566 1 0 1 1 0 8 1 knotepl 112 7878 0 7851 10 9 1 2 0 8 0 kqueuepl 104 3668 0 3666 1 0 1 1 0 8 0 pipepl 112 10848 0 10829 40 38 2 2 0 8 0 fdescpl 488 12140 0 12123 3 0 3 3 0 8 0 filepl 152 82524 0 82425 49 44 5 7 0 8 0 lockfpl 96 2793 0 2793 23 22 1 1 0 8 1 lockfspl 24 6055 0 6055 19 18 1 1 0 8 1 sessionpl 112 308 0 298 1 0 1 1 0 8 0 pgrppl 48 469 0 459 1 0 1 1 0 8 0 ucredpl 96 29122 0 29113 1 0 1 1 0 8 0 zombiepl 144 12124 0 12123 3 2 1 1 0 8 0 processpl 840 12155 0 12123 4 0 4 4 0 8 0 procpl 600 33970 0 33925 12 8 4 5 0 8 0 srpgc 64 1708 0 1708 51 51 0 1 0 8 0 sosppl 128 273 0 273 48 48 0 1 0 8 0 sockpl 384 12675 0 12658 34 31 3 4 0 8 1 mcl64k 65536 15 0 0 2 0 2 2 0 8 0 mcl16k 16384 6 0 0 1 0 1 1 0 8 0 mcl12k 12288 57 0 0 2 0 2 2 0 8 0 mcl9k 9216 46 0 0 3 1 2 2 0 8 0 mcl8k 8192 25 0 0 4 1 3 3 0 8 0 mcl4k 4096 49 0 0 7 4 3 3 0 8 0 mcl2k2 2112 8 0 0 1 0 1 1 0 8 0 mcl2k 2048 152 0 0 13 3 10 13 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 783 0 0 12 1 11 11 0 8 0 bufpl 256 22775 0 15806 436 0 436 436 0 8 0 anonpl 16 1379855 0 1373997 272 233 39 42 0 125 3 amapchunkpl 152 92293 0 92198 326 321 5 96 0 158 0 amappl16 192 69694 0 69430 341 317 24 27 0 8 5 amappl15 184 2283 0 2277 1 0 1 1 0 8 0 amappl14 176 2462 0 2457 6 5 1 1 0 8 0 amappl13 168 1987 0 1984 1 0 1 1 0 8 0 amappl12 160 1067 0 1055 1 0 1 1 0 8 0 amappl11 152 2717 0 2708 1 0 1 1 0 8 0 amappl10 144 2240 0 2235 2 1 1 1 0 8 0 amappl9 136 1769 0 1768 1 0 1 1 0 8 0 amappl8 128 3370 0 3289 3 0 3 3 0 8 0 amappl7 120 1970 0 1960 1 0 1 1 0 8 0 amappl6 112 2081 0 2068 1 0 1 1 0 8 0 amappl5 104 2336 0 2321 1 0 1 1 0 8 0 amappl4 96 1994 0 1961 2 1 1 2 0 8 0 amappl3 88 891 0 886 1 0 1 1 0 8 0 amappl2 80 105319 0 105242 2 0 2 2 0 8 0 amappl1 72 311880 0 311410 23 13 10 18 0 8 0 amappl 72 36691 0 36651 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 143 0 14 3 0 3 3 0 8 0 uaddrrnd 24 12140 0 12123 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 12140 0 12123 1 0 1 1 0 8 0 vmmpekpl 168 103639 0 103614 2 0 2 2 0 8 0 vmmpepl 168 1395667 0 1394158 335 261 74 86 0 357 2 vmsppl 360 12139 0 12123 2 0 2 2 0 8 0 pdppl 4096 24287 0 24246 6 0 6 6 0 8 0 pvpl 32 3584007 0 3574706 624 514 110 122 0 265 22 pmappl 224 12139 0 12123 59 57 2 2 0 8 1 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 617 0 14 18 0 18 18 0 8 0