panic: Thread 0xffff800020b92018 cannot exit while holding sleeplocks Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 237262 3560 32767 0x10 0x480 1 syz-executor0 * 20810 46529 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(e7f8ba3a3ea889b2) 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 0xffff800020b92018 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(e7f8ba3a3ea889b2) 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 0xffff800020b67760 rbx 0xffff800020b67800 rdx 0xffffffff81ec7571 cmd0646_9_tim_udma+0x1299c rcx 0 rax 0 r8 0xffffffff81928b04 kprintf+0x174 r9 0x1 r10 0x14ff993224e7729b r11 0x65adc8299bc9354a r12 0x3000000008 r13 0xffff800020b67770 r14 0x100 r15 0x1 rip 0xffffffff810e9c38 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020b67750 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (reaper) pid=20810 stat=onproc flags process=14000 proc=200 pri=4, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff800020b21068,0xffff800020b219d8 process=0xffff800020b5b3b8 user=0xffff800020b62000, vmspace=0xffffffff82312950 estcpu=1, cpticks=4, pctcpu=0.22 user=0, sys=3, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 3560 237262 92375 32767 7 0x490 syz-executor0 3560 12521 92375 32767 3 0x4000090 ttyin syz-executor0 3560 433109 92375 32767 3 0x4000090 fsleep syz-executor0 71847 515535 53805 32767 2 0x490 syz-executor1 53805 465553 37052 0 3 0x82 wait syz-executor1 92375 263035 97040 32767 2 0x490 syz-executor0 97040 435677 37052 0 3 0x82 wait syz-executor0 68448 468398 0 0 3 0x14200 bored sosplice 37052 281501 5078 0 3 0x82 thrsleep syz-fuzzer 37052 422867 5078 0 3 0x4000082 thrsleep syz-fuzzer 37052 120795 5078 0 3 0x4000082 thrsleep syz-fuzzer 37052 344100 5078 0 3 0x4000082 thrsleep syz-fuzzer 37052 510063 5078 0 3 0x4000082 thrsleep syz-fuzzer 37052 320382 5078 0 3 0x4000082 kqread syz-fuzzer 37052 352227 5078 0 3 0x4000082 thrsleep syz-fuzzer 37052 152918 5078 0 3 0x4000082 thrsleep syz-fuzzer 37052 225269 5078 0 3 0x4000082 thrsleep syz-fuzzer 37052 67576 5078 0 3 0x4000082 thrsleep syz-fuzzer 5078 243417 42923 0 3 0x10008a pause ksh 42923 489683 16518 0 3 0x92 select sshd 7836 340209 1 0 3 0x100083 ttyin getty 16518 151446 1 0 3 0x80 select sshd 25391 500651 50148 73 2 0x100010 syslogd 50148 69465 1 0 3 0x100082 netio syslogd 25289 197794 1 77 3 0x100090 poll dhclient 55862 358291 1 0 3 0x80 poll dhclient 76149 10894 0 0 3 0x14200 pgzero zerothread 80481 308715 0 0 3 0x14200 aiodoned aiodoned 75700 28909 0 0 3 0x14200 syncer update 94166 195486 0 0 3 0x14200 cleaner cleaner *46529 20810 0 0 7 0x14200 reaper 18713 85506 0 0 3 0x14200 pgdaemon pagedaemon 64575 306956 0 0 3 0x14200 bored crynlk 43624 75520 0 0 3 0x14200 bored crypto 40449 390128 0 0 3 0x40014200 acpi0 acpi0 2928 436733 0 0 3 0x40014200 idle1 37849 466947 0 0 3 0x14200 bored softnet 37259 390647 0 0 3 0x14200 bored systqmp 75248 484765 0 0 3 0x14200 bored systq 39531 274448 0 0 3 0x40014200 bored softclock 559 283260 0 0 3 0x40014200 idle0 1 9204 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks CPU 1: exclusive mutex /syzkaller/managers/setuid/kernel/sys/kern/kern_timeout.c:92 r = 0 (0xffffffff821b0f38) locked @ /syzkaller/managers/setuid/kernel/sys/kern/kern_timeout.c:315 Process 25391 (syslogd) thread 0xffff800020be59d8 (500651) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff822fe250) locked @ /syzkaller/managers/setuid/kernel/sys/kern/sched_bsd.c:429 exclusive rrwlock inode r = 0 (0xfffffd806ebb6098) 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 9462 6321K 6321K 78643K 13259 0 0 pcb 23 9K 11K 78643K 11503 0 0 rtable 97 3K 3K 78643K 17513 0 0 ifaddr 37 22K 29K 78643K 3327 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 655 0 0 iov 0 0K 32K 78643K 1672 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1202 75K 75K 78643K 17983 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 289 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 1K 78643K 1743 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1792 194K 288K 78643K 12592 0 0 file desc 7 21K 33K 78643K 24025 0 0 sigio 0 0K 0K 78643K 416 0 0 proc 41 38K 70K 78643K 14490 0 0 subproc 68 69634K 71682K 78643K 18496 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 3406 0 0 in_multi 33 2K 2K 78643K 6831 0 0 ether_multi 1 0K 0K 78643K 201 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 4203 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 112 21K 61K 78643K 74419 0 0 UVM aobj 130 6K 6K 78643K 160 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 479 0 0 NDP 9 0K 0K 78643K 1635 0 0 temp 121 2362K 2442K 78643K 90441 0 0 kqueue 0 0K 0K 78643K 263 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 546 0 542 1 0 1 1 0 8 0 inpcbpl 280 10635 0 10628 1 0 1 1 0 8 0 plimitpl 152 1276 0 1267 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 4919 0 4879 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 4032 0 4028 1 0 1 1 0 8 0 nd6 48 1088 0 1084 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 22931 0 22740 29 16 13 13 0 8 1 art_table 32 22932 0 22740 2 0 2 2 0 8 0 art_node 16 4918 0 4884 1 0 1 1 0 8 0 sysvmsgpl 40 9 0 6 2 1 1 1 0 8 0 semapl 112 1741 0 1731 1 0 1 1 0 8 0 shmpl 112 158 0 30 5 1 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 32912 0 31058 60 0 60 60 0 8 0 ffsino 272 32912 0 31058 124 0 124 124 0 8 0 nchpl 144 65204 0 63623 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 245413 0 245413 5 4 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 169652 0 169652 128 127 1 6 0 8 1 sigapl 432 22566 0 22551 7 5 2 3 0 8 0 futexpl 56 234423 0 234422 8 7 1 1 0 8 0 knotepl 112 14871 0 14844 24 23 1 2 0 8 0 kqueuepl 104 6787 0 6785 1 0 1 1 0 8 0 pipepl 112 19154 0 19135 47 46 1 2 0 8 0 fdescpl 488 22567 0 22551 3 0 3 3 0 8 0 filepl 152 156215 0 156116 56 51 5 7 0 8 1 lockfpl 96 5261 0 5261 25 24 1 1 0 8 1 lockfspl 24 11182 0 11182 23 22 1 1 0 8 1 sessionpl 112 559 0 549 1 0 1 1 0 8 0 pgrppl 48 882 0 872 1 0 1 1 0 8 0 ucredpl 96 59017 0 59008 1 0 1 1 0 8 0 zombiepl 144 22551 0 22550 4 3 1 1 0 8 0 processpl 840 22582 0 22550 4 0 4 4 0 8 0 procpl 600 63628 0 63584 7 3 4 5 0 8 0 srpgc 64 3186 0 3186 83 82 1 1 0 8 1 sosppl 128 597 0 597 98 98 0 1 0 8 0 sockpl 384 22727 0 22710 27 24 3 4 0 8 1 mcl64k 65536 22 0 0 3 0 3 3 0 8 0 mcl16k 16384 33 0 0 5 3 2 3 0 8 0 mcl12k 12288 121 0 0 5 3 2 2 0 8 0 mcl9k 9216 73 0 0 3 1 2 2 0 8 0 mcl8k 8192 92 0 0 11 9 2 3 0 8 0 mcl4k 4096 57 0 0 4 1 3 3 0 8 0 mcl2k2 2112 27 0 0 2 1 1 2 0 8 0 mcl2k 2048 176 0 0 13 5 8 13 0 8 0 mtagpl 80 2 0 0 1 0 1 1 0 8 0 mbufpl 256 1147 0 0 10 0 10 10 0 8 0 bufpl 256 39257 0 32288 436 0 436 436 0 8 0 anonpl 16 2444158 0 2439198 396 357 39 44 0 125 0 amapchunkpl 152 179001 0 178915 832 821 11 189 0 158 6 amappl16 192 126819 0 126557 743 726 17 28 0 8 0 amappl15 184 3940 0 3938 48 47 1 1 0 8 0 amappl14 176 4159 0 4154 2 1 1 1 0 8 0 amappl13 168 3263 0 3260 1 0 1 1 0 8 0 amappl12 160 3241 0 3237 1 0 1 1 0 8 0 amappl11 152 4923 0 4914 1 0 1 1 0 8 0 amappl10 144 2263 0 2256 1 0 1 1 0 8 0 amappl9 136 2901 0 2900 1 0 1 1 0 8 0 amappl8 128 7625 0 7520 4 0 4 4 0 8 0 amappl7 120 3259 0 3249 1 0 1 1 0 8 0 amappl6 112 2831 0 2814 1 0 1 1 0 8 0 amappl5 104 4041 0 4030 1 0 1 1 0 8 0 amappl4 96 4563 0 4524 3 1 2 2 0 8 0 amappl3 88 2211 0 2202 1 0 1 1 0 8 0 amappl2 80 197338 0 197258 2 0 2 2 0 8 0 amappl1 72 574203 0 573755 24 14 10 19 0 8 0 amappl 72 67941 0 67906 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 159 0 30 3 0 3 3 0 8 0 uaddrrnd 24 22567 0 22551 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 22567 0 22551 1 0 1 1 0 8 0 vmmpekpl 168 186973 0 186946 2 0 2 2 0 8 0 vmmpepl 168 2602457 0 2601020 507 428 79 88 0 357 6 vmsppl 360 22566 0 22551 2 0 2 2 0 8 0 pdppl 4096 45141 0 45102 6 0 6 6 0 8 0 pvpl 32 6555944 0 6547777 1072 977 95 126 0 265 0 pmappl 224 22566 0 22551 97 95 2 2 0 8 1 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 653 0 40 18 0 18 18 0 8 0