panic: Thread 0xffff800020bba4c8 cannot exit while holding sleeplocks Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 242970 69343 32767 0x10 0x480 1 syz-executor1 *140620 46901 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(1384ff4a6a62a3b4) 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 0xffff800020bba4c8 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(1384ff4a6a62a3b4) 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 0xffff800020b671e0 rbx 0xffff800020b67280 rdx 0xffffffff81ec5817 cmd0646_9_tim_udma+0x133e5 rcx 0 rax 0 r8 0xffffffff819810f4 kprintf+0x174 r9 0x1 r10 0x34510980166bb27d r11 0x5dad465916f32552 r12 0x3000000008 r13 0xffff800020b671f0 r14 0x100 r15 0x1 rip 0xffffffff816f2378 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020b671d0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (reaper) pid=140620 stat=onproc flags process=14000 proc=200 pri=4, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800020b21770,0xffff800020b21c30 process=0xffff800020b5b070 user=0xffff800020b62000, vmspace=0xffffffff823219e8 estcpu=0, cpticks=3, pctcpu=0.39 user=0, sys=2, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 3240 120159 89994 32767 2 0x10 syz-executor0 89994 499068 33336 0 3 0x82 wait syz-executor0 69343 242970 16293 32767 7 0x490 syz-executor1 16293 23662 33336 0 3 0x82 wait syz-executor1 89700 413853 0 0 3 0x14200 bored sosplice 33336 71704 91733 0 3 0x82 thrsleep syz-fuzzer 33336 40508 91733 0 3 0x4000082 nanosleep syz-fuzzer 33336 83032 91733 0 3 0x4000082 thrsleep syz-fuzzer 33336 344047 91733 0 3 0x4000082 thrsleep syz-fuzzer 33336 246615 91733 0 3 0x4000082 thrsleep syz-fuzzer 33336 5854 91733 0 3 0x4000082 thrsleep syz-fuzzer 33336 232393 91733 0 3 0x4000082 thrsleep syz-fuzzer 33336 22247 91733 0 3 0x4000082 thrsleep syz-fuzzer 33336 139688 91733 0 3 0x4000082 kqread syz-fuzzer 33336 202152 91733 0 3 0x4000082 nanosleep syz-fuzzer 33336 94186 91733 0 3 0x4000082 thrsleep syz-fuzzer 91733 72031 20967 0 3 0x10008a pause ksh 20967 341357 2909 0 3 0x92 select sshd 98996 8152 1 0 3 0x100083 ttyin getty 2909 36782 1 0 3 0x80 select sshd 79282 194512 76241 73 2 0x100010 syslogd 76241 373026 1 0 3 0x100082 netio syslogd 58190 109290 1 77 3 0x100090 poll dhclient 87506 242136 1 0 3 0x80 poll dhclient 95156 448086 0 0 3 0x14200 pgzero zerothread 51049 467928 0 0 3 0x14200 aiodoned aiodoned 54269 345699 0 0 3 0x14200 syncer update 68027 44187 0 0 3 0x14200 cleaner cleaner *46901 140620 0 0 7 0x14200 reaper 50065 129834 0 0 3 0x14200 pgdaemon pagedaemon 44321 216086 0 0 3 0x14200 bored crynlk 54931 270074 0 0 3 0x14200 bored crypto 98923 119686 0 0 3 0x40014200 acpi0 acpi0 62175 201987 0 0 3 0x40014200 idle1 75974 317895 0 0 3 0x14200 bored softnet 85067 392384 0 0 3 0x14200 bored systqmp 39267 178763 0 0 3 0x14200 bored systq 32075 3580 0 0 3 0x40014200 bored softclock 79181 378306 0 0 3 0x40014200 idle0 1 203889 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 3240 (syz-executor0) thread 0xffff800020bba720 (120159) exclusive rrwlock inode r = 0 (0xfffffd806ceecc48) locked @ /syzkaller/managers/setuid/kernel/sys/ufs/ufs/ufs_vnops.c:1547 exclusive rrwlock inode r = 0 (0xfffffd806ceec918) locked @ /syzkaller/managers/setuid/kernel/sys/ufs/ufs/ufs_vnops.c:1547 Process 79282 (syslogd) thread 0xffff800020be5c30 (194512) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff8231f6a0) locked @ /syzkaller/managers/setuid/kernel/sys/kern/sched_bsd.c:429 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9462 6321K 6321K 78643K 13119 0 0 pcb 23 9K 12K 78643K 11912 0 0 rtable 97 3K 3K 78643K 16617 0 0 ifaddr 37 22K 29K 78643K 3164 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 628 0 0 iov 0 0K 32K 78643K 1512 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 75K 78643K 16902 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 309 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 1858 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1792 194K 288K 78643K 12592 0 0 file desc 7 21K 33K 78643K 23276 0 0 sigio 0 0K 0K 78643K 353 0 0 proc 41 38K 70K 78643K 13740 0 0 subproc 68 69634K 69634K 78643K 17544 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 3390 0 0 in_multi 33 2K 2K 78643K 6565 0 0 ether_multi 1 0K 0K 78643K 192 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 4009 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 110 21K 41K 78643K 72455 0 0 UVM aobj 130 8K 8K 78643K 148 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 546 0 0 NDP 5 0K 0K 78643K 1551 0 0 temp 121 2362K 2442K 78643K 87194 0 0 kqueue 0 0K 0K 78643K 248 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 518 0 514 1 0 1 1 0 8 0 inpcbpl 280 10117 0 10110 1 0 1 1 0 8 0 plimitpl 152 1259 0 1250 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 4667 0 4627 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 4044 0 4040 1 0 1 1 0 8 0 nd6 48 1032 0 1028 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 21864 0 21673 27 15 12 13 0 8 0 art_table 32 21865 0 21673 2 0 2 2 0 8 0 art_node 16 4666 0 4632 1 0 1 1 0 8 0 sysvmsgpl 40 5 0 2 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 1856 0 1846 1 0 1 1 0 8 0 shmpl 112 146 0 18 5 1 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 31493 0 29664 60 0 60 60 0 8 0 ffsino 272 31493 0 29664 124 1 123 123 0 8 0 nchpl 144 62525 0 60945 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 234050 0 234050 4 3 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 161204 0 161204 122 121 1 5 0 8 1 sigapl 432 21901 0 21886 6 4 2 3 0 8 0 futexpl 56 217622 0 217622 5 4 1 1 0 8 1 knotepl 112 14381 0 14354 28 27 1 2 0 8 0 kqueuepl 104 6911 0 6909 1 0 1 1 0 8 0 pipepl 112 19648 0 19629 61 60 1 2 0 8 0 fdescpl 488 21902 0 21886 3 0 3 3 0 8 0 filepl 152 150245 0 150146 71 65 6 7 0 8 1 lockfpl 96 5361 0 5361 26 25 1 1 0 8 1 lockfspl 24 11293 0 11293 23 22 1 1 0 8 1 sessionpl 112 531 0 521 1 0 1 1 0 8 0 pgrppl 48 844 0 834 1 0 1 1 0 8 0 ucredpl 96 54982 0 54973 1 0 1 1 0 8 0 zombiepl 144 21887 0 21886 4 3 1 1 0 8 0 processpl 840 21917 0 21886 4 0 4 4 0 8 0 procpl 600 61881 0 61838 10 6 4 5 0 8 0 srpgc 64 3010 0 3010 76 75 1 1 0 8 1 sosppl 128 524 0 524 101 100 1 1 0 8 1 sockpl 384 22654 0 22637 40 37 3 4 0 8 1 mcl64k 65536 33 0 0 5 2 3 3 0 8 0 mcl16k 16384 18 0 0 3 1 2 3 0 8 0 mcl12k 12288 89 0 0 2 0 2 2 0 8 0 mcl9k 9216 97 0 0 5 3 2 2 0 8 0 mcl8k 8192 50 0 0 6 3 3 3 0 8 0 mcl4k 4096 81 0 0 7 4 3 3 0 8 0 mcl2k2 2112 17 0 0 2 0 2 2 0 8 0 mcl2k 2048 152 0 0 11 2 9 11 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 1194 0 0 13 1 12 12 0 8 0 bufpl 256 37282 0 30313 436 0 436 436 0 8 0 anonpl 16 2504951 0 2499686 376 336 40 43 0 125 0 amapchunkpl 152 157550 0 157458 429 420 9 97 0 158 4 amappl16 192 127299 0 127046 586 564 22 28 0 8 4 amappl15 184 3537 0 3535 1 0 1 1 0 8 0 amappl14 176 4073 0 4070 2 1 1 1 0 8 0 amappl13 168 4145 0 4142 1 0 1 1 0 8 0 amappl12 160 2947 0 2937 1 0 1 1 0 8 0 amappl11 152 4863 0 4850 1 0 1 1 0 8 0 amappl10 144 2697 0 2692 1 0 1 1 0 8 0 amappl9 136 2938 0 2936 1 0 1 1 0 8 0 amappl8 128 7522 0 7419 8 4 4 4 0 8 0 amappl7 120 4108 0 4096 1 0 1 1 0 8 0 amappl6 112 3634 0 3612 1 0 1 1 0 8 0 amappl5 104 3945 0 3933 1 0 1 1 0 8 0 amappl4 96 3559 0 3518 4 2 2 2 0 8 0 amappl3 88 1910 0 1904 1 0 1 1 0 8 0 amappl2 80 190608 0 190541 2 0 2 2 0 8 0 amappl1 72 555927 0 555470 23 13 10 19 0 8 0 amappl 72 66255 0 66217 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 147 0 18 3 0 3 3 0 8 0 uaddrrnd 24 21902 0 21886 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 21902 0 21886 1 0 1 1 0 8 0 vmmpekpl 168 182912 0 182889 2 0 2 2 0 8 0 vmmpepl 168 2526586 0 2525140 426 348 78 88 0 357 2 vmsppl 360 21901 0 21886 2 0 2 2 0 8 0 pdppl 4096 43811 0 43772 8 2 6 6 0 8 1 pvpl 32 6458118 0 6449544 1034 932 102 120 0 265 14 pmappl 224 21901 0 21886 112 110 2 2 0 8 1 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 651 0 36 18 0 18 18 0 8 0