panic: Thread 0xffff800020bba4c8 cannot exit while holding sleeplocks Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 294661 84905 73 0x100010 0 0K syslogd *475458 63602 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(7ecc38798680df69) 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 0xffff800020bba4c8 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(7ecc38798680df69) 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 0xffff800020b67070 rbx 0xffff800020b67110 rdx 0xffffffff81ec7571 cmd0646_9_tim_udma+0x1299c rcx 0 rax 0 r8 0xffffffff81928b04 kprintf+0x174 r9 0x1 r10 0xe44fad173f38332e r11 0xda60fffb2ed3b536 r12 0x3000000008 r13 0xffff800020b67080 r14 0x100 r15 0x1 rip 0xffffffff810e9c38 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020b67060 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (reaper) pid=475458 stat=onproc flags process=14000 proc=200 pri=4, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800020b21518,0xffff800020b21c30 process=0xffff800020b5a9e0 user=0xffff800020b62000, vmspace=0xffffffff82312950 estcpu=0, cpticks=3, pctcpu=0.23 user=0, sys=3, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 2888 447953 54911 32767 2 0x490 syz-executor1 2888 395881 54911 32767 3 0x4000090 fifor syz-executor1 2888 38462 54911 32767 3 0x4000090 fsleep syz-executor1 54911 443603 97344 32767 2 0x490 syz-executor1 97344 89713 11080 0 3 0x82 wait syz-executor1 12551 203667 31697 32767 3 0x90 nanosleep syz-executor0 31697 404260 11080 0 3 0x82 wait syz-executor0 13917 147341 0 0 3 0x14200 bored sosplice 11080 129056 48876 0 3 0x82 thrsleep syz-fuzzer 11080 299986 48876 0 3 0x4000082 thrsleep syz-fuzzer 11080 188204 48876 0 3 0x4000082 thrsleep syz-fuzzer 11080 432863 48876 0 3 0x4000082 thrsleep syz-fuzzer 11080 170076 48876 0 3 0x4000082 kqread syz-fuzzer 11080 310478 48876 0 3 0x4000082 thrsleep syz-fuzzer 11080 4108 48876 0 3 0x4000082 thrsleep syz-fuzzer 11080 443161 48876 0 3 0x4000082 thrsleep syz-fuzzer 11080 60104 48876 0 3 0x4000082 thrsleep syz-fuzzer 11080 143058 48876 0 3 0x4000082 thrsleep syz-fuzzer 11080 290893 48876 0 3 0x4000082 thrsleep syz-fuzzer 48876 493525 4059 0 3 0x10008a pause ksh 4059 126580 46253 0 3 0x92 select sshd 1021 490319 1 0 3 0x100083 ttyin getty 46253 313681 1 0 3 0x80 select sshd 84905 294661 81531 73 7 0x100010 syslogd 81531 228321 1 0 3 0x100082 netio syslogd 11742 308736 1 77 3 0x100090 poll dhclient 42871 157044 1 0 3 0x80 poll dhclient 4567 482015 0 0 3 0x14200 pgzero zerothread 18 407322 0 0 3 0x14200 aiodoned aiodoned 19370 207109 0 0 3 0x14200 syncer update 85774 183799 0 0 3 0x14200 cleaner cleaner *63602 475458 0 0 7 0x14200 reaper 27804 28902 0 0 3 0x14200 pgdaemon pagedaemon 72119 184160 0 0 3 0x14200 bored crynlk 2306 157253 0 0 3 0x14200 bored crypto 66076 33285 0 0 3 0x40014200 acpi0 acpi0 24311 129500 0 0 3 0x40014200 idle1 75154 277483 0 0 3 0x14200 bored softnet 68492 383977 0 0 3 0x14200 bored systqmp 28019 21694 0 0 3 0x14200 bored systq 77663 273932 0 0 3 0x40014200 bored softclock 23163 111029 0 0 3 0x40014200 idle0 1 459456 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 84905 (syslogd) thread 0xffff800020be59d8 (294661) exclusive rrwlock inode r = 0 (0xfffffd806eb951a8) locked @ /syzkaller/managers/setuid/kernel/sys/ufs/ufs/ufs_vnops.c:1547 exclusive kernel_lock &kernel_lock r = 0 (0xffffffff822fe250) locked @ /syzkaller/managers/setuid/kernel/sys/sys/syscall_mi.h:90 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9462 6321K 6321K 78643K 12739 0 0 pcb 26 9K 11K 78643K 10396 0 0 rtable 97 3K 3K 78643K 14185 0 0 ifaddr 36 18K 21K 78643K 2694 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 539 0 0 iov 0 0K 32K 78643K 1534 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1202 75K 75K 78643K 15070 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 267 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 1512 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1792 194K 288K 78643K 12592 0 0 file desc 7 21K 33K 78643K 20151 0 0 sigio 0 0K 0K 78643K 278 0 0 proc 44 50K 70K 78643K 11831 0 0 subproc 68 69634K 69634K 78643K 14960 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 2811 0 0 in_multi 33 2K 2K 78643K 5546 0 0 ether_multi 1 0K 0K 78643K 148 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 3552 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 125 22K 212K 78643K 63114 0 0 UVM aobj 130 7K 7K 78643K 166 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 429 0 0 NDP 5 0K 0K 78643K 1323 0 0 temp 121 2362K 2442K 78643K 75310 0 0 kqueue 0 0K 0K 78643K 220 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 442 0 438 1 0 1 1 0 8 0 inpcbpl 280 8673 0 8666 1 0 1 1 0 8 0 plimitpl 152 1064 0 1055 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 3983 0 3943 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 3440 0 3436 1 0 1 1 0 8 0 nd6 48 880 0 876 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 18556 0 18364 31 19 12 13 0 8 0 art_table 32 18557 0 18364 2 0 2 2 0 8 0 art_node 16 3982 0 3948 1 0 1 1 0 8 0 sysvmsgpl 40 18 0 8 2 1 1 1 0 8 0 semapl 112 1510 0 1500 1 0 1 1 0 8 0 shmpl 112 164 0 36 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 28149 0 26357 59 1 58 58 0 8 0 ffsino 272 28149 0 26357 121 1 120 120 0 8 0 nchpl 144 55259 0 53680 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 209257 0 209257 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 142171 0 142170 103 102 1 7 0 8 0 sigapl 432 19004 0 18989 6 4 2 3 0 8 0 futexpl 56 197108 0 197107 2 1 1 1 0 8 0 knotepl 112 12091 0 12064 21 20 1 2 0 8 0 kqueuepl 104 5371 0 5369 1 0 1 1 0 8 0 pipepl 112 16940 0 16921 57 56 1 2 0 8 0 fdescpl 488 19005 0 18989 3 0 3 3 0 8 0 filepl 152 132323 0 132225 60 55 5 7 0 8 1 lockfpl 96 4578 0 4578 23 22 1 1 0 8 1 lockfspl 24 9812 0 9812 22 21 1 1 0 8 1 sessionpl 112 455 0 445 1 0 1 1 0 8 0 pgrppl 48 678 0 668 1 0 1 1 0 8 0 ucredpl 96 49759 0 49750 1 0 1 1 0 8 0 zombiepl 144 18989 0 18988 1 0 1 1 0 8 0 processpl 840 19020 0 18988 4 0 4 4 0 8 0 procpl 600 54073 0 54028 12 8 4 5 0 8 0 srpgc 64 2580 0 2580 66 65 1 1 0 8 1 sosppl 128 496 0 496 88 87 1 1 0 8 1 sockpl 384 19539 0 19519 31 28 3 4 0 8 1 mcl64k 65536 32 0 0 3 1 2 3 0 8 0 mcl16k 16384 16 0 0 2 0 2 2 0 8 0 mcl12k 12288 71 0 0 2 0 2 2 0 8 0 mcl9k 9216 65 0 0 2 1 1 2 0 8 0 mcl8k 8192 39 0 0 5 3 2 3 0 8 0 mcl4k 4096 49 0 0 4 1 3 3 0 8 0 mcl2k2 2112 12 0 0 1 0 1 1 0 8 0 mcl2k 2048 123 0 0 12 1 11 12 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 1109 0 0 16 3 13 14 0 8 0 bufpl 256 33002 0 26033 436 0 436 436 0 8 0 anonpl 16 1970501 0 1965433 496 459 37 43 0 125 0 amapchunkpl 152 155546 0 155450 1020 961 59 189 0 158 54 amappl16 192 98923 0 98663 417 397 20 27 0 8 0 amappl15 184 4015 0 4012 1 0 1 1 0 8 0 amappl14 176 3092 0 3086 2 1 1 1 0 8 0 amappl13 168 3073 0 3068 1 0 1 1 0 8 0 amappl12 160 2823 0 2817 1 0 1 1 0 8 0 amappl11 152 4433 0 4424 1 0 1 1 0 8 0 amappl10 144 1520 0 1508 1 0 1 1 0 8 0 amappl9 136 2823 0 2822 1 0 1 1 0 8 0 amappl8 128 6264 0 6157 5 1 4 4 0 8 0 amappl7 120 3079 0 3067 1 0 1 1 0 8 0 amappl6 112 2654 0 2638 1 0 1 1 0 8 0 amappl5 104 3466 0 3455 1 0 1 1 0 8 0 amappl4 96 2315 0 2272 5 3 2 2 0 8 0 amappl3 88 2129 0 2123 1 0 1 1 0 8 0 amappl2 80 167878 0 167797 2 0 2 2 0 8 0 amappl1 72 483667 0 483193 23 13 10 19 0 8 0 amappl 72 57776 0 57735 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 165 0 36 3 0 3 3 0 8 0 uaddrrnd 24 19005 0 18988 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 19005 0 18988 1 0 1 1 0 8 0 vmmpekpl 168 163049 0 163022 2 0 2 2 0 8 0 vmmpepl 168 2186936 0 2185379 467 394 73 87 0 357 0 vmsppl 360 19004 0 18988 2 0 2 2 0 8 0 pdppl 4096 38017 0 37976 6 0 6 6 0 8 0 pvpl 32 5418812 0 5410332 1013 908 105 120 0 265 14 pmappl 224 19004 0 18988 85 83 2 2 0 8 1 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 645 0 32 18 0 18 18 0 8 0