panic: ufs_rename: lost dir entry Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *272901 85603 0 0 0x4000000 0K syz-executor.1 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8275bdd8) at panic+0x177 sys/kern/subr_prf.c:198 ufs_rename(ffff80002e42b728) at ufs_rename+0x15b1 sys/ufs/ufs/ufs_vnops.c:909 VOP_RENAME(fffffd806eddc640,fffffd806421c380,ffff80002e42b8f8,fffffd807b1370e8,fffffd8064057018,ffff80002e42b848) at VOP_RENAME+0xf0 sys/kern/vfs_vops.c:370 dorenameat(ffff80002471a880,4,200001c0,ffffff9c,20000200) at dorenameat+0x29c sys/kern/vfs_syscalls.c:3033 syscall(ffff80002e42ba90) at syscall+0x5e2 mi_syscall sys/sys/syscall_mi.h:110 [inline] syscall(ffff80002e42ba90) at syscall+0x5e2 sys/arch/amd64/amd64/trap.c:625 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa350ee14710, 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{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic *cpu0: ufs_rename: lost dir entry ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8275bdd8) at panic+0x177 sys/kern/subr_prf.c:198 ufs_rename(ffff80002e42b728) at ufs_rename+0x15b1 sys/ufs/ufs/ufs_vnops.c:909 VOP_RENAME(fffffd806eddc640,fffffd806421c380,ffff80002e42b8f8,fffffd807b1370e8,fffffd8064057018,ffff80002e42b848) at VOP_RENAME+0xf0 sys/kern/vfs_vops.c:370 dorenameat(ffff80002471a880,4,200001c0,ffffff9c,20000200) at dorenameat+0x29c sys/kern/vfs_syscalls.c:3033 syscall(ffff80002e42ba90) at syscall+0x5e2 mi_syscall sys/sys/syscall_mi.h:110 [inline] syscall(ffff80002e42ba90) at syscall+0x5e2 sys/arch/amd64/amd64/trap.c:625 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa350ee14710, count: -7 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80002e42b4b0 rbx 0xffffffff82b25b8f cpu_info_full_primary+0x2b8f rdx 0 rcx 0 rax 0xffff80002471a880 r8 0x101010101010101 r9 0x8080808080808080 r10 0x34dd5ddfb710a640 r11 0x40c719fa32cf5dae r12 0xffffffff82b25990 cpu_info_full_primary+0x2990 r13 0 r14 0 r15 0x1 rip 0xffffffff81b420b8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80002e42b4a0 ss 0 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=272901 stat=onproc flags process=0 proc=4000000 pri=17, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff80002471b360,0xffff80002471a320 process=0xffff8000212865d0 user=0xffff80002e426000, vmspace=0xfffffd806b532008 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 18358 36723 43375 0 2 0 syz-executor.3 18358 366331 43375 0 2 0x4000000 syz-executor.3 23052 421228 47404 0 2 0 syz-executor.5 96249 251395 14218 0 2 0 syz-executor.7 85603 235225 13467 0 2 0 syz-executor.1 85603 38259 13467 0 3 0x4000080 fsleep syz-executor.1 85603 302183 13467 0 2 0x4000000 syz-executor.1 *85603 272901 13467 0 7 0x4000000 syz-executor.1 96497 403824 94059 0 2 0 syz-executor.0 96497 309213 94059 0 3 0x4000080 fsleep syz-executor.0 14218 5623 32971 0 3 0x82 nanoslp syz-executor.7 43375 172608 32971 0 3 0x82 nanoslp syz-executor.3 47404 180557 32971 0 3 0x82 nanoslp syz-executor.5 13467 465837 32971 0 3 0x82 nanoslp syz-executor.1 40994 177913 32971 0 2 0x2 syz-executor.2 65673 89421 1 0 3 0x100083 ttyopn getty 94059 345402 32971 0 3 0x82 nanoslp syz-executor.0 54992 374770 32971 0 2 0x2 syz-executor.4 56460 135509 32971 0 2 0x2 syz-executor.6 94650 66684 0 0 3 0x14200 bored sosplice 2238 123049 0 0 3 0x14280 nfsidl nfsio 54215 8208 0 0 3 0x14280 nfsidl nfsio 25709 97538 0 0 3 0x14280 nfsidl nfsio 554 257365 0 0 3 0x14280 nfsidl nfsio 46619 233854 0 0 3 0x14280 nfsidl nfsio 74850 3531 0 0 3 0x14280 nfsidl nfsio 41729 152559 0 0 3 0x14280 nfsidl nfsio 82359 288409 0 0 3 0x14280 nfsidl nfsio 9184 462224 0 0 3 0x14280 nfsidl nfsio 60019 418633 0 0 3 0x14280 nfsidl nfsio 98070 174861 0 0 3 0x14280 nfsidl nfsio 22144 212653 0 0 3 0x14280 nfsidl nfsio 9546 339365 0 0 3 0x14280 nfsidl nfsio 2522 125106 0 0 3 0x14280 nfsidl nfsio 10338 515806 0 0 3 0x14280 nfsidl nfsio 12368 496652 0 0 3 0x14280 nfsidl nfsio 75416 116446 0 0 3 0x14280 nfsidl nfsio 9220 95462 0 0 3 0x14280 nfsidl nfsio 39421 257470 0 0 3 0x14280 nfsidl nfsio 65369 332680 0 0 3 0x14280 nfsidl nfsio 32971 441870 94423 0 3 0x82 wait syz-fuzzer 32971 49721 94423 0 3 0x4000082 nanoslp syz-fuzzer 32971 419634 94423 0 2 0x4000002 syz-fuzzer 32971 471570 94423 0 3 0x4000082 wait syz-fuzzer 32971 397002 94423 0 3 0x4000082 wait syz-fuzzer 32971 128676 94423 0 3 0x4000082 thrsleep syz-fuzzer 32971 208064 94423 0 3 0x4000082 wait syz-fuzzer 32971 337889 94423 0 2 0x4000002 syz-fuzzer 32971 458400 94423 0 3 0x4000082 thrsleep syz-fuzzer 32971 315670 94423 0 3 0x4000082 thrsleep syz-fuzzer 32971 300749 94423 0 3 0x4000082 thrsleep syz-fuzzer 32971 488826 94423 0 3 0x4000082 thrsleep syz-fuzzer 32971 88764 94423 0 3 0x4000082 wait syz-fuzzer 32971 85995 94423 0 3 0x4000082 wait syz-fuzzer 32971 369766 94423 0 3 0x4000082 wait syz-fuzzer 32971 66074 94423 0 3 0x4000082 wait syz-fuzzer 94423 44163 22885 0 3 0x10008a sigsusp ksh 22885 514357 51165 0 3 0x9a kqread sshd 51165 348940 1 0 3 0x88 kqread sshd 20272 147843 31322 74 3 0x1100092 bpf pflogd 31322 290178 1 0 3 0x80 netio pflogd 48519 521101 38714 73 3 0x1100090 kqread syslogd 38714 488664 1 0 3 0x100082 netio syslogd 61781 345967 1 0 3 0x100080 kqread resolvd 29675 350107 79247 77 3 0x100092 kqread dhcpleased 22479 245602 79247 77 3 0x100092 kqread dhcpleased 79247 311969 1 0 3 0x80 kqread dhcpleased 12952 372200 0 0 3 0x14200 bored smr 56380 138170 0 0 2 0x14200 zerothread 78736 452217 0 0 3 0x14200 aiodoned aiodoned 26055 311639 0 0 3 0x14200 syncer update 86672 255589 0 0 3 0x14200 cleaner cleaner 3295 258025 0 0 3 0x14200 reaper reaper 71298 33932 0 0 3 0x14200 pgdaemon pagedaemon 15306 57647 0 0 3 0x14200 bored viomb 78962 111273 0 0 3 0x40014200 acpi0 acpi0 54765 313109 0 0 7 0x40014200 idle1 99404 233952 0 0 3 0x14200 bored softnet 97404 300850 0 0 3 0x14200 bored softnet 90205 512362 0 0 3 0x14200 bored softnet 40594 89548 0 0 3 0x14200 bored softnet 24954 461929 0 0 3 0x14200 bored systqmp 52127 408853 0 0 3 0x14200 bored systq 99045 435201 0 0 3 0x40014200 bored softclock 79894 355250 0 0 3 0x40014200 idle0 1 383631 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10247 6625K 6877K 78643K 23827 0 pcb 13 16K 19K 78643K 1839 0 rtable 199 16K 17K 78643K 2088 0 ifaddr 80 26K 28K 78643K 686 0 sysctl 2 0K 2K 78643K 74 0 counters 58 35K 36K 78643K 384 0 ioctlops 0 0K 4K 78643K 2138 0 iov 0 0K 36K 78643K 1017 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1545 97K 97K 78643K 9362 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 9K 78643K 65 0 VM map 2 1K 1K 78643K 2 0 sem 10 5K 10K 78643K 19 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 15 53K 81K 78643K 9033 0 sigio 0 0K 0K 78643K 232 0 proc 71 91K 115K 78643K 1448 0 subproc 104 6K 7K 78643K 390 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 917 0 in_multi 68 4K 7K 78643K 740 0 ether_multi 1 0K 0K 78643K 49 0 mrt 1 0K 0K 78643K 22 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 187 837K 837K 78643K 187 0 exec 0 0K 1K 78643K 2104 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 398 95K 108K 78643K 62233 0 UVM aobj 131 4K 4K 78643K 131 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 1002 0 NDP 15 0K 0K 78643K 231 0 temp 141 5778K 6802K 78643K 87522 0 kqueue 12 18K 26K 78643K 606 0 SYN cache 2 16K 16K 78643K 2 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle plcache 128 22 0 0 1 0 1 1 0 8 0 rtpcb 120 672 0 669 9 8 1 3 0 8 0 rtentry 112 630 0 549 4 0 4 4 0 8 0 unpcb 144 5900 0 5885 72 66 6 8 0 8 5 syncache 296 48 0 48 14 13 1 1 0 8 1 tcpqe 32 48 0 48 8 7 1 1 0 8 1 tcpcb 776 2918 0 2912 71 63 8 8 0 8 7 arp 120 78 0 62 1 0 1 1 0 8 0 inpcb 368 9259 0 9250 132 122 10 16 0 8 8 ip6q 72 3 0 3 1 1 0 1 0 8 0 ip6af 40 27 0 27 1 1 0 1 0 8 0 nd6 48 134 0 116 1 0 1 1 0 8 0 pkpcb 40 12 0 12 3 2 1 1 0 8 1 kcovpl 48 30 0 22 1 0 1 1 0 8 0 mppekey 1024 12 0 12 5 5 0 1 0 8 0 ppxss 1256 64 0 64 13 13 0 1 0 8 0 pppxif 1456 38 0 38 13 13 0 1 0 8 0 pffrag 232 97 0 96 3 2 1 1 0 482 0 pffrnode 88 97 0 96 3 2 1 1 0 8 0 pffrent 40 214 0 213 3 2 1 1 0 8 0 pfosfp 40 1428 0 1005 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfstitem 24 195 0 179 1 0 1 1 0 8 0 pfstkey 128 195 0 179 2 1 1 2 0 8 0 pfstate 384 195 0 179 7 4 3 4 0 8 0 pfrule 1344 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 3 0 2 3 2 1 2 0 8 0 art_heap4 256 3003 0 2684 43 19 24 32 0 8 0 art_table 32 3006 0 2686 5 0 5 5 0 8 0 art_node 16 623 0 553 1 0 1 1 0 8 0 sysvmsgpl 40 42 0 2 1 0 1 1 0 8 0 semupl 112 7 0 7 1 1 0 1 0 8 0 semapl 112 10 0 2 1 0 1 1 0 8 0 shmpl 112 128 0 0 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 13342 0 11891 92 0 92 92 0 8 0 ffsino 272 13342 0 11891 98 0 98 98 0 8 0 nchpl 144 25349 0 23707 63 0 63 63 0 8 0 rtmask 32 1 0 1 1 1 0 1 0 8 0 uvmvnodes 80 5926 0 0 121 0 121 121 0 8 0 vnodes 216 5926 0 0 330 0 330 330 0 8 0 namei 1024 91413 0 91411 7 6 1 2 0 8 0 percpumem 16 205 0 163 1 0 1 1 0 8 0 vmpool 696 7 0 7 2 2 0 1 0 8 0 kstatmem 264 268 0 238 4 1 3 3 0 8 0 scxspl 216 69556 0 69556 22 21 1 8 0 8 1 plimitpl 152 1753 0 1737 1 0 1 1 0 8 0 sigapl 424 9322 0 9256 11 3 8 9 0 8 0 futexpl 64 81865 0 81863 3 2 1 1 0 8 0 knotepl 120 727 0 0 18 0 18 18 0 8 0 kqueuepl 216 1527 0 1519 29 28 1 5 0 8 0 pipepl 320 1960 0 1932 58 55 3 9 0 8 0 fdescpl 496 9283 0 9255 6 2 4 5 0 8 0 filepl 152 63502 0 63256 114 99 15 21 0 8 5 lockfpl 104 2822 0 2820 8 7 1 3 0 8 0 lockfspl 48 827 0 825 1 0 1 1 0 8 0 sessionpl 144 50 0 33 1 0 1 1 0 8 0 pgrppl 48 82 0 65 1 0 1 1 0 8 0 ucredpl 104 7260 0 7247 1 0 1 1 0 8 0 zombiepl 144 9256 0 9256 2 1 1 1 0 8 1 processpl 1072 9322 0 9256 6 1 5 5 0 8 0 procpl 696 24609 0 24523 14 4 10 10 0 8 0 srpgc 96 30 0 30 11 11 0 1 0 8 0 sosppl 168 92 0 92 13 13 0 1 0 8 0 sockpl 488 15850 0 15823 359 343 16 33 0 8 12 mcl64k 65536 19 0 0 3 0 3 3 0 8 0 mcl16k 16384 22 0 0 3 1 2 3 0 8 0 mcl12k 12288 17 0 0 2 0 2 2 0 8 0 mcl9k 9216 14 0 0 1 0 1 1 0 8 0 mcl8k 8192 17 0 0 3 0 3 3 0 8 0 mcl4k 4096 25 0 0 3 0 3 3 0 8 0 mcl2k2 2112 8 0 0 1 0 1 1 0 8 0 mcl2k 2048 507 0 0 62 15 47 62 0 8 0 mtagpl 96 414 0 0 9 0 9 9 0 8 0 mbufpl 256 7178 0 0 428 0 428 428 0 8 0 bufpl 288 16156 0 9831 453 0 453 453 0 8 0 anonpl 24 1835674 0 1816363 227 96 131 144 0 186 0 amapchunkpl 152 186584 0 185741 98 62 36 48 0 158 0 amappl16 200 18580 0 18026 138 105 33 43 0 8 1 amappl15 192 15 0 14 1 0 1 1 0 8 0 amappl14 184 223 0 208 2 1 1 2 0 8 0 amappl13 176 5 0 5 1 1 0 1 0 8 0 amappl12 168 703 0 701 1 0 1 1 0 8 0 amappl11 160 50 0 35 1 0 1 1 0 8 0 amappl10 152 58 0 48 1 0 1 1 0 8 0 amappl9 144 1008 0 1007 1 0 1 1 0 8 0 amappl8 136 498 0 384 5 0 5 5 0 8 0 amappl7 128 238 0 212 2 0 2 2 0 8 0 amappl6 120 332 0 311 2 1 1 2 0 8 0 amappl5 112 335 0 326 1 0 1 1 0 8 0 amappl4 104 876 0 840 2 0 2 2 0 8 0 amappl3 96 27046 0 26989 2 0 2 2 0 8 0 amappl2 88 10162 0 10082 4 2 2 4 0 8 0 amappl1 80 210238 0 209479 31 12 19 28 0 8 0 amappl 88 61251 0 61039 7 1 6 6 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 130 0 0 3 0 3 3 0 8 0 uaddrrnd 24 9290 0 9262 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 9290 0 9262 1 0 1 1 0 8 0 vmmpekpl 168 73155 0 73084 4 0 4 4 0 8 0 vmmpepl 168 850570 0 847726 330 185 145 168 0 357 0 vmsppl 440 9289 0 9262 6 2 4 4 0 8 0 rwobjpl 56 226732 0 218867 127 12 115 116 0 8 0 pdppl 4096 18587 0 18524 447 378 69 77 0 8 6 pvpl 32 3553879 0 3528787 546 328 218 366 0 265 0 pmappl 248 9289 0 9262 4 1 3 3 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 1801 0 563 36 0 36 36 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8275bdd8) at panic+0x177 sys/kern/subr_prf.c:198 ufs_rename(ffff80002e42b728) at ufs_rename+0x15b1 sys/ufs/ufs/ufs_vnops.c:909 VOP_RENAME(fffffd806eddc640,fffffd806421c380,ffff80002e42b8f8,fffffd807b1370e8,fffffd8064057018,ffff80002e42b848) at VOP_RENAME+0xf0 sys/kern/vfs_vops.c:370 dorenameat(ffff80002471a880,4,200001c0,ffffff9c,20000200) at dorenameat+0x29c sys/kern/vfs_syscalls.c:3033 syscall(ffff80002e42ba90) at syscall+0x5e2 mi_syscall sys/sys/syscall_mi.h:110 [inline] syscall(ffff80002e42ba90) at syscall+0x5e2 sys/arch/amd64/amd64/trap.c:625 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa350ee14710, count: -7 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp x86_ipi_db(ffff800020d68ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 acpicpu_idle() at acpicpu_idle+0x312 sys/dev/acpi/acpicpu.c:1206 sched_idle(ffff800020d68ff0) at sched_idle+0x417 sys/kern/kern_sched.c:175 end trace frame: 0x0, count: 10 ddb{1}> trace x86_ipi_db(ffff800020d68ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 acpicpu_idle() at acpicpu_idle+0x312 sys/dev/acpi/acpicpu.c:1206 sched_idle(ffff800020d68ff0) at sched_idle+0x417 sys/kern/kern_sched.c:175 end trace frame: 0x0, count: -5