panic: thread 0xffff800020b93080 cannot exit while holding sleeplocks Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 206772 16017 0 0x2 0x4000080 1 syz-fuzzer *352781 10153 0 0x14000 0x200 0 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(749fb9856123bf6e) 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{0}> ddb{0}> set $lines = 0 ddb{0}> show panic thread 0xffff800020b93080 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+0x16c sys/kern/subr_prf.c:208 witness_thread_exit(749fb9856123bf6e) 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{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800020b67cf0 rbx 0xffff800020b67d90 rdx 0xffffffff81ec88ae cmd0646_9_tim_udma+0x18cbf rcx 0 rax 0 r8 0xffffffff81aa9b64 kprintf+0x174 r9 0x1 r10 0x14ed67fcf731b253 r11 0x49f83565f28a8641 r12 0x3000000008 r13 0xffff800020b67d00 r14 0x100 r15 0x1 rip 0xffffffff819d4fa8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020b67ce0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (reaper) pid=352781 stat=onproc flags process=14000 proc=200 pri=4, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff800020b21068,0xffff800020b21780 process=0xffff800020b5b3b8 user=0xffff800020b62000, vmspace=0xffffffff822dc6f0 estcpu=1, cpticks=3, pctcpu=0.24 user=0, sys=3, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 96905 217995 92594 32767 2 0x10 syz-executor1 92594 440999 16017 0 3 0x82 wait syz-executor1 87159 496660 50219 32767 2 0x490 syz-executor0 50219 320667 16017 0 3 0x82 wait syz-executor0 41892 64905 0 0 3 0x14200 bored sosplice 16017 246142 4585 0 3 0x82 thrsleep syz-fuzzer 16017 414869 4585 0 2 0x4000482 syz-fuzzer 16017 295103 4585 0 3 0x4000082 thrsleep syz-fuzzer 16017 238517 4585 0 3 0x4000082 thrsleep syz-fuzzer 16017 480621 4585 0 3 0x4000082 thrsleep syz-fuzzer 16017 228525 4585 0 3 0x4000082 thrsleep syz-fuzzer 16017 289483 4585 0 3 0x4000082 thrsleep syz-fuzzer 16017 206772 4585 0 7 0x4000082 syz-fuzzer 16017 435411 4585 0 3 0x4000082 thrsleep syz-fuzzer 16017 460498 4585 0 3 0x4000082 thrsleep syz-fuzzer 4585 133012 25741 0 3 0x10008a pause ksh 25741 199376 28226 0 3 0x92 select sshd 61939 466171 1 0 3 0x100083 ttyin getty 28226 98667 1 0 3 0x80 select sshd 51879 510362 66157 73 3 0x100010 ffs_fsync syslogd 66157 510346 1 0 3 0x100082 netio syslogd 2779 477707 1 77 3 0x100090 poll dhclient 66845 31665 1 0 3 0x80 poll dhclient 26560 368060 0 0 3 0x14200 pgzero zerothread 8923 33942 0 0 3 0x14200 aiodoned aiodoned 65004 3906 0 0 3 0x14200 syncer update 33320 1773 0 0 3 0x14200 cleaner cleaner *10153 352781 0 0 7 0x14200 reaper 21264 412460 0 0 3 0x14200 pgdaemon pagedaemon 30295 300484 0 0 3 0x14200 bored crynlk 75847 126351 0 0 3 0x14200 bored crypto 69427 417838 0 0 3 0x40014200 acpi0 acpi0 971 469420 0 0 3 0x40014200 idle1 91762 373629 0 0 3 0x14200 bored softnet 44854 391212 0 0 3 0x14200 bored systqmp 43488 158758 0 0 3 0x14200 bored systq 72026 386014 0 0 3 0x40014200 bored softclock 21301 429919 0 0 3 0x40014200 idle0 1 211649 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 96905 (syz-executor1) thread 0xffff800020b92018 (217995) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff8231e5d8) locked @ /syzkaller/managers/setuid/kernel/sys/kern/sched_bsd.c:429 exclusive rrwlock inode r = 0 (0xfffffd80678925f8) locked @ /syzkaller/managers/setuid/kernel/sys/ufs/ufs/ufs_ihash.c:140 exclusive rrwlock inode r = 0 (0xfffffd807cdd6808) locked @ /syzkaller/managers/setuid/kernel/sys/ufs/ufs/ufs_vnops.c:1547 Process 51879 (syslogd) thread 0xffff800020be5c30 (510362) exclusive rrwlock inode r = 0 (0xfffffd806eba33c8) locked @ /syzkaller/managers/setuid/kernel/sys/ufs/ufs/ufs_vnops.c:1547 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9461 6321K 6321K 78643K 10618 0 0 pcb 23 9K 10K 78643K 423 0 0 rtable 97 3K 3K 78643K 617 0 0 ifaddr 34 10K 10K 78643K 120 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 33 0 0 iov 0 0K 16K 78643K 75 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 75K 78643K 1967 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 7 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 1K 78643K 77 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1792 194K 288K 78643K 12592 0 0 file desc 7 21K 33K 78643K 988 0 0 sigio 0 0K 0K 78643K 16 0 0 proc 41 38K 70K 78643K 612 0 0 subproc 68 69634K 69634K 78643K 544 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 124 0 0 in_multi 33 2K 2K 78643K 219 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 66 291K 291K 78643K 66 0 0 exec 0 0K 1K 78643K 274 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 86 20K 29K 78643K 3753 0 0 UVM aobj 41 2K 2K 78643K 47 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 17 0 0 NDP 7 0K 0K 78643K 51 0 0 temp 108 2355K 2421K 78643K 5762 0 0 kqueue 0 0K 0K 78643K 11 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 18 0 14 1 0 1 1 0 8 0 inpcbpl 280 371 0 364 1 0 1 1 0 8 0 plimitpl 152 49 0 40 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 167 0 127 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 163 0 159 1 0 1 1 0 8 0 nd6 48 32 0 28 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 770 0 582 12 0 12 12 0 8 0 art_table 32 771 0 582 2 0 2 2 0 8 0 art_node 16 166 0 132 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 71 0 61 1 0 1 1 0 8 0 shmpl 112 45 0 6 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2927 0 1527 46 0 46 46 0 8 0 ffsino 272 2927 0 1527 94 0 94 94 0 8 0 nchpl 144 4403 0 2834 59 0 59 59 0 8 0 uvmvnodes 72 3208 0 0 59 0 59 59 0 8 0 vnodes 200 3208 0 0 169 0 169 169 0 8 0 namei 1024 15197 0 15197 1 0 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 10109 0 10108 11 7 4 6 0 8 3 sigapl 432 1113 0 1098 3 1 2 3 0 8 0 futexpl 56 10371 0 10371 1 0 1 1 0 8 1 knotepl 112 525 0 498 3 2 1 2 0 8 0 kqueuepl 104 231 0 229 1 0 1 1 0 8 0 pipepl 112 704 0 685 4 3 1 2 0 8 0 fdescpl 488 1114 0 1098 3 0 3 3 0 8 0 filepl 152 8513 0 8415 6 1 5 5 0 8 1 lockfpl 96 168 0 168 3 2 1 1 0 8 1 lockfspl 24 426 0 426 2 1 1 1 0 8 1 sessionpl 112 31 0 21 1 0 1 1 0 8 0 pgrppl 48 47 0 37 1 0 1 1 0 8 0 ucredpl 96 4351 0 4342 1 0 1 1 0 8 0 zombiepl 144 1099 0 1098 2 1 1 1 0 8 0 processpl 840 1129 0 1098 4 0 4 4 0 8 0 procpl 600 2930 0 2886 4 0 4 4 0 8 0 srpgc 64 84 0 84 3 2 1 1 0 8 1 sosppl 128 9 0 9 4 4 0 1 0 8 0 sockpl 384 807 0 790 4 1 3 3 0 8 1 mcl64k 65536 2 0 0 1 0 1 1 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 5 0 0 1 0 1 1 0 8 0 mcl9k 9216 3 0 0 1 0 1 1 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 7 0 0 1 0 1 1 0 8 0 mcl2k2 2112 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 109 0 0 13 0 13 13 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 191 0 0 12 0 12 12 0 8 0 bufpl 256 6216 0 965 329 0 329 329 0 8 0 anonpl 16 108697 0 102960 71 41 30 40 0 125 6 amapchunkpl 152 6301 0 6205 18 13 5 9 0 158 0 amappl16 192 5032 0 4752 47 32 15 26 0 8 0 amappl15 184 309 0 305 1 0 1 1 0 8 0 amappl14 176 48 0 44 2 1 1 1 0 8 0 amappl13 168 167 0 164 1 0 1 1 0 8 0 amappl12 160 186 0 186 3 3 0 1 0 8 0 amappl11 152 244 0 235 1 0 1 1 0 8 0 amappl10 144 60 0 57 1 0 1 1 0 8 0 amappl9 136 346 0 343 1 0 1 1 0 8 0 amappl8 128 426 0 402 1 0 1 1 0 8 0 amappl7 120 188 0 178 1 0 1 1 0 8 0 amappl6 112 102 0 94 1 0 1 1 0 8 0 amappl5 104 441 0 429 1 0 1 1 0 8 0 amappl4 96 386 0 364 2 1 1 2 0 8 0 amappl3 88 325 0 318 1 0 1 1 0 8 0 amappl2 80 9147 0 9092 2 0 2 2 0 8 0 amappl1 72 35453 0 35021 23 13 10 19 0 8 0 amappl 72 3241 0 3201 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 46 0 6 1 0 1 1 0 8 0 uaddrrnd 24 1114 0 1098 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1114 0 1098 1 0 1 1 0 8 0 vmmpekpl 168 12434 0 12411 2 0 2 2 0 8 0 vmmpepl 168 129468 0 128160 103 35 68 72 0 357 7 vmsppl 360 1113 0 1098 2 0 2 2 0 8 0 pdppl 4096 2235 0 2196 6 0 6 6 0 8 0 pvpl 32 338223 0 329289 158 59 99 109 0 265 25 pmappl 224 1113 0 1098 7 5 2 2 0 8 1 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 478 0 2 14 0 14 14 0 8 0