panic: ufs_rename: lost dir entry Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *422538 25630 0 0x1000 0x4080000 0 syz-executor.4 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8258d584) at panic+0x161 sys/kern/subr_prf.c:198 ufs_rename(ffff80002e9457f8) at ufs_rename+0x1649 sys/ufs/ufs/ufs_vnops.c:909 VOP_RENAME(fffffd807efd21b0,fffffd80695fa638,ffff80002e9459c8,fffffd8067e99ea0,fffffd80695fa8c0,ffff80002e945918) at VOP_RENAME+0xf0 sys/kern/vfs_vops.c:370 dorenameat(ffff800021703ce0,7,20000180,9,200001c0) at dorenameat+0x29c sys/kern/vfs_syscalls.c:3033 syscall(ffff80002e945b60) at syscall+0x446 sys/arch/amd64/amd64/trap.c:599 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x3610538f290, 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+0x18 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8258d584) at panic+0x161 sys/kern/subr_prf.c:198 ufs_rename(ffff80002e9457f8) at ufs_rename+0x1649 sys/ufs/ufs/ufs_vnops.c:909 VOP_RENAME(fffffd807efd21b0,fffffd80695fa638,ffff80002e9459c8,fffffd8067e99ea0,fffffd80695fa8c0,ffff80002e945918) at VOP_RENAME+0xf0 sys/kern/vfs_vops.c:370 dorenameat(ffff800021703ce0,7,20000180,9,200001c0) at dorenameat+0x29c sys/kern/vfs_syscalls.c:3033 syscall(ffff80002e945b60) at syscall+0x446 sys/arch/amd64/amd64/trap.c:599 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x3610538f290, count: -7 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002e945590 rbx 0xfffffd80695fa2d8 rdx 0 rcx 0 rax 0xffff800021703ce0 r8 0 r9 0x8080808080808080 r10 0x1cbefe798211c9b7 r11 0x473e5eb5d0ab10a9 r12 0 r13 0xfffffd80688e5690 r14 0 r15 0x1 rip 0xffffffff81208648 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80002e945580 ss 0 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.4) pid=422538 stat=onproc flags process=1000 proc=4080000 pri=32, usrpri=83, nice=20 forw=0xffffffffffffffff, list=0xffff800021791cf0,0xffff800021777cf8 process=0xffff800024c2a800 user=0xffff80002e940000, vmspace=0xfffffd8079a2c110 estcpu=33, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 4823 173872 30003 0 2 0 syz-executor.2 4823 194877 30003 0 2 0x4000000 syz-executor.2 4823 487079 30003 0 3 0x4000000 inode syz-executor.2 4823 86040 30003 0 3 0x4000080 fsleep syz-executor.2 37825 101374 26991 0 2 0 syz-executor.6 37825 172741 26991 0 3 0x4000000 inode syz-executor.6 42558 339222 73143 0 2 0 syz-executor.7 42558 513735 73143 0 2 0x4000000 syz-executor.7 42558 390297 73143 0 3 0x4000000 inode syz-executor.7 82300 382757 31453 0 2 0 syz-executor.1 82300 270729 31453 0 2 0x4000480 syz-executor.1 82300 227696 31453 0 3 0x4000080 ttyout syz-executor.1 82300 240261 31453 0 2 0x4000480 syz-executor.1 *25630 422538 20221 0 7 0x4081000 syz-executor.4 25630 521819 20221 0 3 0x4003000 suspend syz-executor.4 86306 458004 10888 0 2 0 syz-executor.0 86306 6819 10888 0 3 0x4000080 fsleep syz-executor.0 86306 448447 10888 0 3 0x4000080 fsleep syz-executor.0 86306 142419 10888 0 3 0x4000080 fsleep syz-executor.0 93822 193169 87537 0 3 0x80 nanoslp syz-executor.5 93822 142369 87537 0 3 0x4000080 kqpoll syz-executor.5 93822 255771 87537 0 3 0x4000080 fsleep syz-executor.5 31453 6834 14699 0 3 0x82 nanoslp syz-executor.1 19342 340003 0 0 3 0x14200 bored sosplice 26991 258423 14699 0 2 0x482 syz-executor.6 73143 100750 14699 0 3 0x82 nanoslp syz-executor.7 20221 128875 14699 0 3 0x82 nanoslp syz-executor.4 69209 177979 14699 0 2 0x2 syz-executor.3 30003 330609 14699 0 3 0x82 nanoslp syz-executor.2 87537 100002 14699 0 3 0x82 nanoslp syz-executor.5 10888 386158 14699 0 3 0x82 nanoslp syz-executor.0 14699 259980 46344 0 3 0x82 thrsleep syz-fuzzer 14699 227182 46344 0 3 0x4000082 nanoslp syz-fuzzer 14699 266430 46344 0 3 0x4000082 wait syz-fuzzer 14699 182785 46344 0 3 0x4000082 wait syz-fuzzer 14699 55229 46344 0 3 0x4000082 thrsleep syz-fuzzer 14699 120217 46344 0 3 0x4000082 wait syz-fuzzer 14699 515401 46344 0 3 0x4000082 wait syz-fuzzer 14699 418151 46344 0 3 0x4000082 wait syz-fuzzer 14699 271348 46344 0 3 0x4000082 thrsleep syz-fuzzer 14699 6100 46344 0 3 0x4000082 thrsleep syz-fuzzer 14699 503316 46344 0 3 0x4000082 wait syz-fuzzer 14699 343921 46344 0 3 0x4000082 wait syz-fuzzer 14699 464727 46344 0 3 0x4000082 wait syz-fuzzer 14699 168754 46344 0 3 0x4000082 kqread syz-fuzzer 46344 304133 42365 0 3 0x10008a sigsusp ksh 42365 289920 25354 0 3 0x9a kqread sshd 25176 437449 1 0 3 0x100083 ttyin getty 25354 29941 1 0 3 0x88 kqread sshd 37648 163445 43649 73 3 0x1100090 kqread syslogd 43649 165685 1 0 3 0x100082 netio syslogd 62797 135970 1 0 3 0x100080 kqread resolvd 11268 432483 70558 77 3 0x100092 kqread dhcpleased 85009 58266 70558 77 3 0x100092 kqread dhcpleased 70558 464006 1 0 3 0x80 kqread dhcpleased 24617 209685 0 0 3 0x14200 bored smr 75125 295599 0 0 2 0x14200 zerothread 15132 438031 0 0 3 0x14200 aiodoned aiodoned 26766 227590 0 0 3 0x14200 syncer update 43296 127299 0 0 3 0x14200 cleaner cleaner 43105 328816 0 0 3 0x14200 reaper reaper 55513 121365 0 0 3 0x14200 pgdaemon pagedaemon 40625 503636 0 0 3 0x14200 bored viomb 47512 416857 0 0 3 0x40014200 acpi0 acpi0 1809 357339 0 0 3 0x14200 bored softnet 23602 11131 0 0 3 0x14200 bored softnet 44713 313881 0 0 3 0x14200 bored softnet 75442 420645 0 0 3 0x14200 bored softnet 70854 252314 0 0 3 0x14200 bored systqmp 40045 183746 0 0 3 0x14200 bored systq 43670 101649 0 0 3 0x40014200 bored softclock 59678 352719 0 0 3 0x40014200 idle0 1 499602 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 10181 6463K 6852K 78643K 11828 0 pcb 13 9K 10K 78643K 128 0 rtable 199 7K 7K 78643K 464 0 ifaddr 71 15K 17K 78643K 141 0 counters 26 17K 17K 78643K 47 0 ioctlops 0 0K 2K 78643K 61 0 iov 0 0K 16K 78643K 38 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1342 84K 84K 78643K 1676 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 9K 78643K 11 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 0K 78643K 82 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 17 61K 66K 78643K 641 0 sigio 0 0K 0K 78643K 38 0 proc 57 59K 75K 78643K 526 0 subproc 104 6K 6K 78643K 117 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 4 0 in_multi 77 5K 6K 78643K 121 0 ether_multi 1 0K 0K 78643K 1 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 55 254K 254K 78643K 55 0 exec 0 0K 1K 78643K 410 0 pfkey data 0 0K 0K 78643K 3 0 tdb 3 0K 0K 78643K 3 0 pagedep 1 8K 8K 78643K 1 0 inodedep 1 32K 32K 78643K 1 0 newblk 1 0K 0K 78643K 1 0 VM swap 8 62K 64K 78643K 10 0 UVM amap 281 177K 179K 78643K 5659 0 UVM aobj 13 2K 2K 78643K 13 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 18 0 NDP 9 0K 2K 78643K 40 0 temp 116 4689K 4754K 78643K 18756 0 kqueue 15 24K 30K 78643K 211 0 SYN cache 2 16K 16K 78643K 2 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle rtpcb 120 58 0 55 1 0 1 1 0 8 0 rtentry 112 148 0 59 4 0 4 4 0 8 0 unpcb 144 357 0 344 4 0 4 4 0 8 3 syncache 296 9 0 9 2 1 1 1 0 8 1 tcpqe 32 90 0 90 1 1 0 1 0 8 0 tcpcb 776 147 0 143 6 2 4 4 0 8 3 arp 88 23 0 9 1 0 1 1 0 8 0 inpcb 336 439 0 432 9 5 4 7 0 8 3 nd6 48 27 0 9 1 0 1 1 0 8 0 pkpcb 40 3 0 3 1 1 0 1 0 8 0 kcovpl 48 9 0 1 1 0 1 1 0 8 0 ppxss 1160 11 0 11 2 1 1 1 0 8 1 pppxif 1608 8 0 8 1 1 0 1 0 8 0 pfanchor 1280 367 0 0 31 0 31 31 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 576 0 205 29 2 27 29 0 8 3 art_table 32 577 0 205 4 0 4 4 0 8 0 art_node 16 147 0 67 1 0 1 1 0 8 0 sysvmsgpl 40 29 0 0 1 0 1 1 0 8 0 semapl 112 80 0 70 1 0 1 1 0 8 0 shmpl 112 10 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2375 0 938 91 0 91 91 0 8 0 ffsino 240 2375 0 938 85 0 85 85 0 8 0 nchpl 144 3863 0 2245 63 0 63 63 0 8 0 uvmvnodes 80 2773 0 0 57 0 57 57 0 8 0 vnodes 216 2773 0 0 155 0 155 155 0 8 0 namei 1024 15955 0 15949 3 1 2 2 0 8 0 vcpupl 2048 6 0 0 1 0 1 1 0 8 0 vmpool 536 6 0 0 1 0 1 1 0 8 0 kstatmem 264 42 0 24 2 0 2 2 0 8 0 scxspl 216 11679 0 11679 9 5 4 8 0 8 4 plimitpl 152 82 0 66 1 0 1 1 0 8 0 sigapl 424 931 0 886 6 0 6 6 0 8 0 futexpl 64 6943 0 6938 1 0 1 1 0 8 0 knotepl 120 10735 0 10652 6 0 6 6 0 8 2 kqueuepl 184 329 0 317 4 3 1 4 0 8 0 pipepl 288 314 0 285 8 3 5 7 0 8 2 fdescpl 432 914 0 886 4 0 4 4 0 8 0 filepl 120 6915 0 6525 16 4 12 15 0 8 0 lockfpl 104 89 0 87 1 0 1 1 0 8 0 lockfspl 48 42 0 40 1 0 1 1 0 8 0 sessionpl 144 24 0 8 1 0 1 1 0 8 0 pgrppl 48 24 0 8 1 0 1 1 0 8 0 ucredpl 104 714 0 703 1 0 1 1 0 8 0 zombiepl 144 887 0 886 1 0 1 1 0 8 0 processpl 1000 931 0 886 7 1 6 6 0 8 0 procpl 672 1952 0 1878 7 0 7 7 0 8 0 sosppl 168 2 0 2 1 0 1 1 0 8 1 sockpl 456 857 0 834 13 2 11 12 0 8 8 mcl64k 65536 28 0 28 1 0 1 1 0 8 1 mcl16k 16384 11 0 11 2 1 1 1 0 8 1 mcl12k 12288 30 0 30 1 0 1 1 0 8 1 mcl9k 9216 2 0 2 2 1 1 1 0 8 1 mcl8k 8192 54 0 54 2 1 1 1 0 8 1 mcl4k 4096 90 0 90 2 1 1 1 0 8 1 mcl2k2 2112 3 0 3 2 1 1 1 0 8 1 mcl2k 2048 75755 0 75684 33 22 11 29 0 8 1 mtagpl 96 95 0 7 4 1 3 3 0 8 0 mbufpl 256 125964 0 125622 85 60 25 65 0 8 1 bufpl 288 5318 0 127 371 0 371 371 0 8 0 anonpl 24 225995 0 210318 113 0 113 113 0 188 8 amapchunkpl 152 17029 0 16275 34 0 34 34 0 158 5 amappl16 200 3468 0 2916 33 2 31 32 0 8 1 amappl15 192 13 0 11 1 0 1 1 0 8 0 amappl14 184 155 0 139 2 0 2 2 0 8 0 amappl13 176 4 0 4 2 1 1 1 0 8 1 amappl12 168 421 0 416 1 0 1 1 0 8 0 amappl11 160 45 0 35 1 0 1 1 0 8 0 amappl10 152 34 0 24 1 0 1 1 0 8 0 amappl9 144 939 0 938 1 0 1 1 0 8 0 amappl8 136 151 0 100 2 0 2 2 0 8 0 amappl7 128 51 0 39 1 0 1 1 0 8 0 amappl6 120 258 0 246 2 1 1 2 0 8 0 amappl5 112 100 0 92 1 0 1 1 0 8 0 amappl4 104 472 0 452 2 1 1 2 0 8 0 amappl3 96 2145 0 2086 2 0 2 2 0 8 0 amappl2 88 1274 0 1206 3 1 2 3 0 8 0 amappl1 80 22904 0 22150 21 5 16 21 0 8 0 amappl 88 5374 0 5174 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 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 12 0 0 1 0 1 1 0 8 0 uaddrrnd 24 920 0 886 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 920 0 886 1 0 1 1 0 8 0 vmmpekpl 168 12546 0 12502 3 0 3 3 0 8 0 vmmpepl 168 91533 0 88819 136 11 125 134 0 357 6 vmsppl 272 919 0 886 4 1 3 3 0 8 0 rwobjpl 24 29272 0 24787 28 0 28 28 0 8 0 pdppl 4096 1846 0 1778 121 51 70 70 0 8 2 pvpl 32 493397 0 472536 270 18 252 270 0 265 69 pmappl 216 919 0 886 2 0 2 2 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 854 0 150 21 0 21 21 0 8 0 ddb> machine ddbcpu 0 No such command ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8258d584) at panic+0x161 sys/kern/subr_prf.c:198 ufs_rename(ffff80002e9457f8) at ufs_rename+0x1649 sys/ufs/ufs/ufs_vnops.c:909 VOP_RENAME(fffffd807efd21b0,fffffd80695fa638,ffff80002e9459c8,fffffd8067e99ea0,fffffd80695fa8c0,ffff80002e945918) at VOP_RENAME+0xf0 sys/kern/vfs_vops.c:370 dorenameat(ffff800021703ce0,7,20000180,9,200001c0) at dorenameat+0x29c sys/kern/vfs_syscalls.c:3033 syscall(ffff80002e945b60) at syscall+0x446 sys/arch/amd64/amd64/trap.c:599 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x3610538f290, count: -7 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8258d584) at panic+0x161 sys/kern/subr_prf.c:198 ufs_rename(ffff80002e9457f8) at ufs_rename+0x1649 sys/ufs/ufs/ufs_vnops.c:909 VOP_RENAME(fffffd807efd21b0,fffffd80695fa638,ffff80002e9459c8,fffffd8067e99ea0,fffffd80695fa8c0,ffff80002e945918) at VOP_RENAME+0xf0 sys/kern/vfs_vops.c:370 dorenameat(ffff800021703ce0,7,20000180,9,200001c0) at dorenameat+0x29c sys/kern/vfs_syscalls.c:3033 syscall(ffff80002e945b60) at syscall+0x446 sys/arch/amd64/amd64/trap.c:599 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x3610538f290, count: -7