panic: ufs_rename: lost dir entry Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *185785 95085 0 0 0x4000000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83415281) at panic+0x1cf sys/kern/subr_prf.c:198 ufs_rename(ffff80003c93f408) at ufs_rename+0x175f sys/ufs/ufs/ufs_vnops.c:883 VOP_RENAME(fffffd806c46b510,fffffd806c46b438,ffff80003c93f5d8,fffffd806c46b510,0,ffff80003c93f528) at VOP_RENAME+0x137 sys/kern/vfs_vops.c:376 dorenameat(ffff80003c965780,ffffff9c,200000000600,ffffff9c,200000000f40) at dorenameat+0x3f7 sys/kern/vfs_syscalls.c:3034 syscall(ffff80003c93f760) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c93f760) at syscall+0x962 sys/arch/amd64/amd64/trap.c:775 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x2f2b2eb2a40, count: 8 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> ddb> set $lines = 0 ddb> set $maxwidth = 0 ddb> show panic *cpu0: ufs_rename: lost dir entry ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83415281) at panic+0x1cf sys/kern/subr_prf.c:198 ufs_rename(ffff80003c93f408) at ufs_rename+0x175f sys/ufs/ufs/ufs_vnops.c:883 VOP_RENAME(fffffd806c46b510,fffffd806c46b438,ffff80003c93f5d8,fffffd806c46b510,0,ffff80003c93f528) at VOP_RENAME+0x137 sys/kern/vfs_vops.c:376 dorenameat(ffff80003c965780,ffffff9c,200000000600,ffffff9c,200000000f40) at dorenameat+0x3f7 sys/kern/vfs_syscalls.c:3034 syscall(ffff80003c93f760) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c93f760) at syscall+0x962 sys/arch/amd64/amd64/trap.c:775 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x2f2b2eb2a40, count: -7 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80003c93f1a0 rbx 0xfffffd806c46b288 rdx 0 rcx 0 rax 0xffff80003c965780 r8 0x101010101010101 r9 0x8080808080808080 r10 0x43eead06679b91d9 r11 0x177b1db8fe188b1a r12 0 r13 0xfffffd806cb50f00 r14 0 r15 0x1 rip 0xffffffff82dbafd5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c93f190 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=185785 pid=95085 tcnt=4 stat=onproc flags process=0 proc=4000000 runpri=17, usrpri=50, slppri=17, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80003c964028,0xffff80003c964a98 process=0xffff8000ffff8498 user=0xffff80003c93a000, vmspace=0xfffffd806c99fb90 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 95085 12813 82253 0 3 0x80 nanoslp syz-executor *95085 185785 82253 0 7 0x4000000 syz-executor 95085 361938 82253 0 2 0x4000000 syz-executor 95085 323010 82253 0 3 0x4000080 fsleep syz-executor 45299 338801 2270 0 3 0x80 fsleep syz-executor 45299 366748 2270 0 3 0x4000080 kqread syz-executor 5585 439436 89187 0 3 0x80 fsleep syz-executor 5585 302091 89187 0 3 0x4000080 dtread syz-executor 41090 2965 9601 0 3 0x80 fsleep syz-executor 41090 249094 9601 0 3 0x4000080 fifor syz-executor 55887 18110 77605 0 3 0x80 fsleep syz-executor 55887 42326 77605 0 3 0x4000080 pipewr syz-executor 99442 243748 4610 0 3 0x80 fsleep syz-executor 99442 251626 4610 0 3 0x4000080 kqread syz-executor 72564 506076 63049 0 3 0x80 fsleep syz-executor 72564 154980 63049 0 3 0x4000080 fsleep syz-executor 72564 224712 63049 0 3 0x4000080 fifor syz-executor 98650 411191 1 0 3 0x100083 ttyin getty 48927 346403 56757 0 3 0x82 wait syz-executor 2270 172036 56757 0 3 0x82 nanoslp syz-executor 4610 24534 56757 0 3 0x82 nanoslp syz-executor 77605 314204 56757 0 3 0x82 nanoslp syz-executor 89187 354499 56757 0 3 0x82 nanoslp syz-executor 9601 254538 56757 0 3 0x82 nanoslp syz-executor 82253 46188 56757 0 3 0x82 nanoslp syz-executor 63049 294376 56757 0 3 0x82 nanoslp syz-executor 56757 238531 34726 0 3 0x82 kqread syz-executor 34726 64774 9489 0 3 0x10008a sigsusp ksh 9489 337557 57744 0 3 0x98 kqread sshd-session 57744 224864 75916 0 3 0x92 kqread sshd-session 75916 55206 1 0 3 0x88 kqread sshd 31461 194455 82443 73 3 0x1100090 kqread syslogd 82443 493864 1 0 3 0x100082 sbwait syslogd 75087 368681 1 0 3 0x100080 kqread resolvd 8772 328656 91369 77 3 0x100092 kqread dhcpleased 23969 348819 91369 77 3 0x100092 kqread dhcpleased 91369 458031 1 0 3 0x80 kqread dhcpleased 67696 210625 0 0 3 0x14200 bored smr 26658 309746 0 0 3 0x14200 pgzero zerothread 28813 298338 0 0 3 0x14200 aiodoned aiodoned 81160 269022 0 0 3 0x14200 syncer update 19162 9029 0 0 3 0x14200 cleaner cleaner 87790 293023 0 0 3 0x14200 reaper reaper 56940 384207 0 0 3 0x14200 pgdaemon pagedaemon 30858 361936 0 0 3 0x14200 bored viomb 14413 232773 0 0 3 0x40014200 acpi0 acpi0 97397 464868 0 0 3 0x14200 bored softnet0 20042 264223 0 0 3 0x14200 bored systqmp 19553 234522 0 0 3 0x14200 bored systq 78923 336966 0 0 3 0x40014200 tmoslp softclock 53771 315722 0 0 3 0x40014200 idle0 1 122578 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb> show all locks No such command ddb> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 11052 12324K 13232K 166960K 13307 0 pcb 17 15K 16K 166960K 176 0 rtable 210 9K 9K 166960K 453 0 pf 30 12K 16K 166960K 78 0 ifaddr 37 6K 7K 166960K 62 0 ifgroup 48 2K 2K 166960K 87 0 sysctl 3 1K 9K 166960K 11 0 counters 34 17K 18K 166960K 58 0 ioctlops 0 0K 4K 166960K 156 0 iov 0 0K 29K 166960K 35 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1502 94K 94K 166960K 1950 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 4 0 VM map 2 1K 1K 166960K 2 0 sem 9 0K 0K 166960K 13 0 dirhash 12 2K 2K 166960K 30 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 18 65K 240K 166960K 670 0 sigio 0 0K 0K 166960K 6 0 proc 60 59K 91K 166960K 516 0 subproc 72 4K 4K 166960K 72 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 37 0 in_multi 77 5K 7K 166960K 113 0 ether_multi 1 0K 0K 166960K 1 0 mrt 1 0K 0K 166960K 5 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 97 440K 440K 166960K 97 0 exec 0 0K 1K 166960K 422 0 fusefs mount 1 32K 32K 166960K 1 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 238 151K 168K 166960K 7911 0 UVM aobj 59 10K 10K 166960K 61 0 pinsyscall 39 78K 92K 166960K 1734 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 32 0 NDP 11 0K 2K 166960K 42 0 temp 55 8668K 8745K 166960K 30804 0 kqueue 18 28K 32K 166960K 149 0 SYN cache 2 8K 16K 166960K 3 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle rtpcb 120 95 0 92 1 0 1 1 0 8 0 rtentry 136 126 0 44 4 0 4 4 0 8 0 unpcb 144 557 0 538 7 3 4 4 0 8 3 syncache 336 5 0 5 2 1 1 1 0 8 1 tcpqe 32 3 0 3 2 1 1 1 0 8 1 tcpcb 736 340 0 333 10 3 7 7 0 8 5 arp 96 22 0 4 1 0 1 1 0 8 0 ipq 40 2 0 0 1 0 1 1 0 8 0 ipqe 40 3 0 1 1 0 1 1 0 8 0 inpcb 328 748 0 738 10 3 7 7 0 8 5 ip6q 72 7 0 3 1 0 1 1 0 8 0 ip6af 40 11 0 7 1 0 1 1 0 8 0 nd6 112 26 0 9 1 0 1 1 0 8 0 pkpcb 40 2 0 2 1 0 1 1 0 8 1 kcovpl 48 8 0 0 1 0 1 1 0 8 0 ppxss 1072 22 0 20 1 0 1 1 0 8 0 pfanchor 1288 1 0 0 1 0 1 1 0 8 0 pfrule 1344 1 0 0 1 0 1 1 0 8 0 art_heap8 4096 3 0 0 3 0 3 3 0 8 0 art_heap4 256 518 0 177 30 0 30 30 0 8 5 art_table 40 521 0 177 5 0 5 5 0 8 0 art_node 32 126 0 54 1 0 1 1 0 8 0 sysvmsgpl 40 7 0 3 1 0 1 1 0 8 0 semupl 112 1 0 1 1 0 1 1 0 8 1 semapl 112 11 0 4 1 0 1 1 0 8 0 shmpl 112 56 0 2 2 0 2 2 0 8 0 dirhash 1024 29 0 12 3 0 3 3 0 8 0 dino2pl 256 2581 0 1073 95 0 95 95 0 8 0 ffsino 256 2581 0 1073 95 0 95 95 0 8 0 nchpl 144 3549 0 1850 64 0 64 64 0 8 0 rtmask 32 8 0 7 2 1 1 1 0 8 0 vnodes 216 3051 0 0 170 0 170 170 0 8 0 namei 1024 12441 0 12438 4 2 2 2 0 8 1 vcpupl 3904 2 0 0 1 0 1 1 0 8 0 vmpool 808 2 0 0 1 0 1 1 0 8 0 kstatmem 264 50 0 28 2 0 2 2 0 8 0 scsiplug 72 4 0 4 1 0 1 1 0 8 1 scxspl 216 13522 0 13522 9 1 8 8 1 8 8 plimitpl 152 182 0 165 1 0 1 1 0 8 0 sigapl 424 945 0 902 6 1 5 6 0 8 0 knotepl 120 33307 0 33041 17 7 10 17 0 8 1 kqueuepl 184 262 0 215 3 0 3 3 0 8 0 pipepl 304 232 0 204 5 0 5 5 0 8 2 fdescpl 448 932 0 902 5 1 4 5 0 8 0 filepl 120 5952 0 5700 13 1 12 12 0 8 4 lockfpl 104 354 0 352 2 0 2 2 0 8 1 lockfspl 48 157 0 155 1 0 1 1 0 8 0 sessionpl 144 23 0 15 1 0 1 1 0 8 0 pgrppl 48 34 0 18 1 0 1 1 0 8 0 ucredpl 104 772 0 761 1 0 1 1 0 8 0 zombiepl 144 1250 0 1249 2 1 1 1 0 8 0 processpl 1152 945 0 902 4 0 4 4 0 8 0 procpl 664 1880 0 1827 6 0 6 6 0 8 0 sosppl 176 1 0 1 1 0 1 1 0 8 1 sockpl 552 1425 0 1393 16 4 12 12 0 8 7 mcl64k 65536 25 0 25 2 1 1 1 0 8 1 mcl8k 8192 6 0 6 2 1 1 1 0 8 1 mcl4k 4096 3163 0 3107 16 7 9 15 0 8 2 mcl2k2 2112 1 0 1 1 0 1 1 0 8 1 mcl2k 2048 1215 0 1205 3 0 3 3 0 8 1 mtagpl 96 35 0 9 1 0 1 1 0 8 0 mbufpl 256 11025 0 10792 83 62 21 72 0 8 2 bufpl 280 4688 0 127 326 0 326 326 0 8 0 anonpl 24 165169 0 161946 82 22 60 60 0 187 28 amapchunkpl 152 33252 0 32740 41 5 36 36 0 158 16 amappl16 200 2615 0 2580 27 15 12 15 0 8 8 amappl15 192 5 0 5 2 1 1 1 0 8 1 amappl14 184 4 0 3 1 0 1 1 0 8 0 amappl13 176 405 0 404 1 0 1 1 0 8 0 amappl12 168 1279 0 1240 2 0 2 2 0 8 0 amappl11 160 6 0 6 1 1 0 1 0 8 0 amappl10 152 77 0 66 1 0 1 1 0 8 0 amappl9 144 252 0 252 1 1 0 1 0 8 0 amappl8 136 40 0 39 1 0 1 1 0 8 0 amappl7 128 77 0 76 1 0 1 1 0 8 0 amappl6 120 263 0 251 1 0 1 1 0 8 0 amappl5 112 96 0 88 1 0 1 1 0 8 0 amappl4 104 397 0 371 1 0 1 1 0 8 0 amappl3 96 4959 0 4844 4 0 4 4 0 8 0 amappl2 88 518 0 464 2 0 2 2 0 8 0 amappl1 80 11349 0 10815 13 1 12 13 0 8 0 amappl 88 7094 0 6925 5 0 5 5 0 92 0 uvmvnodes 80 117 0 0 3 0 3 3 0 8 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma1024 1024 2 0 1 1 0 1 1 0 8 0 dma256 256 7 0 7 2 1 1 1 0 8 1 dma128 128 253 0 253 1 1 0 1 0 8 0 dma64 64 7 0 7 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 18 0 17 1 0 1 1 0 8 0 aobjpl 72 60 0 2 2 0 2 2 0 8 0 uaddrrnd 24 932 0 902 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 932 0 902 1 0 1 1 0 8 0 vmmpekpl 168 9279 0 9247 3 0 3 3 0 8 0 vmmpepl 168 65688 0 63849 97 6 91 91 0 357 8 vmsppl 368 931 0 902 4 1 3 4 0 8 0 rwobjpl 40 19992 0 18964 14 1 13 13 0 8 0 pdppl 4096 1874 0 1806 96 28 68 78 0 8 0 pvpl 32 433249 0 424365 155 22 133 133 0 265 51 pmappl 216 933 0 902 2 0 2 2 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 458 0 109 12 1 11 12 0 8 0 ddb> machine ddbcpu 0 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83415281) at panic+0x1cf sys/kern/subr_prf.c:198 ufs_rename(ffff80003c93f408) at ufs_rename+0x175f sys/ufs/ufs/ufs_vnops.c:883 VOP_RENAME(fffffd806c46b510,fffffd806c46b438,ffff80003c93f5d8,fffffd806c46b510,0,ffff80003c93f528) at VOP_RENAME+0x137 sys/kern/vfs_vops.c:376 dorenameat(ffff80003c965780,ffffff9c,200000000600,ffffff9c,200000000f40) at dorenameat+0x3f7 sys/kern/vfs_syscalls.c:3034 syscall(ffff80003c93f760) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c93f760) at syscall+0x962 sys/arch/amd64/amd64/trap.c:775 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x2f2b2eb2a40, count: -7 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83415281) at panic+0x1cf sys/kern/subr_prf.c:198 ufs_rename(ffff80003c93f408) at ufs_rename+0x175f sys/ufs/ufs/ufs_vnops.c:883 VOP_RENAME(fffffd806c46b510,fffffd806c46b438,ffff80003c93f5d8,fffffd806c46b510,0,ffff80003c93f528) at VOP_RENAME+0x137 sys/kern/vfs_vops.c:376 dorenameat(ffff80003c965780,ffffff9c,200000000600,ffffff9c,200000000f40) at dorenameat+0x3f7 sys/kern/vfs_syscalls.c:3034 syscall(ffff80003c93f760) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c93f760) at syscall+0x962 sys/arch/amd64/amd64/trap.c:775 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x2f2b2eb2a40, count: -7