panic: Thread 0xffff800020b92720 cannot exit while holding sleeplocks Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 407124 4970 32767 0x10 0 0 syz-executor0 *505847 19467 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(280b8b7847e0ae9e) 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(280b8b7847e0ae9e) 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 0xffff800020b67220 rbx 0xffff800020b672c0 rdx 0xffffffff81ec49f8 cmd0646_9_tim_udma+0x15dbb rcx 0 rax 0 r8 0xffffffff813ff014 kprintf+0x174 r9 0x1 r10 0xfdb0f010b66812b9 r11 0xf8e9853e8bd930ed r12 0x3000000008 r13 0xffff800020b67230 r14 0x100 r15 0x1 rip 0xffffffff817251a8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020b67210 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (reaper) pid=505847 stat=onproc flags process=14000 proc=200 pri=4, usrpri=54, nice=20 forw=0xffffffffffffffff, list=0xffff800020b21518,0xffff800020b21c30 process=0xffff800020b5ad28 user=0xffff800020b62000, vmspace=0xffffffff82302a88 estcpu=4, cpticks=2, pctcpu=0.35 user=0, sys=2, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 259 285332 41963 32767 3 0x90 nanosleep syz-executor1 41963 43717 21546 0 3 0x82 wait syz-executor1 4970 407124 62313 32767 7 0x10 syz-executor0 62313 152239 21546 0 3 0x82 wait syz-executor0 53926 359891 0 0 3 0x14200 bored sosplice 21546 271052 22192 0 3 0x82 thrsleep syz-fuzzer 21546 191387 22192 0 3 0x4000082 nanosleep syz-fuzzer 21546 409882 22192 0 3 0x4000082 thrsleep syz-fuzzer 21546 229366 22192 0 3 0x4000082 thrsleep syz-fuzzer 21546 11962 22192 0 3 0x4000082 thrsleep syz-fuzzer 21546 278208 22192 0 3 0x4000082 kqread syz-fuzzer 21546 319567 22192 0 3 0x4000082 thrsleep syz-fuzzer 21546 127789 22192 0 3 0x4000082 thrsleep syz-fuzzer 21546 52869 22192 0 3 0x4000082 thrsleep syz-fuzzer 21546 2734 22192 0 3 0x4000082 thrsleep syz-fuzzer 22192 443493 63848 0 3 0x10008a pause ksh 63848 210292 7649 0 3 0x92 select sshd 54441 54706 1 0 3 0x100083 ttyin getty 7649 486386 1 0 3 0x80 select sshd 65327 310080 91226 73 3 0x100010 ffs_fsync syslogd 91226 254911 1 0 3 0x100082 netio syslogd 86327 2747 1 77 3 0x100090 poll dhclient 44602 373342 1 0 3 0x80 poll dhclient 91287 290519 0 0 3 0x14200 pgzero zerothread 6208 333977 0 0 3 0x14200 aiodoned aiodoned 97589 449760 0 0 3 0x14200 syncer update 26133 9 0 0 3 0x14200 cleaner cleaner *19467 505847 0 0 7 0x14200 reaper 28702 107440 0 0 3 0x14200 pgdaemon pagedaemon 59624 187858 0 0 3 0x14200 bored crynlk 19019 341723 0 0 3 0x14200 bored crypto 15190 490392 0 0 3 0x40014200 acpi0 acpi0 15855 305606 0 0 3 0x40014200 idle1 32821 485044 0 0 3 0x14200 bored softnet 14430 427407 0 0 3 0x14200 bored systqmp 55307 264744 0 0 3 0x14200 bored systq 40692 66987 0 0 3 0x40014200 bored softclock 67510 153306 0 0 3 0x40014200 idle0 1 457018 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 4970 (syz-executor0) thread 0xffff800020b92bd0 (407124) exclusive rrwlock inode r = 0 (0xfffffd80793215e8) locked @ /syzkaller/managers/setuid/kernel/sys/ufs/ufs/ufs_ihash.c:140 exclusive rrwlock inode r = 0 (0xfffffd8079436c58) locked @ /syzkaller/managers/setuid/kernel/sys/ufs/ufs/ufs_vnops.c:1547 Process 65327 (syslogd) thread 0xffff800020be5780 (310080) exclusive rrwlock inode r = 0 (0xfffffd806ebc23c8) 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 9462 6321K 6321K 78643K 11129 0 0 pcb 23 9K 11K 78643K 2505 0 0 rtable 97 3K 3K 78643K 3879 0 0 ifaddr 36 12K 12K 78643K 741 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 131 0 0 iov 0 0K 32K 78643K 354 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 75K 78643K 4649 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 55 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 1K 1K 78643K 373 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1792 194K 288K 78643K 12592 0 0 file desc 7 21K 33K 78643K 4795 0 0 sigio 0 0K 0K 78643K 76 0 0 proc 41 38K 70K 78643K 3340 0 0 subproc 68 69634K 69634K 78643K 4012 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 625 0 0 in_multi 33 2K 2K 78643K 1488 0 0 ether_multi 1 0K 0K 78643K 47 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 1056 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 103 21K 61K 78643K 15559 0 0 UVM aobj 130 6K 6K 78643K 151 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 82 0 0 NDP 5 0K 0K 78643K 357 0 0 temp 120 2358K 2438K 78643K 20736 0 0 kqueue 0 0K 0K 78643K 47 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 120 0 116 1 0 1 1 0 8 0 inpcbpl 280 2046 0 2039 1 0 1 1 0 8 0 plimitpl 152 295 0 286 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 1085 0 1045 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 787 0 783 1 0 1 1 0 8 0 nd6 48 236 0 232 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 5054 0 4866 12 0 12 12 0 8 0 art_table 32 5055 0 4866 2 0 2 2 0 8 0 art_node 16 1084 0 1050 1 0 1 1 0 8 0 sysvmsgpl 40 16 0 4 1 0 1 1 0 8 0 semapl 112 371 0 361 1 0 1 1 0 8 0 shmpl 112 149 0 21 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 7588 0 6092 50 1 49 49 0 8 0 ffsino 272 7588 0 6092 101 1 100 100 0 8 0 nchpl 144 14222 0 12652 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 50836 0 50835 7 6 1 1 0 8 0 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 35175 0 35174 21 20 1 6 0 8 0 sigapl 432 4614 0 4599 3 1 2 3 0 8 0 futexpl 56 44857 0 44857 4 3 1 1 0 8 1 knotepl 112 3170 0 3143 11 10 1 2 0 8 0 kqueuepl 104 1457 0 1455 1 0 1 1 0 8 0 pipepl 112 4102 0 4083 16 15 1 2 0 8 0 fdescpl 488 4615 0 4599 3 0 3 3 0 8 0 filepl 152 30679 0 30579 16 11 5 7 0 8 0 lockfpl 96 813 0 813 16 15 1 1 0 8 1 lockfspl 24 2163 0 2163 16 15 1 1 0 8 1 sessionpl 112 133 0 123 1 0 1 1 0 8 0 pgrppl 48 200 0 190 1 0 1 1 0 8 0 ucredpl 96 11206 0 11197 1 0 1 1 0 8 0 zombiepl 144 4600 0 4599 4 3 1 1 0 8 0 processpl 840 4630 0 4599 4 0 4 4 0 8 0 procpl 600 12767 0 12724 4 0 4 4 0 8 0 srpgc 64 686 0 686 24 23 1 1 0 8 1 sosppl 128 114 0 114 24 24 0 1 0 8 0 sockpl 384 4675 0 4658 10 7 3 4 0 8 1 mcl64k 65536 6 0 0 1 0 1 1 0 8 0 mcl16k 16384 8 0 0 1 0 1 1 0 8 0 mcl12k 12288 24 0 0 2 0 2 2 0 8 0 mcl9k 9216 19 0 0 2 0 2 2 0 8 0 mcl8k 8192 14 0 0 2 0 2 2 0 8 0 mcl4k 4096 17 0 0 3 0 3 3 0 8 0 mcl2k2 2112 6 0 0 1 0 1 1 0 8 0 mcl2k 2048 142 0 0 13 3 10 13 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 462 0 0 10 0 10 10 0 8 0 bufpl 256 11010 0 4041 436 0 436 436 0 8 0 anonpl 16 572114 0 567114 149 110 39 41 0 125 7 amapchunkpl 152 45144 0 45052 298 293 5 189 0 158 1 amappl16 192 28273 0 27993 203 179 24 27 0 8 7 amappl15 184 915 0 911 1 0 1 1 0 8 0 amappl14 176 600 0 597 6 5 1 1 0 8 0 amappl13 168 690 0 687 1 0 1 1 0 8 0 amappl12 160 693 0 686 1 0 1 1 0 8 0 amappl11 152 970 0 961 1 0 1 1 0 8 0 amappl10 144 548 0 543 1 0 1 1 0 8 0 amappl9 136 653 0 652 1 0 1 1 0 8 0 amappl8 128 1581 0 1527 2 0 2 2 0 8 0 amappl7 120 690 0 680 1 0 1 1 0 8 0 amappl6 112 696 0 683 1 0 1 1 0 8 0 amappl5 104 1004 0 992 1 0 1 1 0 8 0 amappl4 96 1243 0 1217 2 1 1 2 0 8 0 amappl3 88 444 0 439 1 0 1 1 0 8 0 amappl2 80 38896 0 38839 2 0 2 2 0 8 0 amappl1 72 123896 0 123442 23 13 10 19 0 8 0 amappl 72 13879 0 13841 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 150 0 21 3 0 3 3 0 8 0 uaddrrnd 24 4615 0 4599 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 4615 0 4599 1 0 1 1 0 8 0 vmmpekpl 168 41925 0 41899 2 0 2 2 0 8 0 vmmpepl 168 534838 0 533460 222 149 73 80 0 357 6 vmsppl 360 4614 0 4599 2 0 2 2 0 8 0 pdppl 4096 9237 0 9198 7 1 6 6 0 8 1 pvpl 32 1450165 0 1441998 318 209 109 111 0 265 28 pmappl 224 4614 0 4599 28 26 2 2 0 8 1 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 600 0 13 17 0 17 17 0 8 0