panic: thread 0xffff800020b92720 cannot exit while holding sleeplocks Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *390399 50797 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(e41b0ea4df1c3ebc) 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 0xffff800020b92720 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(e41b0ea4df1c3ebc) 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 0xffff800020b675c0 rbx 0xffff800020b67660 rdx 0xffffffff81ec88ae cmd0646_9_tim_udma+0x18cbf rcx 0 rax 0 r8 0xffffffff81aa9b64 kprintf+0x174 r9 0x1 r10 0x39f993c751aa937b r11 0xd0fbc32d7c44778 r12 0x3000000008 r13 0xffff800020b675d0 r14 0x100 r15 0x1 rip 0xffffffff819d4fa8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020b675b0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (reaper) pid=390399 stat=onproc flags process=14000 proc=200 pri=4, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff800020b21518,0xffff800020b219d8 process=0xffff800020b5ad28 user=0xffff800020b62000, vmspace=0xffffffff822dc6f0 estcpu=1, cpticks=2, pctcpu=0.29 user=0, sys=3, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 26141 309525 90118 32767 3 0x90 piperd syz-executor0 90118 318607 46776 0 3 0x82 wait syz-executor0 58640 109442 32269 32767 3 0x90 nanosleep syz-executor1 32269 349153 46776 0 3 0x82 wait syz-executor1 97863 189591 0 0 3 0x14200 bored sosplice 46776 381717 23608 0 3 0x82 thrsleep syz-fuzzer 46776 388330 23608 0 3 0x4000082 thrsleep syz-fuzzer 46776 66304 23608 0 3 0x4000082 thrsleep syz-fuzzer 46776 400673 23608 0 3 0x4000082 thrsleep syz-fuzzer 46776 517438 23608 0 3 0x4000082 thrsleep syz-fuzzer 46776 453184 23608 0 3 0x4000082 kqread syz-fuzzer 46776 270883 23608 0 3 0x4000082 thrsleep syz-fuzzer 46776 512211 23608 0 3 0x4000082 thrsleep syz-fuzzer 46776 260599 23608 0 3 0x4000082 thrsleep syz-fuzzer 46776 254221 23608 0 3 0x4000082 thrsleep syz-fuzzer 46776 384951 23608 0 3 0x4000082 thrsleep syz-fuzzer 23608 363281 7252 0 3 0x10008a pause ksh 7252 482586 3960 0 3 0x92 select sshd 22208 314948 1 0 3 0x100083 ttyin getty 3960 175033 1 0 3 0x80 select sshd 5501 384126 6948 73 3 0x100010 ffs_fsync syslogd 6948 430960 1 0 3 0x100082 netio syslogd 35749 12293 1 77 3 0x100090 poll dhclient 26742 168825 1 0 3 0x80 poll dhclient 55090 412028 0 0 3 0x14200 pgzero zerothread 24699 505378 0 0 3 0x14200 aiodoned aiodoned 97993 99736 0 0 3 0x14200 syncer update 531 421296 0 0 3 0x14200 cleaner cleaner *50797 390399 0 0 7 0x14200 reaper 11491 220415 0 0 3 0x14200 pgdaemon pagedaemon 53887 298633 0 0 3 0x14200 bored crynlk 74313 478335 0 0 3 0x14200 bored crypto 10909 302982 0 0 3 0x40014200 acpi0 acpi0 52169 308493 0 0 3 0x40014200 idle1 37599 284582 0 0 3 0x14200 bored softnet 6433 507285 0 0 3 0x14200 bored systqmp 71822 515244 0 0 3 0x14200 bored systq 64643 56647 0 0 3 0x40014200 bored softclock 33971 456875 0 0 7 0x40014200 idle0 1 489245 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 5501 (syslogd) thread 0xffff800020be5528 (384126) exclusive rrwlock inode r = 0 (0xfffffd806ebc91a8) 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 9463 6321K 6321K 78643K 14065 0 0 pcb 23 9K 12K 78643K 14995 0 0 rtable 97 3K 3K 78643K 22665 0 0 ifaddr 37 22K 29K 78643K 4299 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 867 0 0 iov 0 0K 32K 78643K 2131 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 75K 78643K 21873 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 360 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 1K 78643K 2330 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1792 194K 288K 78643K 12592 0 0 file desc 7 21K 33K 78643K 30024 0 0 sigio 0 0K 0K 78643K 436 0 0 proc 41 38K 78K 78643K 18490 0 0 subproc 68 69634K 69634K 78643K 23970 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 4437 0 0 in_multi 33 2K 2K 78643K 8811 0 0 ether_multi 1 0K 0K 78643K 243 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 5369 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 104 21K 41K 78643K 93030 0 0 UVM aobj 130 4K 5K 78643K 171 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 658 0 0 NDP 5 0K 0K 78643K 2118 0 0 temp 121 2362K 2436K 78643K 113889 0 0 kqueue 0 0K 0K 78643K 331 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 707 0 703 1 0 1 1 0 8 0 inpcbpl 280 12910 0 12903 1 0 1 1 0 8 0 plimitpl 152 1711 0 1702 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 6368 0 6328 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 11 0 11 2 2 0 1 0 8 0 tcpcb 544 5158 0 5154 1 0 1 1 0 8 0 nd6 48 1410 0 1406 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 29673 0 29478 60 47 13 13 0 8 0 art_table 32 29674 0 29478 2 0 2 2 0 8 0 art_node 16 6367 0 6333 1 0 1 1 0 8 0 sysvmsgpl 40 18 0 14 1 0 1 1 0 8 0 semapl 112 2326 0 2316 1 0 1 1 0 8 0 shmpl 112 169 0 41 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 40031 0 38021 66 1 65 65 0 8 0 ffsino 272 40031 0 38021 136 1 135 135 0 8 0 nchpl 144 79906 0 78330 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 306224 0 306224 4 3 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 210489 0 210488 123 122 1 6 0 8 0 sigapl 432 28082 0 28067 6 4 2 3 0 8 0 futexpl 56 284979 0 284979 3 2 1 1 0 8 1 knotepl 112 19029 0 19002 27 26 1 2 0 8 0 kqueuepl 104 8350 0 8348 1 0 1 1 0 8 0 pipepl 112 25246 0 25227 66 65 1 2 0 8 0 fdescpl 488 28083 0 28067 3 0 3 3 0 8 1 filepl 152 191656 0 191557 70 65 5 7 0 8 0 lockfpl 96 6873 0 6873 38 38 0 1 0 8 0 lockfspl 24 15014 0 15014 30 30 0 1 0 8 0 sessionpl 112 720 0 710 1 0 1 1 0 8 0 pgrppl 48 990 0 980 1 0 1 1 0 8 0 ucredpl 96 69541 0 69532 1 0 1 1 0 8 0 zombiepl 144 28068 0 28067 4 3 1 1 0 8 0 processpl 840 28098 0 28067 4 0 4 4 0 8 0 procpl 600 79214 0 79171 13 9 4 5 0 8 0 srpgc 64 4134 0 4134 96 96 0 1 0 8 0 sosppl 128 616 0 616 128 128 0 1 0 8 0 sockpl 384 28546 0 28529 41 38 3 4 0 8 1 mcl64k 65536 62 0 0 5 2 3 3 0 8 0 mcl16k 16384 37 0 0 5 3 2 3 0 8 0 mcl12k 12288 102 0 0 3 1 2 2 0 8 0 mcl9k 9216 76 0 0 3 1 2 2 0 8 0 mcl8k 8192 50 0 0 6 3 3 3 0 8 0 mcl4k 4096 40 0 0 4 2 2 3 0 8 0 mcl2k2 2112 31 0 0 2 1 1 2 0 8 0 mcl2k 2048 193 0 0 15 7 8 15 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 1546 0 0 12 1 11 11 0 8 0 bufpl 256 46927 0 39958 436 0 436 436 0 8 0 anonpl 16 3027618 0 3021542 404 362 42 48 0 125 3 amapchunkpl 152 204655 0 204557 583 576 7 97 0 158 2 amappl16 192 151799 0 151547 653 628 25 27 0 8 8 amappl15 184 5284 0 5283 1 0 1 1 0 8 0 amappl14 176 5082 0 5079 2 1 1 1 0 8 0 amappl13 168 4633 0 4630 1 0 1 1 0 8 0 amappl12 160 3866 0 3853 1 0 1 1 0 8 0 amappl11 152 6599 0 6586 1 0 1 1 0 8 0 amappl10 144 3726 0 3723 1 0 1 1 0 8 0 amappl9 136 3988 0 3987 1 0 1 1 0 8 0 amappl8 128 9327 0 9232 4 0 4 4 0 8 0 amappl7 120 4536 0 4525 1 0 1 1 0 8 0 amappl6 112 4211 0 4194 1 0 1 1 0 8 0 amappl5 104 5107 0 5096 1 0 1 1 0 8 0 amappl4 96 4195 0 4138 6 4 2 2 0 8 0 amappl3 88 2309 0 2303 1 0 1 1 0 8 0 amappl2 80 244639 0 244549 3 0 3 3 0 8 0 amappl1 72 710410 0 709954 24 14 10 19 0 8 0 amappl 72 84749 0 84708 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 170 0 41 3 0 3 3 0 8 0 uaddrrnd 24 28083 0 28067 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 28083 0 28067 1 0 1 1 0 8 0 vmmpekpl 168 236570 0 236546 2 0 2 2 0 8 0 vmmpepl 168 3248903 0 3247427 622 543 79 84 0 357 4 vmsppl 360 28082 0 28067 2 0 2 2 0 8 0 pdppl 4096 56173 0 56134 9 3 6 6 0 8 1 pvpl 32 8162127 0 8152312 1373 1261 112 126 0 265 23 pmappl 224 28082 0 28067 147 146 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 699 0 74 18 0 18 18 0 8 0