panic: Thread 0xffff800020b92e28 cannot exit while holding sleeplocks Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 110105 35263 73 0x100010 0 1 syslogd *447104 65208 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(ade94467d2032e4b) 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 0xffff800020b92e28 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(ade94467d2032e4b) 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 0xffff800020b675f0 rbx 0xffff800020b67690 rdx 0xffffffff81f2c6de apollo_pio_rec+0x8cd7 rcx 0 rax 0 r8 0xffffffff810055d4 kprintf+0x174 r9 0x1 r10 0x77594934c6d67b05 r11 0x68c75e26c94627a1 r12 0x3000000008 r13 0xffff800020b67600 r14 0x100 r15 0x1 rip 0xffffffff813eeb68 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020b675e0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (reaper) pid=447104 stat=onproc flags process=14000 proc=200 pri=4, usrpri=53, nice=20 forw=0xffffffffffffffff, list=0xffff800020b21518,0xffff800020b21c30 process=0xffff800020b5a008 user=0xffff800020b62000, vmspace=0xffffffff822f8848 estcpu=3, cpticks=3, pctcpu=0.38 user=0, sys=2, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 69437 42317 92234 60929 2 0x10 syz-executor1 69437 297551 92234 60929 2 0x4000010 syz-executor1 69437 363265 92234 60929 3 0x4000010 inode syz-executor1 28313 512623 30174 0 2 0x3000 syz-executor0 58444 149792 1 0 3 0x100083 ttyin getty 75924 140607 0 0 3 0x14200 bored sosplice 92234 489868 37957 0 2 0x482 syz-executor1 30174 438031 37957 0 3 0x82 nanosleep syz-executor0 37957 110751 84170 0 3 0x82 thrsleep syz-fuzzer 37957 19136 84170 0 3 0x4000082 thrsleep syz-fuzzer 37957 313875 84170 0 3 0x4000082 thrsleep syz-fuzzer 37957 517991 84170 0 3 0x4000082 thrsleep syz-fuzzer 37957 181309 84170 0 3 0x4000082 thrsleep syz-fuzzer 37957 497930 84170 0 3 0x4000082 thrsleep syz-fuzzer 37957 190930 84170 0 3 0x4000082 thrsleep syz-fuzzer 37957 5960 84170 0 3 0x4000082 thrsleep syz-fuzzer 37957 250826 84170 0 3 0x4000082 thrsleep syz-fuzzer 37957 128512 84170 0 3 0x4000082 kqread syz-fuzzer 37957 170955 84170 0 3 0x4000082 thrsleep syz-fuzzer 84170 71791 89702 0 3 0x10008a pause ksh 89702 416693 67349 0 3 0x92 select sshd 67349 266096 1 0 3 0x80 select sshd 35263 110105 35944 73 7 0x100010 syslogd 35944 170838 1 0 3 0x100082 netio syslogd 41691 272014 1 77 3 0x100090 poll dhclient 88754 434677 1 0 3 0x80 poll dhclient 49843 426579 0 0 3 0x14200 pgzero zerothread 92992 9106 0 0 3 0x14200 aiodoned aiodoned 4075 45722 0 0 3 0x14200 syncer update 5207 175805 0 0 3 0x14200 cleaner cleaner *65208 447104 0 0 7 0x14200 reaper 98916 419981 0 0 3 0x14200 pgdaemon pagedaemon 84977 363184 0 0 3 0x14200 bored crynlk 24816 416455 0 0 3 0x14200 bored crypto 96604 322441 0 0 3 0x40014200 acpi0 acpi0 16983 299639 0 0 3 0x40014200 idle1 1512 289217 0 0 3 0x14200 bored softnet 18583 246977 0 0 3 0x14200 bored systqmp 63533 386035 0 0 3 0x14200 bored systq 82312 247025 0 0 3 0x40014200 bored softclock 7334 357803 0 0 3 0x40014200 idle0 1 440707 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 69437 (syz-executor1) thread 0xffff800020b93080 (297551) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff822efac0) locked @ /syzkaller/managers/multicore/kernel/sys/kern/sched_bsd.c:429 exclusive rrwlock inode r = 0 (0xfffffd8078b31c58) locked @ /syzkaller/managers/multicore/kernel/sys/ufs/ufs/ufs_ihash.c:140 exclusive rrwlock inode r = 0 (0xfffffd8078b31b48) locked @ /syzkaller/managers/multicore/kernel/sys/ufs/ufs/ufs_vnops.c:1547 Process 69437 (syz-executor1) thread 0xffff800020b93788 (363265) exclusive rrwlock inode r = 0 (0xfffffd8072873b40) locked @ /syzkaller/managers/multicore/kernel/sys/ufs/ufs/ufs_vnops.c:1547 Process 35263 (syslogd) thread 0xffff800020be5780 (110105) exclusive rrwlock inode r = 0 (0xfffffd806eb9a3c8) locked @ /syzkaller/managers/multicore/kernel/sys/ufs/ufs/ufs_vnops.c:1547 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9570 10472K 10480K 78643K 12654 0 0 pcb 23 9K 11K 78643K 5068 0 0 rtable 100 3K 4K 78643K 992 0 0 ifaddr 70 17K 20K 78643K 556 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 29 0 0 iov 0 0K 28K 78643K 919 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1193 75K 76K 78643K 7269 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 157 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 994 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1792 194K 288K 78643K 12592 0 0 file desc 6 17K 25K 78643K 9480 0 0 sigio 0 0K 0K 78643K 155 0 0 proc 42 38K 70K 78643K 1709 0 0 subproc 64 65538K 67586K 78643K 100 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 1202 0 0 in_multi 33 2K 2K 78643K 436 0 0 ether_multi 1 0K 0K 78643K 64 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 126 556K 556K 78643K 126 0 0 exec 0 0K 1K 78643K 877 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 130 23K 42K 78643K 31283 0 0 UVM aobj 130 4K 4K 78643K 141 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 1K 78643K 246 0 0 NDP 16 0K 0K 78643K 154 0 0 temp 197 2360K 2436K 78643K 27721 0 0 kqueue 0 0K 0K 78643K 96 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 4 0 0 1 0 1 1 0 8 0 inpcbpl 280 4203 0 4196 1 0 1 1 0 8 0 plimitpl 152 133 0 126 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 41 0 1 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 13 0 13 1 1 0 1 0 8 0 tcpcb 544 1366 0 1362 1 0 1 1 0 8 0 nd6 48 4 0 0 1 0 1 1 0 8 0 ppxss 1128 93 0 93 38 38 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 185 0 0 12 0 12 12 0 8 0 art_table 32 186 0 0 2 0 2 2 0 8 0 art_node 16 40 0 6 1 0 1 1 0 8 0 sysvmsgpl 40 36 0 23 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 989 0 979 1 0 1 1 0 8 0 shmpl 112 139 0 11 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 19755 0 18188 51 0 51 51 0 8 0 ffsino 272 19755 0 18188 105 0 105 105 0 8 0 nchpl 144 33818 0 32236 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 106505 0 106504 4 3 1 1 0 8 0 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 25 0 25 17 17 0 1 0 8 0 scxspl 192 98389 0 98389 47 46 1 7 0 8 1 sigapl 432 9662 0 9648 2 0 2 2 0 8 0 futexpl 56 114868 0 114868 2 1 1 1 0 8 1 knotepl 112 2702 0 2675 17 16 1 2 0 8 0 kqueuepl 104 3343 0 3341 1 0 1 1 0 8 0 pipepl 112 6340 0 6321 17 16 1 2 0 8 0 fdescpl 488 9663 0 9648 3 1 2 3 0 8 0 filepl 152 60728 0 60624 31 26 5 7 0 8 0 lockfpl 96 2562 0 2562 21 20 1 1 0 8 1 lockfspl 24 5332 0 5332 20 19 1 1 0 8 1 sessionpl 112 32 0 22 1 0 1 1 0 8 0 pgrppl 48 174 0 164 1 0 1 1 0 8 0 ucredpl 96 21695 0 21687 1 0 1 1 0 8 0 zombiepl 144 9649 0 9648 5 4 1 1 0 8 0 processpl 840 9678 0 9648 4 0 4 4 0 8 0 procpl 600 30187 0 30143 5 1 4 5 0 8 0 sosppl 128 236 0 236 51 51 0 1 0 8 0 sockpl 384 9037 0 9020 17 14 3 4 0 8 1 mcl64k 65536 1430 0 0 130 68 62 66 0 8 1 mcl16k 16384 17 0 0 3 0 3 3 0 8 0 mcl12k 12288 60 0 0 2 0 2 2 0 8 0 mcl9k 9216 25 0 0 2 0 2 2 0 8 0 mcl8k 8192 25 0 0 4 1 3 3 0 8 0 mcl4k 4096 49 0 0 6 3 3 3 0 8 0 mcl2k2 2112 16 0 0 2 0 2 2 0 8 0 mcl2k 2048 157 0 0 11 2 9 11 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 1500 0 0 36 0 36 36 0 8 0 bufpl 256 21524 0 14555 436 0 436 436 0 8 0 anonpl 16 1090417 0 1083123 378 332 46 54 0 125 10 amapchunkpl 152 62433 0 62343 258 249 9 96 0 158 5 amappl16 192 63654 0 63273 462 433 29 32 0 8 8 amappl15 184 7 0 5 1 0 1 1 0 8 0 amappl14 176 6 0 4 2 1 1 1 0 8 0 amappl13 168 20 0 17 1 0 1 1 0 8 0 amappl12 160 4714 0 4712 2 1 1 1 0 8 0 amappl11 152 185 0 176 1 0 1 1 0 8 0 amappl10 144 74 0 72 2 1 1 1 0 8 0 amappl9 136 347 0 346 1 0 1 1 0 8 0 amappl8 128 4984 0 4918 4 1 3 3 0 8 0 amappl7 120 32 0 27 1 0 1 1 0 8 0 amappl6 112 53 0 43 1 0 1 1 0 8 0 amappl5 104 221 0 211 1 0 1 1 0 8 0 amappl4 96 405 0 380 2 1 1 2 0 8 0 amappl3 88 5956 0 5949 1 0 1 1 0 8 0 amappl2 80 95857 0 95796 2 0 2 2 0 8 0 amappl1 72 213207 0 212763 24 14 10 19 0 8 0 amappl 72 30580 0 30543 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 140 0 11 3 0 3 3 0 8 0 uaddrrnd 24 9663 0 9648 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 9663 0 9648 1 0 1 1 0 8 0 vmmpekpl 168 87276 0 87253 2 0 2 2 0 8 0 vmmpepl 168 1040037 0 1038558 328 253 75 76 0 357 5 vmsppl 360 9662 0 9648 2 0 2 2 0 8 0 pdppl 4096 19333 0 19296 6 1 5 6 0 8 0 pvpl 32 2776557 0 2766042 604 482 122 141 0 265 27 pmappl 224 9662 0 9648 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 760 0 80 20 0 20 20 0 8 0