panic: ufs_rename: lost dir entry Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *351166 36797 0 0x8000000 0x4000000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82fc3bca) at panic+0x1cf sys/kern/subr_prf.c:198 ufs_rename(ffff80003641b418) at ufs_rename+0x18b2 VOP_RENAME(fffffd806a5ba518,fffffd806a5ba950,ffff80003641b5e8,fffffd806a5baa28,0,ffff80003641b538) at VOP_RENAME+0x13c sys/kern/vfs_vops.c:376 dorenameat(ffff80002a4d16e8,ffffff9c,20000540,ffffff9c,200005c0) at dorenameat+0x3f8 sys/kern/vfs_syscalls.c:3021 syscall(ffff80003641b780) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x46b180faed0, 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(ffffffff82fc3bca) at panic+0x1cf sys/kern/subr_prf.c:198 ufs_rename(ffff80003641b418) at ufs_rename+0x18b2 VOP_RENAME(fffffd806a5ba518,fffffd806a5ba950,ffff80003641b5e8,fffffd806a5baa28,0,ffff80003641b538) at VOP_RENAME+0x13c sys/kern/vfs_vops.c:376 dorenameat(ffff80002a4d16e8,ffffff9c,20000540,ffffff9c,200005c0) at dorenameat+0x3f8 sys/kern/vfs_syscalls.c:3021 syscall(ffff80003641b780) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x46b180faed0, count: -7 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80003641b1a0 rbx 0xfffffd806a5baa28 rdx 0 rcx 0 rax 0xffff80002a4d16e8 r8 0x101010101010101 r9 0x8080808080808080 r10 0x11a4fa236f5ab396 r11 0x560126cbd945fe7c r12 0 r13 0xfffffd80719ee878 r14 0 r15 0x1 rip 0xffffffff82287535 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003641b190 ss 0 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=351166 pid=36797 tcnt=4 stat=onproc flags process=8000000 proc=4000000 runpri=17, usrpri=84, slppri=17, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a4c2cc0,0xffff80002a4d0cd8 process=0xffff80002a464ce0 user=0xffff800036416000, vmspace=0xfffffd807ec842b0 estcpu=34, cpticks=0, pctcpu=0.0, user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 10937 371324 2893 0 2 0x8000000 syz-executor 10937 61481 2893 0 3 0xc000000 futex syz-executor 13373 510168 25428 0 2 0x8000000 syz-executor 13373 469688 25428 0 3 0xc000000 futex syz-executor 13373 219590 25428 0 2 0xc000000 syz-executor 69166 250885 50065 0 2 0x8000000 syz-executor 69166 29946 50065 0 3 0xc000000 futex syz-executor 31897 315399 1004 0 2 0x8000000 syz-executor 31897 136656 1004 0 2 0xc000000 syz-executor 31897 199252 1004 0 3 0xc000080 fsleep syz-executor 36797 159132 39296 0 2 0x8000000 syz-executor *36797 351166 39296 0 7 0xc000000 syz-executor 36797 125787 39296 0 2 0xc000000 syz-executor 36797 306489 39296 0 2 0xc000000 syz-executor 72569 346460 1570 0 2 0x8000000 syz-executor 72569 508857 1570 0 3 0xc000000 futex syz-executor 1644 265606 73772 0 2 0x8000000 syz-executor 1644 144747 73772 0 2 0xc000000 syz-executor 25428 40167 84786 0 3 0x8000082 nanoslp syz-executor 53581 92453 84786 0 2 0x8000002 syz-executor 50065 2645 84786 0 3 0x8000082 nanoslp syz-executor 1004 287686 84786 0 3 0x8000082 nanoslp syz-executor 2893 378846 84786 0 3 0x8000082 nanoslp syz-executor 39296 78466 84786 0 3 0x8000082 nanoslp syz-executor 1570 366940 84786 0 3 0x8000082 nanoslp syz-executor 73772 96635 84786 0 3 0x8000082 nanoslp syz-executor 34408 137357 1 0 3 0x18100083 ttyin getty 11451 461506 0 0 3 0x14200 acct acct 12876 418884 0 0 3 0x14200 bored sosplice 74324 277801 0 0 3 0x14280 nfsidl nfsio 74396 455079 0 0 3 0x14280 nfsidl nfsio 862 18582 0 0 3 0x14280 nfsidl nfsio 36330 219094 0 0 3 0x14280 nfsidl nfsio 20382 43978 0 0 3 0x14280 nfsidl nfsio 78816 82299 0 0 3 0x14280 nfsidl nfsio 30237 46263 0 0 3 0x14280 nfsidl nfsio 11335 2488 0 0 3 0x14280 nfsidl nfsio 90918 280525 0 0 3 0x14280 nfsidl nfsio 34476 193889 0 0 3 0x14280 nfsidl nfsio 3261 272595 0 0 3 0x14280 nfsidl nfsio 8260 58184 0 0 3 0x14280 nfsidl nfsio 84194 406426 0 0 3 0x14280 nfsidl nfsio 66747 237177 0 0 3 0x14280 nfsidl nfsio 60769 482305 0 0 3 0x14280 nfsidl nfsio 58741 423285 0 0 3 0x14280 nfsidl nfsio 85507 321776 0 0 3 0x14280 nfsidl nfsio 11784 287342 0 0 3 0x14280 nfsidl nfsio 20100 15239 0 0 3 0x14280 nfsidl nfsio 53160 413745 0 0 3 0x14280 nfsidl nfsio 84786 318776 90182 0 3 0x8000082 kqread syz-executor 90182 173003 52644 0 3 0x810008a sigsusp ksh 52644 368302 8616 0 3 0x18000098 kqread sshd-session 8616 33241 5375 0 3 0x18000092 kqread sshd-session 5375 418175 1 0 3 0x18000088 kqread sshd 73636 231676 59170 73 2 0x19100010 syslogd 59170 92460 1 0 3 0x18100082 sbwait syslogd 2232 296463 1 0 3 0x18100080 kqread resolvd 42844 409038 61091 77 3 0x18100092 kqread dhcpleased 87972 101438 61091 77 3 0x18100092 kqread dhcpleased 61091 182062 1 0 3 0x18000080 kqread dhcpleased 44476 334727 0 0 3 0x14200 bored smr 8360 162509 0 0 2 0x14200 zerothread 76753 330310 0 0 3 0x14200 aiodoned aiodoned 86784 444520 0 0 3 0x14200 syncer update 40892 288597 0 0 3 0x14200 cleaner cleaner 67526 267379 0 0 3 0x14200 reaper reaper 18177 515894 0 0 3 0x14200 pgdaemon pagedaemon 91829 49235 0 0 3 0x14200 bored viomb 76492 9481 0 0 3 0x40014200 acpi0 acpi0 94218 135225 0 0 3 0x14200 bored softnet3 37517 245007 0 0 3 0x14200 bored softnet2 33363 318589 0 0 3 0x14200 bored softnet1 22453 486884 0 0 3 0x14200 bored softnet0 56880 159587 0 0 3 0x14200 bored systqmp 35711 413703 0 0 3 0x14200 bored systq 98162 412426 0 0 3 0x40014200 tmoslp softclock 63161 417805 0 0 3 0x40014200 idle0 1 467078 0 0 3 0x8080082 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 10230 10366K 14384K 166960K 12578 0 pcb 17 18K 20K 166960K 235 0 rtable 221 7K 7K 166960K 1879 0 pf 34 13K 17K 166960K 170 0 ifaddr 44 8K 8K 166960K 271 0 ifgroup 54 2K 2K 166960K 268 0 sysctl 2 0K 0K 166960K 4 0 counters 31 17K 17K 166960K 88 0 ioctlops 0 0K 4K 166960K 189 0 iov 0 0K 32K 166960K 105 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1446 91K 91K 166960K 3020 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 31 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 126 0 dirhash 12 2K 2K 166960K 24 0 ACPI 1697 195K 286K 166960K 12548 0 file desc 17 61K 97K 166960K 1613 0 sigio 0 0K 0K 166960K 32 0 proc 58 59K 124K 166960K 1732 0 subproc 104 6K 7K 166960K 677 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 134 0 in_multi 99 7K 7K 166960K 598 0 ether_multi 1 0K 0K 166960K 5 0 mrt 1 0K 0K 166960K 3 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 259 1155K 1155K 166960K 259 0 exec 0 0K 1K 166960K 1092 0 pfkey data 0 0K 0K 166960K 3 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 224 76K 98K 166960K 14596 0 UVM aobj 44 4K 4K 166960K 50 0 pinsyscall 38 76K 96K 166960K 3722 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 75 0 NDP 16 0K 2K 166960K 169 0 temp 76 6816K 6896K 166960K 49556 0 kqueue 13 20K 32K 166960K 159 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 287 0 284 3 0 3 3 0 8 2 rtentry 112 663 0 563 4 0 4 4 0 8 1 unpcb 144 1675 0 1658 12 6 6 6 0 8 5 syncache 336 6 0 6 3 2 1 1 0 8 1 tcpqe 32 2 0 2 1 0 1 1 0 8 1 tcpcb 808 447 0 443 10 3 7 7 0 8 6 arp 88 105 0 87 1 0 1 1 0 8 0 ipq 40 3 0 3 1 0 1 1 0 8 1 ipqe 40 5 0 5 1 0 1 1 0 8 1 inpcb 336 1750 0 1743 26 18 8 15 0 8 7 nd6 104 160 0 136 1 0 1 1 0 8 0 pkpcb 40 8 0 8 3 2 1 1 0 8 1 kcovpl 48 52 0 44 1 0 1 1 0 8 0 ppxss 1072 10 0 10 2 1 1 1 0 8 1 pfstscr 40 4 0 3 1 0 1 1 0 8 0 pfosfp 40 1 0 0 1 0 1 1 0 8 0 pfosfpen 112 1 0 0 1 0 1 1 0 8 0 pfrktable 1344 1 0 1 1 0 1 1 0 8 1 pftag 88 3 0 2 1 0 1 1 0 8 0 pfstitem 24 2 0 0 1 0 1 1 0 8 0 pfstkey 128 12 0 10 2 1 1 1 0 8 0 pfstate 344 7 0 6 2 1 1 1 0 8 0 pfrule 1344 9 0 8 2 1 1 1 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 2449 0 1995 47 18 29 31 0 8 0 art_table 32 2451 0 1995 4 0 4 4 0 8 0 art_node 16 629 0 540 1 0 1 1 0 8 0 semapl 112 124 0 114 1 0 1 1 0 8 0 shmpl 112 47 0 6 2 0 2 2 0 8 0 dirhash 1024 25 0 8 3 0 3 3 0 8 0 dino2pl 256 3549 0 1965 100 0 100 100 0 8 0 ffsino 240 3549 0 1965 94 0 94 94 0 8 0 nchpl 144 5086 0 3353 65 0 65 65 0 8 0 uvmvnodes 80 4731 0 0 97 0 97 97 0 8 0 vnodes 216 4731 0 0 263 0 263 263 0 8 0 namei 1024 22652 0 22649 4 2 2 2 0 8 1 vcpupl 3904 5 0 0 1 0 1 1 0 8 0 vmpool 664 7 0 2 2 1 1 1 0 8 0 kstatmem 264 138 0 114 2 0 2 2 0 8 0 scsiplug 72 2 0 2 1 0 1 1 0 8 1 scxspl 216 32845 0 32845 11 3 8 8 1 8 8 plimitpl 152 282 0 265 1 0 1 1 0 8 0 sigapl 424 1826 0 1759 9 0 9 9 0 8 0 futexpl 64 17096 0 17094 1 0 1 1 0 8 0 knotepl 120 35060 0 35013 22 12 10 10 0 8 8 kqueuepl 184 513 0 502 9 3 6 6 0 8 5 pipepl 288 424 0 396 9 2 7 7 0 8 4 fdescpl 432 1787 0 1758 6 1 5 5 0 8 1 filepl 120 12848 0 12594 28 13 15 16 0 8 6 lockfpl 104 427 0 424 1 0 1 1 0 8 0 lockfspl 48 153 0 150 1 0 1 1 0 8 0 sessionpl 144 64 0 56 1 0 1 1 0 8 0 pgrppl 48 132 0 116 1 0 1 1 0 8 0 ucredpl 104 2270 0 2259 1 0 1 1 0 8 0 zombiepl 144 2242 0 2242 2 1 1 1 0 8 1 processpl 1096 1826 0 1759 6 0 6 6 0 8 0 procpl 648 3471 0 3393 9 1 8 8 0 8 1 sosppl 168 9 0 9 2 1 1 1 0 8 1 sockpl 504 3729 0 3702 111 99 12 30 0 8 8 mcl64k 65536 4 0 4 1 0 1 1 0 8 1 mcl9k 9216 1 0 1 1 0 1 1 0 8 1 mcl8k 8192 92 0 92 3 2 1 1 0 8 1 mcl4k 4096 5 0 5 2 1 1 1 0 8 1 mcl2k 2048 8540 0 8447 34 19 15 30 0 8 2 mtagpl 96 19 0 19 1 0 1 1 0 8 1 mbufpl 256 21551 0 21366 73 51 22 48 0 8 7 bufpl 280 8018 0 1773 447 0 447 447 0 8 0 anonpl 24 335109 0 331838 115 25 90 90 0 187 50 amapchunkpl 152 48698 0 48229 50 14 36 36 0 158 17 amappl16 200 7882 0 7865 46 37 9 24 0 8 8 amappl15 192 6 0 6 1 1 0 1 0 8 0 amappl14 184 197 0 187 1 0 1 1 0 8 0 amappl13 176 14 0 14 2 2 0 1 0 8 0 amappl12 168 3103 0 3074 3 1 2 3 0 8 0 amappl11 160 53 0 43 1 0 1 1 0 8 0 amappl10 152 13 0 13 1 1 0 1 0 8 0 amappl9 144 119 0 119 1 1 0 1 0 8 0 amappl8 136 29 0 28 1 0 1 1 0 8 0 amappl7 128 207 0 196 1 0 1 1 0 8 0 amappl6 120 589 0 587 1 0 1 1 0 8 0 amappl5 112 313 0 305 1 0 1 1 0 8 0 amappl4 104 423 0 406 1 0 1 1 0 8 0 amappl3 96 9240 0 9130 4 0 4 4 0 8 0 amappl2 88 1203 0 1146 2 0 2 2 0 8 0 amappl1 80 14460 0 13915 15 2 13 14 0 8 1 amappl 88 13855 0 13690 5 0 5 5 0 92 0 dma16384 16384 2 0 2 1 1 0 1 0 8 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 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 19 0 18 1 0 1 1 0 8 0 aobjpl 72 49 0 6 1 0 1 1 0 8 0 uaddrrnd 24 1794 0 1760 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1794 0 1760 1 0 1 1 0 8 0 vmmpekpl 168 16265 0 16196 4 0 4 4 0 8 0 vmmpepl 168 118462 0 116706 111 10 101 101 0 357 23 vmsppl 344 1793 0 1760 5 1 4 4 0 8 0 rwobjpl 24 41748 0 36117 36 1 35 35 0 8 0 pdppl 4096 3594 0 3525 191 116 75 82 0 8 6 pvpl 32 904619 0 894990 389 130 259 259 0 265 158 pmappl 216 1793 0 1760 4 1 3 3 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 717 0 336 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(ffffffff82fc3bca) at panic+0x1cf sys/kern/subr_prf.c:198 ufs_rename(ffff80003641b418) at ufs_rename+0x18b2 VOP_RENAME(fffffd806a5ba518,fffffd806a5ba950,ffff80003641b5e8,fffffd806a5baa28,0,ffff80003641b538) at VOP_RENAME+0x13c sys/kern/vfs_vops.c:376 dorenameat(ffff80002a4d16e8,ffffff9c,20000540,ffffff9c,200005c0) at dorenameat+0x3f8 sys/kern/vfs_syscalls.c:3021 syscall(ffff80003641b780) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x46b180faed0, 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(ffffffff82fc3bca) at panic+0x1cf sys/kern/subr_prf.c:198 ufs_rename(ffff80003641b418) at ufs_rename+0x18b2 VOP_RENAME(fffffd806a5ba518,fffffd806a5ba950,ffff80003641b5e8,fffffd806a5baa28,0,ffff80003641b538) at VOP_RENAME+0x13c sys/kern/vfs_vops.c:376 dorenameat(ffff80002a4d16e8,ffffff9c,20000540,ffffff9c,200005c0) at dorenameat+0x3f8 sys/kern/vfs_syscalls.c:3021 syscall(ffff80003641b780) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x46b180faed0, count: -7