panic: Thread 0xffff800020b92270 cannot exit while holding sleeplocks Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 143990 47844 0 0x2 0x480 1 syz-executor1 * 85940 58828 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(5f9cba2bd657ac20) 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 0xffff800020b92270 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(5f9cba2bd657ac20) 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 0xffff800020b67360 rbx 0xffff800020b67400 rdx 0xffffffff81f2c6de apollo_pio_rec+0x8cd7 rcx 0 rax 0 r8 0xffffffff810055d4 kprintf+0x174 r9 0x1 r10 0x3bc218702049c784 r11 0x7a10a9c653d35975 r12 0x3000000008 r13 0xffff800020b67370 r14 0x100 r15 0x1 rip 0xffffffff813eeb68 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020b67350 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (reaper) pid=85940 stat=onproc flags process=14000 proc=200 pri=4, usrpri=54, nice=20 forw=0xffffffffffffffff, list=0xffff800020b21068,0xffff800020b219d8 process=0xffff800020b5a9e0 user=0xffff800020b62000, vmspace=0xffffffff822f8848 estcpu=4, cpticks=3, pctcpu=0.34 user=0, sys=3, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 21646 157362 47844 0 2 0 syz-executor1 21646 148393 47844 0 3 0x4000080 ttyout syz-executor1 21646 25349 47844 0 2 0x4000000 syz-executor1 55413 70730 1 0 3 0x100083 ttyin getty 89363 3861 0 0 3 0x14200 bored sosplice 47844 143990 65767 0 7 0x482 syz-executor1 16160 426899 65767 0 2 0x482 syz-executor0 65767 429844 82830 0 3 0x82 thrsleep syz-fuzzer 65767 517034 82830 0 3 0x4000082 thrsleep syz-fuzzer 65767 144344 82830 0 3 0x4000082 thrsleep syz-fuzzer 65767 201687 82830 0 3 0x4000082 thrsleep syz-fuzzer 65767 128662 82830 0 3 0x4000082 thrsleep syz-fuzzer 65767 370077 82830 0 3 0x4000082 thrsleep syz-fuzzer 65767 112897 82830 0 3 0x4000082 thrsleep syz-fuzzer 65767 406553 82830 0 3 0x4000082 kqread syz-fuzzer 65767 105245 82830 0 3 0x4000082 thrsleep syz-fuzzer 65767 185047 82830 0 3 0x4000082 thrsleep syz-fuzzer 82830 301680 47557 0 3 0x10008a pause ksh 47557 233168 47774 0 3 0x92 select sshd 47774 276604 1 0 3 0x80 select sshd 17422 85336 48562 73 2 0x100010 syslogd 48562 80082 1 0 3 0x100082 netio syslogd 12017 145796 1 77 3 0x100090 poll dhclient 68665 446879 1 0 3 0x80 poll dhclient 88958 359715 0 0 2 0x14200 zerothread 65980 92571 0 0 3 0x14200 aiodoned aiodoned 84428 322576 0 0 3 0x14200 syncer update 56776 299407 0 0 3 0x14200 cleaner cleaner *58828 85940 0 0 7 0x14200 reaper 77324 108330 0 0 3 0x14200 pgdaemon pagedaemon 68610 113295 0 0 3 0x14200 bored crynlk 29495 324883 0 0 3 0x14200 bored crypto 43169 244216 0 0 3 0x40014200 acpi0 acpi0 54189 208746 0 0 3 0x40014200 idle1 62014 293047 0 0 3 0x14200 bored softnet 12708 335592 0 0 3 0x14200 bored systqmp 94537 165210 0 0 3 0x14200 bored systq 48845 319416 0 0 3 0x40014200 bored softclock 76855 387393 0 0 3 0x40014200 idle0 1 189205 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 17422 (syslogd) thread 0xffff800020be5c30 (85336) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff822efac0) locked @ /syzkaller/managers/multicore/kernel/sys/kern/sched_bsd.c:429 exclusive rrwlock inode r = 0 (0xfffffd806eb9d2b8) locked @ /syzkaller/managers/multicore/kernel/sys/ufs/ufs/ufs_vnops.c:1547 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9586 10478K 10486K 78643K 14332 0 0 pcb 23 9K 11K 78643K 8785 0 0 rtable 100 3K 4K 78643K 1672 0 0 ifaddr 77 22K 26K 78643K 969 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 20 0 0 iov 0 0K 32K 78643K 1650 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1194 75K 76K 78643K 11840 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 269 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 1K 78643K 1629 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1792 194K 288K 78643K 12592 0 0 file desc 6 17K 25K 78643K 16672 0 0 sigio 0 0K 0K 78643K 284 0 0 proc 42 38K 70K 78643K 2755 0 0 subproc 64 65538K 67586K 78643K 218 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 2140 0 0 in_multi 33 2K 2K 78643K 718 0 0 ether_multi 1 0K 0K 78643K 94 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 144 636K 636K 78643K 144 0 0 exec 0 0K 1K 78643K 1415 0 0 pfkey data 0 0K 4K 78643K 23 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 155 24K 43K 78643K 53820 0 0 UVM aobj 130 5K 5K 78643K 147 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 1K 78643K 495 0 0 NDP 18 0K 0K 78643K 269 0 0 temp 212 2364K 2444K 78643K 46689 0 0 kqueue 0 0K 0K 78643K 215 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 4 0 0 1 0 1 1 0 8 0 inpcbpl 280 7595 0 7588 2 1 1 2 0 8 0 plimitpl 152 182 0 175 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 41 0 1 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 2650 0 2646 1 0 1 1 0 8 0 nd6 48 4 0 0 1 0 1 1 0 8 0 ppxss 1128 175 0 175 61 61 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 185 0 0 12 0 12 12 0 8 0 art_table 32 186 0 0 2 0 2 2 0 8 0 art_node 16 40 0 6 1 0 1 1 0 8 0 sysvmsgpl 40 34 0 17 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 1627 0 1617 1 0 1 1 0 8 0 shmpl 112 145 0 17 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 33931 0 32207 58 2 56 56 0 8 0 ffsino 272 33931 0 32207 117 1 116 116 0 8 0 nchpl 144 58589 0 57011 62 2 60 60 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 185806 0 185806 3 2 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 56 0 56 44 44 0 1 0 8 0 scxspl 192 164807 0 164807 62 61 1 6 0 8 1 sigapl 432 16842 0 16828 2 0 2 2 0 8 0 futexpl 56 198943 0 198943 3 2 1 1 0 8 1 knotepl 112 4673 0 4646 33 32 1 2 0 8 0 kqueuepl 104 6074 0 6072 1 0 1 1 0 8 0 pipepl 112 11258 0 11239 27 26 1 2 0 8 0 fdescpl 488 16843 0 16828 3 1 2 3 0 8 0 filepl 152 107650 0 107551 21 16 5 7 0 8 0 lockfpl 96 3983 0 3983 30 29 1 1 0 8 1 lockfspl 24 7832 0 7832 29 28 1 1 0 8 1 sessionpl 112 20 0 10 1 0 1 1 0 8 0 pgrppl 48 183 0 173 1 0 1 1 0 8 0 ucredpl 96 39349 0 39342 1 0 1 1 0 8 0 zombiepl 144 16829 0 16828 4 3 1 1 0 8 0 processpl 840 16858 0 16828 4 0 4 4 0 8 0 procpl 600 52354 0 52312 5 1 4 5 0 8 0 sosppl 128 374 0 374 76 76 0 1 0 8 0 sockpl 384 15965 0 15948 17 14 3 4 0 8 1 mcl64k 65536 1962 0 0 116 51 65 66 0 8 1 mcl16k 16384 18 0 0 3 1 2 3 0 8 0 mcl12k 12288 57 0 0 2 0 2 2 0 8 0 mcl9k 9216 65 0 0 3 1 2 2 0 8 0 mcl8k 8192 49 0 0 5 2 3 3 0 8 0 mcl4k 4096 33 0 0 5 2 3 3 0 8 0 mcl2k2 2112 25 0 0 2 0 2 2 0 8 0 mcl2k 2048 130 0 0 13 1 12 13 0 8 0 mtagpl 80 4 0 0 1 0 1 1 0 8 0 mbufpl 256 2022 0 0 39 0 39 39 0 8 0 bufpl 256 31278 0 24309 436 0 436 436 0 8 0 anonpl 16 1952392 0 1944819 524 477 47 47 0 125 11 amapchunkpl 152 105616 0 105520 302 297 5 97 0 158 0 amappl16 192 116026 0 115638 834 806 28 32 0 8 8 amappl15 184 8280 0 8277 1 0 1 1 0 8 0 amappl14 176 4 0 2 2 1 1 1 0 8 0 amappl13 168 23 0 20 1 0 1 1 0 8 0 amappl12 160 27 0 25 1 0 1 1 0 8 0 amappl11 152 186 0 177 1 0 1 1 0 8 0 amappl10 144 60 0 59 2 1 1 1 0 8 0 amappl9 136 350 0 349 1 0 1 1 0 8 0 amappl8 128 390 0 300 3 0 3 3 0 8 0 amappl7 120 36 0 29 1 0 1 1 0 8 0 amappl6 112 54 0 47 1 0 1 1 0 8 0 amappl5 104 257 0 246 1 0 1 1 0 8 0 amappl4 96 8748 0 8722 2 1 1 2 0 8 0 amappl3 88 1273 0 1266 1 0 1 1 0 8 0 amappl2 80 167672 0 167613 2 0 2 2 0 8 0 amappl1 72 372676 0 372222 22 12 10 18 0 8 0 amappl 72 52874 0 52835 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 146 0 17 3 0 3 3 0 8 0 uaddrrnd 24 16843 0 16828 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 16843 0 16828 1 0 1 1 0 8 0 vmmpekpl 168 140985 0 140962 2 0 2 2 0 8 0 vmmpepl 168 1809518 0 1807998 523 448 75 77 0 357 8 vmsppl 360 16842 0 16828 2 0 2 2 0 8 0 pdppl 4096 33693 0 33656 6 1 5 6 0 8 0 pvpl 32 4767996 0 4757247 833 710 123 131 0 265 28 pmappl 224 16842 0 16828 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 762 0 63 20 0 20 20 0 8 0