panic: Thread 0xffff800020bba978 cannot exit while holding sleeplocks Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 140261 14564 73 0x100010 0 1K syslogd *145115 76133 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(54b1cdc2b1bf8b26) 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 0xffff800020bba978 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(54b1cdc2b1bf8b26) 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 0xffff800020b66ea0 rbx 0xffff800020b66f40 rdx 0xffffffff81ec49f8 cmd0646_9_tim_udma+0x15dbb rcx 0 rax 0 r8 0xffffffff813ff014 kprintf+0x174 r9 0x1 r10 0xb5788d70a0419831 r11 0xe2b12294c644a786 r12 0x3000000008 r13 0xffff800020b66eb0 r14 0x100 r15 0x1 rip 0xffffffff817251a8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020b66e90 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (reaper) pid=145115 stat=onproc flags process=14000 proc=200 pri=4, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff800020b20960,0xffff800020b21c30 process=0xffff800020b5a350 user=0xffff800020b62000, vmspace=0xffffffff82302a88 estcpu=1, cpticks=7, pctcpu=0.18 user=0, sys=3, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 71841 315519 42983 32767 2 0x10 syz-executor1 71841 371705 42983 32767 3 0x4000010 inode syz-executor1 8301 66053 78400 32767 2 0x490 syz-executor0 78400 100220 50125 0 3 0x82 wait syz-executor0 42983 307946 8279 32767 2 0x490 syz-executor1 8279 172472 50125 0 3 0x82 wait syz-executor1 78536 400323 0 0 3 0x14200 bored sosplice 50125 72950 37096 0 3 0x82 thrsleep syz-fuzzer 50125 511221 37096 0 3 0x4000082 thrsleep syz-fuzzer 50125 481341 37096 0 3 0x4000082 thrsleep syz-fuzzer 50125 173968 37096 0 3 0x4000082 kqread syz-fuzzer 50125 139932 37096 0 3 0x4000082 thrsleep syz-fuzzer 50125 388935 37096 0 3 0x4000082 thrsleep syz-fuzzer 50125 197148 37096 0 3 0x4000082 thrsleep syz-fuzzer 50125 303379 37096 0 3 0x4000082 thrsleep syz-fuzzer 50125 52106 37096 0 3 0x4000082 thrsleep syz-fuzzer 50125 66327 37096 0 3 0x4000082 thrsleep syz-fuzzer 50125 435128 37096 0 3 0x4000082 thrsleep syz-fuzzer 50125 136205 37096 0 3 0x4000082 thrsleep syz-fuzzer 37096 66269 42947 0 3 0x10008a pause ksh 42947 355639 22066 0 3 0x92 select sshd 65739 85427 1 0 3 0x100083 ttyin getty 22066 445864 1 0 3 0x80 select sshd 14564 140261 85124 73 7 0x100010 syslogd 85124 227742 1 0 3 0x100082 netio syslogd 93055 502843 1 77 3 0x100090 poll dhclient 80741 178887 1 0 3 0x80 poll dhclient 37905 382484 0 0 2 0x14200 zerothread 91501 37884 0 0 3 0x14200 aiodoned aiodoned 90405 357093 0 0 3 0x14200 syncer update 85693 461526 0 0 3 0x14200 cleaner cleaner *76133 145115 0 0 7 0x14200 reaper 81377 138729 0 0 3 0x14200 pgdaemon pagedaemon 49721 41596 0 0 3 0x14200 bored crynlk 94511 490917 0 0 3 0x14200 bored crypto 22954 156808 0 0 3 0x40014200 acpi0 acpi0 371 475888 0 0 3 0x40014200 idle1 17637 202182 0 0 3 0x14200 bored softnet 50974 53871 0 0 3 0x14200 bored systqmp 77676 266806 0 0 3 0x14200 bored systq 79403 481011 0 0 3 0x40014200 bored softclock 99098 485877 0 0 3 0x40014200 idle0 1 405188 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 71841 (syz-executor1) thread 0xffff800020be4e20 (371705) exclusive rrwlock inode r = 0 (0xfffffd807ed84d58) locked @ /syzkaller/managers/setuid/kernel/sys/ufs/ufs/ufs_vnops.c:1547 exclusive rwlock fdlock r = 0 (0xfffffd806572f808) locked @ /syzkaller/managers/setuid/kernel/sys/kern/tty_pty.c:1067 Process 14564 (syslogd) thread 0xffff800020be5c30 (140261) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82309cb8) locked @ /syzkaller/managers/setuid/kernel/sys/kern/sched_bsd.c:429 exclusive rrwlock inode r = 0 (0xfffffd806eba81a8) 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 14994 0 0 pcb 23 9K 11K 78643K 18960 0 0 rtable 97 3K 3K 78643K 28617 0 0 ifaddr 37 22K 29K 78643K 5421 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 904 0 0 iov 0 0K 44K 78643K 2615 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 75K 78643K 27944 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 495 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 2933 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1792 194K 288K 78643K 12592 0 0 file desc 8 25K 33K 78643K 37183 0 0 sigio 0 0K 0K 78643K 510 0 0 proc 41 38K 70K 78643K 23516 0 0 subproc 68 69634K 69634K 78643K 30294 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 5102 0 0 in_multi 33 2K 2K 78643K 11157 0 0 ether_multi 1 0K 0K 78643K 283 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 6851 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 129 22K 42K 78643K 114862 0 0 UVM aobj 130 4K 5K 78643K 157 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 857 0 0 NDP 5 0K 0K 78643K 2676 0 0 temp 120 2358K 2438K 78643K 141707 0 0 kqueue 0 0K 0K 78643K 398 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 893 0 889 1 0 1 1 0 8 0 inpcbpl 280 15754 0 15747 1 0 1 1 0 8 0 plimitpl 152 2129 0 2120 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 8042 0 8002 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 5924 0 5920 1 0 1 1 0 8 0 nd6 48 1782 0 1778 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 37513 0 37322 47 35 12 13 0 8 0 art_table 32 37514 0 37322 2 0 2 2 0 8 0 art_node 16 8041 0 8007 1 0 1 1 0 8 0 sysvmsgpl 40 32 0 24 1 0 1 1 0 8 0 semapl 112 2931 0 2921 1 0 1 1 0 8 0 shmpl 112 155 0 27 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 49984 0 47796 72 1 71 71 0 8 0 ffsino 272 49984 0 47796 150 3 147 147 0 8 0 nchpl 144 100026 0 98447 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 377130 0 377129 6 5 1 1 0 8 0 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 256753 0 256752 153 152 1 6 0 8 0 sigapl 432 34683 0 34667 8 6 2 3 0 8 0 futexpl 56 351794 0 351794 4 3 1 1 0 8 1 knotepl 112 23784 0 23757 46 45 1 2 0 8 0 kqueuepl 104 10763 0 10761 1 0 1 1 0 8 0 pipepl 112 32080 0 32061 113 111 2 2 0 8 1 fdescpl 488 34684 0 34667 3 0 3 3 0 8 0 filepl 152 236591 0 236488 99 94 5 7 0 8 0 lockfpl 96 7017 0 7017 72 71 1 1 0 8 1 lockfspl 24 18138 0 18138 61 60 1 1 0 8 1 sessionpl 112 906 0 896 1 0 1 1 0 8 0 pgrppl 48 1397 0 1387 1 0 1 1 0 8 0 ucredpl 96 90887 0 90878 1 0 1 1 0 8 0 zombiepl 144 34668 0 34667 4 3 1 1 0 8 0 processpl 840 34699 0 34667 4 0 4 4 0 8 0 procpl 600 97209 0 97164 28 24 4 5 0 8 0 srpgc 64 5238 0 5238 131 130 1 1 0 8 1 sosppl 128 770 0 770 152 151 1 1 0 8 1 sockpl 384 35713 0 35696 41 38 3 4 0 8 1 mcl64k 65536 19 0 0 3 0 3 3 0 8 0 mcl16k 16384 40 0 0 5 3 2 3 0 8 0 mcl12k 12288 172 0 0 3 1 2 2 0 8 0 mcl9k 9216 113 0 0 4 2 2 2 0 8 0 mcl8k 8192 88 0 0 9 7 2 3 0 8 0 mcl4k 4096 73 0 0 7 4 3 3 0 8 0 mcl2k2 2112 16 0 0 2 0 2 2 0 8 0 mcl2k 2048 151 0 0 12 3 9 12 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 1878 0 0 14 4 10 11 0 8 0 bufpl 256 56038 0 49069 436 0 436 436 0 8 0 anonpl 16 3805293 0 3799309 480 439 41 42 0 125 2 amapchunkpl 152 260462 0 260362 883 876 7 97 0 158 2 amappl16 192 193947 0 193691 893 868 25 28 0 8 4 amappl15 184 5528 0 5528 85 85 0 1 0 8 0 amappl14 176 4487 0 4484 4 3 1 1 0 8 0 amappl13 168 6235 0 6232 1 0 1 1 0 8 0 amappl12 160 3902 0 3899 1 0 1 1 0 8 0 amappl11 152 7613 0 7603 1 0 1 1 0 8 0 amappl10 144 3833 0 3826 2 1 1 1 0 8 0 amappl9 136 4241 0 4240 1 0 1 1 0 8 0 amappl8 128 11251 0 11141 5 0 5 5 0 8 0 amappl7 120 6165 0 6152 1 0 1 1 0 8 0 amappl6 112 5043 0 5012 4 3 1 2 0 8 0 amappl5 104 5731 0 5720 1 0 1 1 0 8 0 amappl4 96 6411 0 6354 3 1 2 2 0 8 0 amappl3 88 3609 0 3600 1 0 1 1 0 8 0 amappl2 80 302497 0 302409 2 0 2 2 0 8 0 amappl1 72 876263 0 875796 23 13 10 19 0 8 0 amappl 72 104446 0 104404 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 156 0 27 3 0 3 3 0 8 0 uaddrrnd 24 34684 0 34667 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 34684 0 34667 1 0 1 1 0 8 0 vmmpekpl 168 288692 0 288666 2 0 2 2 0 8 0 vmmpepl 168 4036753 0 4035180 714 635 79 91 0 357 3 vmsppl 360 34683 0 34667 2 0 2 2 0 8 0 pdppl 4096 69375 0 69334 7 1 6 6 0 8 0 pvpl 32 10039146 0 10029751 1720 1607 113 123 0 265 17 pmappl 224 34683 0 34667 169 168 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 703 0 67 19 0 19 19 0 8 0