panic: ufs_rename: lost dir entry Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *345312 83983 0 0x1010 0x4080000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82fca88b) at panic+0x1cf sys/kern/subr_prf.c:198 ufs_rename(ffff8000374376c8) at ufs_rename+0x18b2 VOP_RENAME(fffffd806c91d9a8,fffffd8075e5d870,ffff800037437898,fffffd8075e5d5e8,0,ffff8000374377e8) at VOP_RENAME+0x13c sys/kern/vfs_vops.c:376 dorenameat(ffff80002a4b0298,ffffff9c,20000540,ffffff9c,200005c0) at dorenameat+0x3f8 sys/kern/vfs_syscalls.c:3020 syscall(ffff800037437a30) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x8ea6e577370, 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:437 panic(ffffffff82fca88b) at panic+0x1cf sys/kern/subr_prf.c:198 ufs_rename(ffff8000374376c8) at ufs_rename+0x18b2 VOP_RENAME(fffffd806c91d9a8,fffffd8075e5d870,ffff800037437898,fffffd8075e5d5e8,0,ffff8000374377e8) at VOP_RENAME+0x13c sys/kern/vfs_vops.c:376 dorenameat(ffff80002a4b0298,ffffff9c,20000540,ffffff9c,200005c0) at dorenameat+0x3f8 sys/kern/vfs_syscalls.c:3020 syscall(ffff800037437a30) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x8ea6e577370, count: -7 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800037437450 rbx 0xfffffd8075e5d5e8 rdx 0 rcx 0 rax 0xffff80002a4b0298 r8 0x101010101010101 r9 0x8080808080808080 r10 0x433127d56251dab7 r11 0x41d0585b2cbbc93a r12 0 r13 0xfffffd807b3bca60 r14 0 r15 0x1 rip 0xffffffff823b2875 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff800037437440 ss 0 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=345312 pid=83983 tcnt=2 stat=onproc flags process=1010 proc=4080000 runpri=17, usrpri=82, slppri=17, nice=20 wchan=0x0, wmesg=, ps_single=0xffff80002a4d1bf8 scnt=1 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a4d1460,0xffff80002a4b0020 process=0xffff8000313f48a8 user=0xffff800037432000, vmspace=0xfffffd806bee9c28 estcpu=32, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 62001 415467 34144 0 2 0 syz-executor 62001 93697 34144 0 3 0x4000080 fsleep syz-executor 92338 188910 3808 0 2 0 syz-executor 92338 483419 3808 0 2 0x4000000 syz-executor 76789 379093 76751 0 2 0 syz-executor 76789 83829 76751 0 2 0x4000000 syz-executor 76789 231072 76751 0 3 0x4000080 fsleep syz-executor 83983 104261 81356 0 3 0x3010 suspend syz-executor *83983 345312 81356 0 7 0x4081010 syz-executor 47800 199718 76230 0 2 0 syz-executor 47800 30992 76230 0 2 0x4000000 syz-executor 47800 302007 76230 0 3 0x4000080 fsleep syz-executor 12496 178368 39537 0 2 0 syz-executor 12496 21850 39537 0 2 0x4000000 syz-executor 12496 108183 39537 0 3 0x4000080 fsleep syz-executor 12496 502517 39537 0 3 0x4000080 fsleep syz-executor 3808 420026 65603 0 3 0x82 nanoslp syz-executor 76230 280672 65603 0 3 0x82 nanoslp syz-executor 69403 98076 65603 0 2 0x2 syz-executor 34832 81616 65603 0 2 0x2 syz-executor 34144 380936 65603 0 3 0x82 nanoslp syz-executor 76751 495103 65603 0 3 0x82 nanoslp syz-executor 39537 279114 65603 0 3 0x82 nanoslp syz-executor 81356 417906 65603 0 3 0x82 nanoslp syz-executor 97873 40337 1 0 3 0x100083 ttyin getty 5889 140345 0 0 3 0x14200 acct acct 20053 336145 0 0 3 0x14200 bored sosplice 65603 484509 83628 0 3 0x82 kqread syz-executor 83628 207783 44610 0 3 0x10008a sigsusp ksh 44610 116505 59173 0 3 0x98 kqread sshd-session 59173 11043 83972 0 3 0x92 kqread sshd-session 83972 441665 1 0 3 0x88 kqread sshd 8218 183758 99451 73 2 0x1100010 syslogd 99451 165172 1 0 3 0x100082 sbwait syslogd 33552 359561 1 0 3 0x100080 kqread resolvd 64921 348189 67330 77 3 0x100092 kqread dhcpleased 78648 507202 67330 77 3 0x100092 kqread dhcpleased 67330 45422 1 0 3 0x80 kqread dhcpleased 89065 220053 0 0 3 0x14200 bored smr 2919 145766 0 0 2 0x14200 zerothread 16287 12059 0 0 3 0x14200 aiodoned aiodoned 69431 78359 0 0 3 0x14200 syncer update 36203 380415 0 0 3 0x14200 cleaner cleaner 15139 275286 0 0 3 0x14200 reaper reaper 63952 293075 0 0 3 0x14200 pgdaemon pagedaemon 78765 114557 0 0 3 0x14200 bored viomb 97831 252158 0 0 3 0x40014200 acpi0 acpi0 42812 427929 0 0 3 0x14200 bored softnet3 40180 5602 0 0 3 0x14200 bored softnet2 74178 506680 0 0 3 0x14200 bored softnet1 66765 113774 0 0 3 0x14200 bored softnet0 64525 308761 0 0 3 0x14200 bored systqmp 17684 42885 0 0 3 0x14200 bored systq 53769 47384 0 0 3 0x40014200 tmoslp softclock 26388 225635 0 0 3 0x40014200 idle0 1 290953 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 10189 14137K 14444K 166960K 12299 0 pcb 18 16K 17K 166960K 239 0 rtable 186 8K 9K 166960K 2267 0 pf 34 13K 20K 166960K 185 0 ifaddr 39 7K 8K 166960K 306 0 ifgroup 58 2K 2K 166960K 320 0 sysctl 3 0K 0K 166960K 3 0 counters 32 17K 18K 166960K 102 0 ioctlops 0 0K 4K 166960K 158 0 iov 0 0K 16K 166960K 79 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1405 88K 89K 166960K 2933 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 16 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 75 0 dirhash 15 2K 2K 166960K 24 0 ACPI 1690 195K 286K 166960K 12418 0 file desc 17 61K 89K 166960K 1748 0 sigio 0 0K 0K 166960K 27 0 proc 60 59K 91K 166960K 2232 0 subproc 104 6K 7K 166960K 872 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 99 0 in_multi 81 5K 7K 166960K 780 0 ether_multi 1 0K 0K 166960K 1 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 79 360K 360K 166960K 79 0 exec 0 0K 1K 166960K 1264 0 pfkey data 0 0K 0K 166960K 1 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 224 72K 98K 166960K 14306 0 UVM aobj 29 2K 2K 166960K 29 0 pinsyscall 38 76K 94K 166960K 4303 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 33 0 NDP 14 0K 2K 166960K 219 0 temp 64 6812K 6880K 166960K 43738 0 kqueue 15 24K 30K 166960K 149 0 SYN cache 2 16K 16K 166960K 2 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle rtpcb 120 227 0 224 1 0 1 1 0 8 0 rtentry 112 798 0 718 4 0 4 4 0 8 0 unpcb 144 813 0 794 9 5 4 6 0 8 3 syncache 336 4 0 4 2 1 1 1 0 8 1 tcpqe 32 1 0 1 1 0 1 1 0 8 1 tcpcb 808 217 0 208 5 1 4 4 0 8 3 arp 88 143 0 129 1 0 1 1 0 8 0 ipq 40 7 0 5 1 0 1 1 0 8 0 ipqe 40 96 0 94 1 0 1 1 0 8 0 inpcb 336 1506 0 1490 18 9 9 12 0 8 7 nd6 104 210 0 193 1 0 1 1 0 8 0 pkpcb 40 8 0 8 2 1 1 1 0 8 1 kcovpl 48 67 0 59 1 0 1 1 0 8 0 ppxss 1072 9 0 9 2 1 1 1 0 8 1 pfanchor 1288 1 0 0 1 0 1 1 0 8 0 pftag 88 2 0 0 1 0 1 1 0 8 0 pfrule 1344 2 0 2 1 1 0 1 0 8 0 art_heap8 4096 3 0 0 3 0 3 3 0 8 0 art_heap4 256 3209 0 2817 33 5 28 30 0 8 1 art_table 32 3212 0 2817 4 0 4 4 0 8 0 art_node 16 792 0 720 1 0 1 1 0 8 0 sysvmsgpl 40 13 0 7 1 0 1 1 0 8 0 semapl 112 72 0 62 1 0 1 1 0 8 0 shmpl 112 26 0 0 1 0 1 1 0 8 0 dirhash 1024 25 0 6 3 0 3 3 0 8 0 dino2pl 256 3169 0 1559 101 0 101 101 0 8 0 ffsino 240 3169 0 1559 95 0 95 95 0 8 0 nchpl 144 4425 0 2671 66 0 66 66 0 8 0 uvmvnodes 80 4463 0 0 92 0 92 92 0 8 0 vnodes 216 4463 0 0 248 0 248 248 0 8 0 namei 1024 20221 0 20219 4 1 3 3 0 8 2 kstatmem 264 166 0 140 3 0 3 3 0 8 1 scsiplug 72 4 0 4 2 1 1 1 0 8 1 scxspl 216 41078 0 41078 11 3 8 8 1 8 8 plimitpl 152 349 0 332 1 0 1 1 0 8 0 sigapl 424 1933 0 1886 8 0 8 8 0 8 2 futexpl 64 12104 0 12098 1 0 1 1 0 8 0 knotepl 120 34590 0 34520 12 2 10 11 0 8 7 kqueuepl 184 353 0 341 4 0 4 4 0 8 3 pipepl 288 362 0 335 3 0 3 3 0 8 0 fdescpl 432 1894 0 1865 5 1 4 5 0 8 0 filepl 120 9346 0 9086 20 7 13 16 0 8 5 lockfpl 104 248 0 245 1 0 1 1 0 8 0 lockfspl 48 97 0 94 1 0 1 1 0 8 0 sessionpl 144 83 0 75 1 0 1 1 0 8 0 pgrppl 48 166 0 150 1 0 1 1 0 8 0 ucredpl 104 1276 0 1263 1 0 1 1 0 8 0 zombiepl 144 2229 0 2228 2 1 1 1 0 8 0 processpl 1096 1933 0 1886 7 1 6 6 0 8 1 procpl 648 3195 0 3138 8 0 8 8 0 8 2 sosppl 168 8 0 8 2 1 1 1 0 8 1 sockpl 504 2563 0 2525 44 31 13 25 0 8 8 mcl64k 65536 10 0 10 2 1 1 1 0 8 1 mcl16k 16384 1 0 1 1 0 1 1 0 8 1 mcl12k 12288 1 0 1 1 0 1 1 0 8 1 mcl8k 8192 17 0 17 2 1 1 1 0 8 1 mcl4k 4096 6 0 6 2 1 1 1 0 8 1 mcl2k2 2112 1 0 1 1 0 1 1 0 8 1 mcl2k 2048 8211 0 8112 25 8 17 23 0 8 2 mtagpl 96 21 0 21 1 0 1 1 0 8 1 mbufpl 256 21397 0 21196 71 51 20 61 0 8 3 bufpl 280 11810 0 4782 503 0 503 503 0 8 0 anonpl 24 307625 0 304163 120 31 89 89 0 187 59 amapchunkpl 152 44752 0 44265 45 13 32 33 0 158 11 amappl16 200 5706 0 5691 38 30 8 26 0 8 7 amappl15 192 10 0 10 1 1 0 1 0 8 0 amappl14 184 230 0 220 1 0 1 1 0 8 0 amappl13 176 8 0 8 1 1 0 1 0 8 0 amappl12 168 3474 0 3446 2 0 2 2 0 8 0 amappl11 160 47 0 37 1 0 1 1 0 8 0 amappl10 152 12 0 12 1 1 0 1 0 8 0 amappl9 144 99 0 99 1 1 0 1 0 8 0 amappl8 136 39 0 37 1 0 1 1 0 8 0 amappl7 128 215 0 205 1 0 1 1 0 8 0 amappl6 120 831 0 829 1 0 1 1 0 8 0 amappl5 112 371 0 361 1 0 1 1 0 8 0 amappl4 104 459 0 443 1 0 1 1 0 8 0 amappl3 96 8760 0 8655 5 1 4 4 0 8 1 amappl2 88 1478 0 1415 2 0 2 2 0 8 0 amappl1 80 15771 0 15255 14 1 13 13 0 8 1 amappl 88 13461 0 13292 5 0 5 5 0 92 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma1024 1024 1 0 0 1 0 1 1 0 8 0 dma512 512 1 0 1 1 0 1 1 0 8 1 dma256 256 6 0 6 1 1 0 1 0 8 0 dma128 128 253 0 253 1 1 0 1 0 8 0 dma64 64 6 0 6 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 28 0 0 1 0 1 1 0 8 0 uaddrrnd 24 1893 0 1865 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1893 0 1865 1 0 1 1 0 8 0 vmmpekpl 168 15883 0 15827 3 0 3 3 0 8 0 vmmpepl 168 122142 0 120461 108 13 95 95 0 357 17 vmsppl 344 1892 0 1865 4 1 3 4 0 8 0 rwobjpl 24 40800 0 35466 33 0 33 33 0 8 0 pdppl 4096 3793 0 3730 194 123 71 79 0 8 8 pvpl 32 917770 0 907202 405 139 266 266 0 265 176 pmappl 216 1892 0 1865 2 0 2 2 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 612 0 235 12 0 12 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:437 panic(ffffffff82fca88b) at panic+0x1cf sys/kern/subr_prf.c:198 ufs_rename(ffff8000374376c8) at ufs_rename+0x18b2 VOP_RENAME(fffffd806c91d9a8,fffffd8075e5d870,ffff800037437898,fffffd8075e5d5e8,0,ffff8000374377e8) at VOP_RENAME+0x13c sys/kern/vfs_vops.c:376 dorenameat(ffff80002a4b0298,ffffff9c,20000540,ffffff9c,200005c0) at dorenameat+0x3f8 sys/kern/vfs_syscalls.c:3020 syscall(ffff800037437a30) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x8ea6e577370, count: -7 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82fca88b) at panic+0x1cf sys/kern/subr_prf.c:198 ufs_rename(ffff8000374376c8) at ufs_rename+0x18b2 VOP_RENAME(fffffd806c91d9a8,fffffd8075e5d870,ffff800037437898,fffffd8075e5d5e8,0,ffff8000374377e8) at VOP_RENAME+0x13c sys/kern/vfs_vops.c:376 dorenameat(ffff80002a4b0298,ffffff9c,20000540,ffffff9c,200005c0) at dorenameat+0x3f8 sys/kern/vfs_syscalls.c:3020 syscall(ffff800037437a30) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x8ea6e577370, count: -7