panic: Thread 0xffff800020b93530 cannot exit while holding sleeplocks Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 268003 79606 32767 0x10 0 0K syz-executor0 *516293 83724 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(cef50a069115369c) 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(cef50a069115369c) 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 0xffff800020b66f40 rbx 0xffff800020b66fe0 rdx 0xffffffff81ec49f8 cmd0646_9_tim_udma+0x15dbb rcx 0 rax 0 r8 0xffffffff813ff014 kprintf+0x174 r9 0x1 r10 0x91b368d78b0acd0b r11 0xccdf804f27c7f582 r12 0x3000000008 r13 0xffff800020b66f50 r14 0x100 r15 0x1 rip 0xffffffff817251a8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020b66f30 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (reaper) pid=516293 stat=onproc flags process=14000 proc=200 pri=4, usrpri=54, nice=20 forw=0xffffffffffffffff, list=0xffff800020b20bb8,0xffff800020b21780 process=0xffff800020b5b3b8 user=0xffff800020b62000, vmspace=0xffffffff82302a88 estcpu=4, cpticks=3, pctcpu=0.51 user=0, sys=3, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 79606 268003 14179 32767 7 0x10 syz-executor0 79606 108645 14179 32767 2 0x4000010 syz-executor0 24507 105525 69107 32767 3 0x90 nanosleep syz-executor1 69107 15512 17877 0 3 0x82 wait syz-executor1 14179 506025 47923 32767 3 0x90 nanosleep syz-executor0 47923 129599 17877 0 3 0x82 wait syz-executor0 89085 202370 0 0 3 0x14200 bored sosplice 17877 513727 35969 0 3 0x82 kqread syz-fuzzer 17877 312773 35969 0 3 0x4000082 nanosleep syz-fuzzer 17877 239574 35969 0 3 0x4000082 thrsleep syz-fuzzer 17877 502105 35969 0 3 0x4000082 thrsleep syz-fuzzer 17877 384359 35969 0 3 0x4000082 thrsleep syz-fuzzer 17877 506451 35969 0 3 0x4000082 thrsleep syz-fuzzer 17877 444215 35969 0 3 0x4000082 thrsleep syz-fuzzer 17877 336139 35969 0 3 0x4000082 thrsleep syz-fuzzer 17877 402197 35969 0 2 0x4000082 syz-fuzzer 17877 164120 35969 0 3 0x4000082 thrsleep syz-fuzzer 35969 230793 35502 0 3 0x10008a pause ksh 35502 460558 43438 0 3 0x92 select sshd 3490 48286 1 0 3 0x100083 ttyin getty 43438 477211 1 0 3 0x80 select sshd 97919 216116 10854 73 2 0x100010 syslogd 10854 407438 1 0 3 0x100082 netio syslogd 71426 262684 1 77 3 0x100090 poll dhclient 2013 217022 1 0 3 0x80 poll dhclient 87068 245451 0 0 2 0x14200 zerothread 39925 503303 0 0 3 0x14200 aiodoned aiodoned 75107 306368 0 0 3 0x14200 syncer update 23260 294422 0 0 3 0x14200 cleaner cleaner *83724 516293 0 0 7 0x14200 reaper 28772 462404 0 0 3 0x14200 pgdaemon pagedaemon 68833 170985 0 0 3 0x14200 bored crynlk 52850 120690 0 0 3 0x14200 bored crypto 16286 18277 0 0 3 0x40014200 acpi0 acpi0 96370 484161 0 0 3 0x40014200 idle1 78379 66038 0 0 3 0x14200 bored softnet 77017 461627 0 0 3 0x14200 bored systqmp 51473 440322 0 0 3 0x14200 bored systq 7371 174876 0 0 3 0x40014200 bored softclock 47103 391813 0 0 3 0x40014200 idle0 1 133072 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 79606 (syz-executor0) thread 0xffff800020b92978 (268003) exclusive rwlock vmmaplk r = 0 (0xfffffd806e927020) locked @ /syzkaller/managers/setuid/kernel/sys/uvm/uvm_map.c:3194 exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82309cb8) locked @ /syzkaller/managers/setuid/kernel/sys/sys/syscall_mi.h:90 Process 97919 (syslogd) thread 0xffff800020be5c30 (216116) exclusive rrwlock inode r = 0 (0xfffffd806eb8a3c8) 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 12083 0 0 pcb 23 9K 12K 78643K 7325 0 0 rtable 97 3K 3K 78643K 9997 0 0 ifaddr 36 18K 21K 78643K 1898 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 322 0 0 iov 0 0K 32K 78643K 897 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 75K 78643K 10689 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 9K 78643K 171 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 1021 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1792 194K 288K 78643K 12592 0 0 file desc 7 21K 33K 78643K 13020 0 0 sigio 0 0K 0K 78643K 208 0 0 proc 41 38K 70K 78643K 8154 0 0 subproc 68 69634K 69634K 78643K 10506 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 1688 0 0 in_multi 33 2K 2K 78643K 3836 0 0 ether_multi 1 0K 0K 78643K 92 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 2482 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 120 22K 41K 78643K 40918 0 0 UVM aobj 130 4K 5K 78643K 153 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 306 0 0 NDP 5 0K 0K 78643K 930 0 0 temp 120 2358K 2438K 78643K 50988 0 0 kqueue 0 0K 0K 78643K 158 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 311 0 307 1 0 1 1 0 8 0 inpcbpl 280 5420 0 5413 1 0 1 1 0 8 0 plimitpl 152 750 0 741 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 2804 0 2764 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 9 0 9 1 1 0 1 0 8 0 tcpcb 544 2036 0 2032 1 0 1 1 0 8 0 nd6 48 618 0 614 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 13021 0 12830 15 3 12 13 0 8 0 art_table 32 13022 0 12830 2 0 2 2 0 8 0 art_node 16 2803 0 2769 1 0 1 1 0 8 0 sysvmsgpl 40 6 0 4 2 1 1 1 0 8 0 semapl 112 1019 0 1009 1 0 1 1 0 8 0 shmpl 112 151 0 23 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 18552 0 16897 54 0 54 54 0 8 0 ffsino 272 18552 0 16897 111 0 111 111 0 8 0 nchpl 144 36020 0 34447 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 133580 0 133580 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 92062 0 92062 57 56 1 6 0 8 1 sigapl 432 12266 0 12251 3 1 2 3 0 8 0 futexpl 56 121668 0 121668 2 1 1 1 0 8 1 knotepl 112 8372 0 8345 16 15 1 2 0 8 0 kqueuepl 104 3715 0 3713 1 0 1 1 0 8 0 pipepl 112 11300 0 11281 27 25 2 2 0 8 0 fdescpl 488 12267 0 12251 3 0 3 3 0 8 0 filepl 152 84419 0 84323 38 33 5 7 0 8 1 lockfpl 96 2460 0 2460 33 32 1 1 0 8 1 lockfspl 24 6468 0 6468 30 29 1 1 0 8 1 sessionpl 112 324 0 314 1 0 1 1 0 8 0 pgrppl 48 533 0 523 1 0 1 1 0 8 0 ucredpl 96 32794 0 32785 1 0 1 1 0 8 0 zombiepl 144 12251 0 12250 1 0 1 1 0 8 0 processpl 840 12282 0 12250 4 0 4 4 0 8 0 procpl 600 34489 0 34445 7 3 4 5 0 8 0 srpgc 64 1814 0 1814 46 45 1 1 0 8 1 sosppl 128 304 0 304 59 59 0 1 0 8 0 sockpl 384 13076 0 13059 27 24 3 4 0 8 1 mcl64k 65536 14 0 0 2 0 2 2 0 8 0 mcl16k 16384 15 0 0 2 0 2 2 0 8 0 mcl12k 12288 49 0 0 2 0 2 2 0 8 0 mcl9k 9216 57 0 0 3 1 2 2 0 8 0 mcl8k 8192 33 0 0 5 2 3 3 0 8 0 mcl4k 4096 33 0 0 5 2 3 3 0 8 0 mcl2k2 2112 13 0 0 1 0 1 1 0 8 0 mcl2k 2048 165 0 0 15 8 7 15 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 845 0 0 10 0 10 10 0 8 0 bufpl 256 22974 0 16005 436 0 436 436 0 8 0 anonpl 16 1346895 0 1341441 305 267 38 49 0 125 3 amapchunkpl 152 89310 0 89220 339 334 5 96 0 158 0 amappl16 192 69600 0 69353 423 400 23 26 0 8 8 amappl15 184 2174 0 2171 1 0 1 1 0 8 0 amappl14 176 1543 0 1537 2 1 1 1 0 8 0 amappl13 168 1991 0 1988 1 0 1 1 0 8 0 amappl12 160 1126 0 1116 1 0 1 1 0 8 0 amappl11 152 2718 0 2709 1 0 1 1 0 8 0 amappl10 144 1719 0 1715 1 0 1 1 0 8 0 amappl9 136 1657 0 1656 1 0 1 1 0 8 0 amappl8 128 3547 0 3454 4 0 4 4 0 8 0 amappl7 120 1992 0 1982 1 0 1 1 0 8 0 amappl6 112 1787 0 1769 1 0 1 1 0 8 0 amappl5 104 2123 0 2112 1 0 1 1 0 8 0 amappl4 96 2578 0 2547 2 1 1 2 0 8 0 amappl3 88 1305 0 1297 1 0 1 1 0 8 0 amappl2 80 106227 0 106148 2 0 2 2 0 8 0 amappl1 72 315614 0 315143 24 14 10 19 0 8 0 amappl 72 37072 0 37034 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 152 0 23 3 0 3 3 0 8 0 uaddrrnd 24 12267 0 12250 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 12267 0 12250 1 0 1 1 0 8 0 vmmpekpl 168 104587 0 104559 2 0 2 2 0 8 0 vmmpepl 168 1410223 0 1408712 347 270 77 83 0 357 6 vmsppl 360 12266 0 12250 2 0 2 2 0 8 0 pdppl 4096 24541 0 24500 6 0 6 6 0 8 0 pvpl 32 3630797 0 3622013 692 586 106 127 0 265 20 pmappl 224 12266 0 12250 61 59 2 2 0 8 1 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 616 0 18 18 0 18 18 0 8 0