panic: thread 0xffff800020b92bd0 cannot exit while holding sleeplocks Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 210910 52664 32767 0x10 0 1K syz-executor1 *447740 344 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(53570c36ca0b25fb) 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 0xffff800020b92bd0 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(53570c36ca0b25fb) 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 0xffff800020b67bf0 rbx 0xffff800020b67c90 rdx 0xffffffff81ec88ae cmd0646_9_tim_udma+0x18cbf rcx 0 rax 0 r8 0xffffffff81aa9b64 kprintf+0x174 r9 0x1 r10 0x65145d07f3ecef76 r11 0x7a5f275bab5f14c r12 0x3000000008 r13 0xffff800020b67c00 r14 0x100 r15 0x1 rip 0xffffffff819d4fa8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020b67be0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (reaper) pid=447740 stat=onproc flags process=14000 proc=200 pri=4, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff800020b21770,0xffff800020b21c30 process=0xffff800020b5b070 user=0xffff800020b62000, vmspace=0xffffffff822dc6f0 estcpu=1, cpticks=3, pctcpu=0.37 user=0, sys=3, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 44112 348740 23013 32767 3 0x3010 suspend syz-executor0 44112 234499 23013 32767 3 0x4081010 inode syz-executor0 52664 210910 18916 32767 7 0x10 syz-executor1 18916 360988 17575 0 3 0x82 wait syz-executor1 23013 478985 48740 32767 2 0x490 syz-executor0 48740 85701 17575 0 3 0x82 wait syz-executor0 43923 437716 0 0 3 0x14200 bored sosplice 17575 256805 37658 0 3 0x82 kqread syz-fuzzer 17575 41969 37658 0 3 0x4000082 thrsleep syz-fuzzer 17575 260189 37658 0 3 0x4000082 thrsleep syz-fuzzer 17575 108594 37658 0 3 0x4000082 thrsleep syz-fuzzer 17575 140988 37658 0 3 0x4000082 thrsleep syz-fuzzer 17575 379030 37658 0 3 0x4000082 thrsleep syz-fuzzer 17575 84539 37658 0 3 0x4000082 thrsleep syz-fuzzer 17575 71605 37658 0 3 0x4000082 thrsleep syz-fuzzer 17575 193074 37658 0 3 0x4000082 thrsleep syz-fuzzer 17575 269358 37658 0 3 0x4000082 thrsleep syz-fuzzer 37658 504886 52453 0 3 0x10008a pause ksh 52453 482088 36393 0 3 0x92 select sshd 19187 458750 1 0 3 0x100083 ttyin getty 36393 78030 1 0 3 0x80 select sshd 26663 103332 92836 73 3 0x100010 ffs_fsync syslogd 92836 93527 1 0 3 0x100082 netio syslogd 56362 491418 1 77 3 0x100090 poll dhclient 62497 319933 1 0 3 0x80 poll dhclient 21709 335252 0 0 3 0x14200 pgzero zerothread 85354 507628 0 0 3 0x14200 aiodoned aiodoned 31816 277782 0 0 3 0x14200 syncer update 68300 490739 0 0 3 0x14200 cleaner cleaner * 344 447740 0 0 7 0x14200 reaper 36872 511266 0 0 3 0x14200 pgdaemon pagedaemon 13406 441400 0 0 3 0x14200 bored crynlk 44906 22822 0 0 3 0x14200 bored crypto 51572 427887 0 0 3 0x40014200 acpi0 acpi0 46797 208873 0 0 3 0x40014200 idle1 53588 489156 0 0 3 0x14200 bored softnet 91079 8013 0 0 3 0x14200 bored systqmp 11451 397040 0 0 3 0x14200 bored systq 60959 111098 0 0 3 0x40014200 bored softclock 62246 162464 0 0 3 0x40014200 idle0 1 218855 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 52664 (syz-executor1) thread 0xffff800020b92720 (210910) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff8231e5d8) locked @ /syzkaller/managers/setuid/kernel/sys/kern/sched_bsd.c:429 exclusive rrwlock inode r = 0 (0xfffffd8071426c50) locked @ /syzkaller/managers/setuid/kernel/sys/ufs/ufs/ufs_ihash.c:140 exclusive rrwlock inode r = 0 (0xfffffd806fbfbd68) locked @ /syzkaller/managers/setuid/kernel/sys/ufs/ufs/ufs_vnops.c:1547 Process 26663 (syslogd) thread 0xffff800020be5528 (103332) exclusive rrwlock inode r = 0 (0xfffffd806eb872b8) locked @ /syzkaller/managers/setuid/kernel/sys/ufs/ufs/ufs_vnops.c:1547 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9462 6321K 6321K 78643K 13304 0 0 pcb 23 9K 11K 78643K 11242 0 0 rtable 97 3K 3K 78643K 17799 0 0 ifaddr 36 22K 29K 78643K 3376 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 666 0 0 iov 0 0K 36K 78643K 1509 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1202 75K 75K 78643K 17194 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 273 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 1819 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1792 194K 288K 78643K 12592 0 0 file desc 7 21K 33K 78643K 22739 0 0 sigio 0 0K 0K 78643K 313 0 0 proc 41 38K 70K 78643K 14305 0 0 subproc 68 69634K 71682K 78643K 18802 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 3274 0 0 in_multi 33 2K 2K 78643K 6880 0 0 ether_multi 1 0K 0K 78643K 175 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 4222 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 93 21K 41K 78643K 70733 0 0 UVM aobj 130 4K 4K 78643K 150 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 528 0 0 NDP 5 0K 0K 78643K 1662 0 0 temp 121 2362K 2446K 78643K 87856 0 0 kqueue 0 0K 0K 78643K 293 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 555 0 551 1 0 1 1 0 8 0 inpcbpl 280 10001 0 9994 1 0 1 1 0 8 0 plimitpl 152 1317 0 1308 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 5000 0 4960 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 2 0 2 1 1 0 1 0 8 0 tcpcb 544 3969 0 3965 1 0 1 1 0 8 0 nd6 48 1106 0 1102 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 23306 0 23114 41 28 13 13 0 8 1 art_table 32 23307 0 23114 2 0 2 2 0 8 0 art_node 16 4999 0 4965 1 0 1 1 0 8 0 sysvmsgpl 40 19 0 19 4 4 0 1 0 8 0 semapl 112 1815 0 1805 1 0 1 1 0 8 0 shmpl 112 148 0 20 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 30515 0 28688 60 0 60 60 0 8 0 ffsino 272 30515 0 28688 124 2 122 122 0 8 0 nchpl 144 60846 0 59271 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 228889 0 228888 4 3 1 1 0 8 0 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 159851 0 159849 115 114 1 6 0 8 0 sigapl 432 21253 0 21238 5 3 2 3 0 8 0 futexpl 56 215846 0 215846 3 2 1 1 0 8 1 knotepl 112 14408 0 14381 29 28 1 2 0 8 0 kqueuepl 104 6265 0 6263 1 0 1 1 0 8 0 pipepl 112 18692 0 18673 47 46 1 2 0 8 0 fdescpl 488 21254 0 21238 3 0 3 3 0 8 0 filepl 152 145219 0 145116 58 53 5 7 0 8 1 lockfpl 96 5141 0 5141 28 27 1 1 0 8 1 lockfspl 24 11347 0 11347 26 25 1 1 0 8 1 sessionpl 112 568 0 558 1 0 1 1 0 8 0 pgrppl 48 829 0 819 1 0 1 1 0 8 0 ucredpl 96 52423 0 52414 1 0 1 1 0 8 0 zombiepl 144 21239 0 21238 5 4 1 1 0 8 0 processpl 840 21269 0 21238 4 0 4 4 0 8 0 procpl 600 59606 0 59562 9 5 4 5 0 8 0 srpgc 64 3248 0 3248 68 67 1 1 0 8 1 sosppl 128 484 0 484 92 91 1 1 0 8 1 sockpl 384 21770 0 21753 27 24 3 4 0 8 1 mcl64k 65536 18 0 0 3 0 3 3 0 8 0 mcl16k 16384 31 0 0 4 2 2 3 0 8 0 mcl12k 12288 41 0 0 2 0 2 2 0 8 0 mcl9k 9216 57 0 0 3 1 2 2 0 8 0 mcl8k 8192 49 0 0 6 3 3 3 0 8 0 mcl4k 4096 33 0 0 4 1 3 3 0 8 0 mcl2k2 2112 18 0 0 2 0 2 2 0 8 0 mcl2k 2048 128 0 0 13 2 11 13 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 1123 0 0 12 1 11 11 0 8 0 bufpl 256 37425 0 30456 436 0 436 436 0 8 0 anonpl 16 2348634 0 2342878 493 456 37 43 0 125 0 amapchunkpl 152 151740 0 151646 502 497 5 96 0 158 0 amappl16 192 124372 0 124094 772 755 17 28 0 8 0 amappl15 184 3787 0 3786 1 0 1 1 0 8 0 amappl14 176 4907 0 4900 2 1 1 1 0 8 0 amappl13 168 3863 0 3858 1 0 1 1 0 8 0 amappl12 160 2272 0 2268 8 7 1 1 0 8 0 amappl11 152 4620 0 4611 1 0 1 1 0 8 0 amappl10 144 2196 0 2185 1 0 1 1 0 8 0 amappl9 136 2639 0 2638 1 0 1 1 0 8 0 amappl8 128 6574 0 6513 3 0 3 3 0 8 0 amappl7 120 3847 0 3834 1 0 1 1 0 8 0 amappl6 112 3131 0 3115 1 0 1 1 0 8 0 amappl5 104 3965 0 3954 1 0 1 1 0 8 0 amappl4 96 3446 0 3409 5 3 2 2 0 8 0 amappl3 88 2034 0 2027 1 0 1 1 0 8 0 amappl2 80 183115 0 183055 2 0 2 2 0 8 0 amappl1 72 540255 0 539797 24 14 10 19 0 8 0 amappl 72 64255 0 64215 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 149 0 20 3 0 3 3 0 8 0 uaddrrnd 24 21254 0 21238 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 21254 0 21238 1 0 1 1 0 8 0 vmmpekpl 168 178774 0 178749 2 0 2 2 0 8 0 vmmpepl 168 2450321 0 2448901 541 471 70 85 0 357 0 vmsppl 360 21253 0 21238 2 0 2 2 0 8 0 pdppl 4096 42515 0 42476 9 3 6 6 0 8 1 pvpl 32 6217903 0 6208928 1043 952 91 121 0 265 0 pmappl 224 21253 0 21238 97 96 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 663 0 47 18 0 18 18 0 8 0