panic: ufs_rename: lost dir entry Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *284001 10367 0 0x8000000 0x4000000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82fb6b23) at panic+0x1cf sys/kern/subr_prf.c:198 ufs_rename(ffff80002f8f5308) at ufs_rename+0x18b2 VOP_RENAME(fffffd8071ee61e8,fffffd8071ee6110,ffff80002f8f54d8,fffffd8071ee61e8,fffffd8071ee6470,ffff80002f8f5428) at VOP_RENAME+0x13c sys/kern/vfs_vops.c:376 dorenameat(ffff800031624f58,ffffff9c,200000c0,ffffff9c,200003c0) at dorenameat+0x3f8 sys/kern/vfs_syscalls.c:3021 syscall(ffff80002f8f5670) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x55309fb67b0, 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(ffffffff82fb6b23) at panic+0x1cf sys/kern/subr_prf.c:198 ufs_rename(ffff80002f8f5308) at ufs_rename+0x18b2 VOP_RENAME(fffffd8071ee61e8,fffffd8071ee6110,ffff80002f8f54d8,fffffd8071ee61e8,fffffd8071ee6470,ffff80002f8f5428) at VOP_RENAME+0x13c sys/kern/vfs_vops.c:376 dorenameat(ffff800031624f58,ffffff9c,200000c0,ffffff9c,200003c0) at dorenameat+0x3f8 sys/kern/vfs_syscalls.c:3021 syscall(ffff80002f8f5670) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x55309fb67b0, count: -7 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002f8f5090 rbx 0xfffffd806bf66c28 rdx 0 rcx 0 rax 0xffff800031624f58 r8 0x101010101010101 r9 0x8080808080808080 r10 0xccf6d7d2000c3c66 r11 0xced2732909645f5e r12 0 r13 0xfffffd806abc44b0 r14 0 r15 0x1 rip 0xffffffff8115ddb5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002f8f5080 ss 0 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=284001 pid=10367 tcnt=6 stat=onproc flags process=8000000 proc=4000000 runpri=17, usrpri=83, slppri=17, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a45b1c0,0xffff800031625988 process=0xffff80002fa10218 user=0xffff80002f8f0000, vmspace=0xfffffd8068360838 estcpu=33, cpticks=0, pctcpu=0.0, user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 13051 124468 23529 0 2 0x8000000 syz-executor 13051 158045 23529 0 3 0xc000000 lockflk syz-executor 60174 81151 21536 0 2 0x8000000 syz-executor 60174 102161 21536 0 3 0xc000080 fsleep syz-executor 10367 265312 16478 0 2 0x8000000 syz-executor 10367 479168 16478 0 2 0xc000000 syz-executor *10367 284001 16478 0 7 0xc000000 syz-executor 10367 264411 16478 0 3 0xc000080 fsleep syz-executor 10367 111335 16478 0 2 0xc000000 syz-executor 10367 285542 16478 0 2 0xc000000 syz-executor 96338 244323 20145 0 2 0x8000000 syz-executor 96338 126907 20145 0 2 0xc000000 syz-executor 34021 496141 22907 60928 2 0x8000010 syz-executor 34021 277343 22907 60928 3 0xc000090 fsleep syz-executor 60374 22396 5626 0 2 0x8000000 syz-executor 60374 189889 5626 0 3 0xc000080 sbwait syz-executor 60374 466583 5626 0 2 0xc000000 syz-executor 60374 386874 5626 0 3 0xc000080 fsleep syz-executor 35893 323797 45917 0 2 0x8000002 ifconfig 32540 294343 78630 0 3 0x8000080 nanoslp syz-executor 32540 429064 78630 0 3 0xc000080 kqread syz-executor 32540 428993 78630 0 3 0xc000080 fsleep syz-executor 45917 405542 71102 0 3 0x810008a sigsusp sh 23529 510618 96825 0 3 0x8000082 nanoslp syz-executor 71102 358134 96825 0 3 0x8000082 wait syz-executor 5626 437718 96825 0 3 0x8000082 nanoslp syz-executor 20145 51033 96825 0 2 0x8000002 syz-executor 16478 262580 96825 0 3 0x8000082 nanoslp syz-executor 78630 289084 96825 0 3 0x8000082 nanoslp syz-executor 22907 400084 96825 0 3 0x8000082 nanoslp syz-executor 21536 104718 96825 0 3 0x8000082 nanoslp syz-executor 74714 165695 1 0 3 0x18100083 ttyin getty 84233 417392 0 0 3 0x14280 nfsidl nfsio 88105 17031 0 0 3 0x14280 nfsidl nfsio 37145 481292 0 0 3 0x14280 nfsidl nfsio 51309 51626 0 0 3 0x14280 nfsidl nfsio 7148 24902 0 0 3 0x14280 nfsidl nfsio 36035 82958 0 0 3 0x14280 nfsidl nfsio 17200 92091 0 0 3 0x14280 nfsidl nfsio 67475 54926 0 0 3 0x14280 nfsidl nfsio 81684 222769 0 0 3 0x14280 nfsidl nfsio 29869 145255 0 0 3 0x14280 nfsidl nfsio 52664 425404 0 0 3 0x14280 nfsidl nfsio 75986 411038 0 0 3 0x14280 nfsidl nfsio 66193 278955 0 0 3 0x14280 nfsidl nfsio 65004 493416 0 0 3 0x14280 nfsidl nfsio 25006 39569 0 0 3 0x14280 nfsidl nfsio 44059 398070 0 0 3 0x14280 nfsidl nfsio 49855 286249 0 0 3 0x14280 nfsidl nfsio 70949 378806 0 0 3 0x14280 nfsidl nfsio 24699 358059 0 0 3 0x14280 nfsidl nfsio 74788 306016 0 0 3 0x14280 nfsidl nfsio 85669 233718 0 0 3 0x14200 bored sosplice 96825 511852 23292 0 3 0x8000082 kqread syz-executor 23292 463074 19182 0 3 0x810008a sigsusp ksh 19182 259609 35058 0 3 0x18000098 kqread sshd-session 35058 384871 30265 0 3 0x18000092 kqread sshd-session 30265 126554 1 0 3 0x18000088 kqread sshd 62993 186444 7745 73 2 0x19100010 syslogd 7745 123869 1 0 3 0x18100082 sbwait syslogd 5017 212727 1 0 3 0x18100080 kqread resolvd 72163 17386 91563 77 3 0x18100092 kqread dhcpleased 50947 345417 91563 77 3 0x18100092 kqread dhcpleased 91563 459863 1 0 3 0x18000080 kqread dhcpleased 19669 18911 0 0 3 0x14200 bored smr 72639 147684 0 0 2 0x14200 zerothread 30602 132030 0 0 3 0x14200 aiodoned aiodoned 36649 425689 0 0 3 0x14200 syncer update 98481 280287 0 0 3 0x14200 cleaner cleaner 15935 258586 0 0 3 0x14200 reaper reaper 54806 523708 0 0 3 0x14200 pgdaemon pagedaemon 92475 469119 0 0 3 0x14200 bored viomb 79118 374251 0 0 3 0x40014200 acpi0 acpi0 70816 360662 0 0 3 0x14200 bored softnet3 9769 22207 0 0 3 0x14200 bored softnet2 99113 255177 0 0 3 0x14200 bored softnet1 14401 358033 0 0 3 0x14200 bored softnet0 40001 163824 0 0 3 0x14200 bored systqmp 65051 50341 0 0 3 0x14200 bored systq 83402 211347 0 0 3 0x40014200 tmoslp softclock 49781 521723 0 0 3 0x40014200 idle0 1 120961 0 0 3 0x8000082 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 10224 10117K 14503K 166960K 15875 0 pcb 18 16K 17K 166960K 963 0 rtable 219 10K 11K 166960K 4080 0 pf 46 15K 21K 166960K 476 0 ifaddr 46 8K 9K 166960K 530 0 ifgroup 78 3K 3K 166960K 710 0 sysctl 3 0K 0K 166960K 7 0 counters 37 18K 18K 166960K 196 0 ioctlops 0 0K 4K 166960K 765 0 iov 0 0K 16K 166960K 233 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1448 91K 91K 166960K 5556 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 13K 166960K 81 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 308 0 dirhash 15 2K 2K 166960K 45 0 ACPI 1697 195K 286K 166960K 12548 0 file desc 19 69K 85K 166960K 5684 0 sigio 0 0K 0K 166960K 86 0 proc 63 67K 91K 166960K 3483 0 subproc 56 3K 3K 166960K 779 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 664 0 in_multi 86 6K 7K 166960K 1323 0 ether_multi 1 0K 0K 166960K 23 0 mrt 1 0K 0K 166960K 52 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 229 1023K 1023K 166960K 229 0 exec 0 0K 1K 166960K 2024 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 272 81K 102K 166960K 49216 0 UVM aobj 131 8K 8K 166960K 132 0 pinsyscall 40 80K 90K 166960K 9392 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 144 0 NDP 18 0K 1K 166960K 399 0 temp 100 6809K 6889K 166960K 98769 0 kqueue 14 22K 30K 166960K 435 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 651 0 648 1 0 1 1 0 8 0 rtentry 112 1449 0 1360 4 1 3 4 0 8 0 unpcb 144 3693 0 3669 9 3 6 6 0 8 5 syncache 336 53 0 53 2 1 1 1 0 8 1 tcpqe 32 31 0 31 2 1 1 1 0 8 1 tcpcb 808 1681 0 1677 15 7 8 8 0 8 7 arp 88 306 0 288 1 0 1 1 0 8 0 ipq 40 2 0 2 1 1 0 1 0 8 0 ipqe 40 45 0 45 1 1 0 1 0 8 0 inpcb 336 5360 0 5351 23 14 9 13 0 8 7 nd6 104 344 0 323 1 0 1 1 0 8 0 pkpcb 40 52 0 52 2 1 1 1 0 8 1 kcovpl 48 111 0 103 1 0 1 1 0 8 0 ppxss 1072 19 0 19 2 1 1 1 0 8 1 pffrag 232 59 0 57 1 0 1 1 0 482 0 pffrnode 88 57 0 55 1 0 1 1 0 8 0 pffrent 40 84 0 82 1 0 1 1 0 8 0 pfosfp 40 27 0 26 1 0 1 1 0 8 0 pfosfpen 112 27 0 26 1 0 1 1 0 8 0 pfrktable 1344 1 0 1 1 1 0 1 0 8 0 pfanchor 1288 9 0 9 1 1 0 1 0 8 0 pftag 88 3 0 1 1 0 1 1 0 8 0 pfrule 1344 23 0 19 1 0 1 1 0 8 0 art_heap8 4096 6 0 4 4 1 3 3 0 8 1 art_heap4 256 5353 0 4972 46 21 25 29 0 8 1 art_table 32 5359 0 4976 4 0 4 4 0 8 0 art_node 16 1441 0 1361 1 0 1 1 0 8 0 sysvmsgpl 40 35 0 16 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 306 0 296 1 0 1 1 0 8 0 shmpl 112 129 0 1 4 0 4 4 0 8 0 dirhash 1024 39 0 20 3 0 3 3 0 8 0 dino2pl 256 8738 0 7056 106 0 106 106 0 8 0 ffsino 240 8738 0 7056 100 0 100 100 0 8 0 nchpl 144 14476 0 12672 68 0 68 68 0 8 0 uvmvnodes 80 7859 0 0 161 0 161 161 0 8 0 vnodes 216 7859 0 0 437 0 437 437 0 8 0 namei 1024 54435 0 54430 4 2 2 2 0 8 0 vcpupl 3904 23 0 0 3 0 3 3 0 8 0 vmpool 664 30 0 7 2 0 2 2 0 8 0 kstatmem 264 354 0 318 3 0 3 3 0 8 0 scsiplug 72 4 0 4 2 1 1 1 0 8 1 scxspl 216 75895 0 75895 10 7 3 8 1 8 3 plimitpl 152 538 0 522 1 0 1 1 0 8 0 sigapl 424 5794 0 5726 8 0 8 8 0 8 0 futexpl 64 64845 0 64840 1 0 1 1 0 8 0 knotepl 120 441765 0 441716 31 21 10 17 0 8 8 kqueuepl 184 1184 0 1174 4 0 4 4 0 8 3 pipepl 288 765 0 737 4 1 3 3 0 8 0 fdescpl 432 5745 0 5714 4 0 4 4 0 8 0 filepl 120 31794 0 31582 18 4 14 14 0 8 7 lockfpl 104 1966 0 1962 2 1 1 2 0 8 0 lockfspl 48 783 0 779 1 0 1 1 0 8 0 sessionpl 144 127 0 119 1 0 1 1 0 8 0 pgrppl 48 262 0 246 1 0 1 1 0 8 0 ucredpl 104 5056 0 5044 1 0 1 1 0 8 0 zombiepl 144 7538 0 7538 2 1 1 1 0 8 1 processpl 1088 5794 0 5726 5 0 5 5 0 8 0 procpl 648 12265 0 12183 8 0 8 8 0 8 1 sosppl 168 39 0 39 1 0 1 1 0 8 1 sockpl 504 9803 0 9767 69 57 12 27 0 8 7 mcl64k 65536 380 0 380 2 1 1 1 0 8 1 mcl16k 16384 191 0 191 2 1 1 1 0 8 1 mcl12k 12288 91 0 91 2 1 1 1 0 8 1 mcl9k 9216 71 0 71 2 1 1 1 0 8 1 mcl8k 8192 521 0 521 2 1 1 1 0 8 1 mcl4k 4096 982 0 982 2 1 1 1 0 8 1 mcl2k2 2112 38 0 38 2 1 1 1 0 8 1 mcl2k 2048 19930 0 19834 35 19 16 33 0 8 3 mtagpl 96 136 0 133 2 1 1 2 0 8 0 mbufpl 256 70702 0 70524 37 15 22 32 0 8 7 bufpl 280 14433 0 6572 562 0 562 562 0 8 0 anonpl 24 716082 0 707313 103 20 83 83 0 187 16 amapchunkpl 152 157392 0 156732 58 19 39 42 0 158 13 amappl16 200 13184 0 12951 75 51 24 26 0 8 8 amappl15 192 25 0 25 1 1 0 1 0 8 0 amappl14 184 314 0 304 1 0 1 1 0 8 0 amappl13 176 9 0 9 1 1 0 1 0 8 0 amappl12 168 7990 0 7959 2 0 2 2 0 8 0 amappl11 160 51 0 41 1 0 1 1 0 8 0 amappl10 152 10 0 10 1 1 0 1 0 8 0 amappl9 144 147 0 146 1 0 1 1 0 8 0 amappl8 136 28 0 26 1 0 1 1 0 8 0 amappl7 128 324 0 314 1 0 1 1 0 8 0 amappl6 120 1188 0 1185 1 0 1 1 0 8 0 amappl5 112 539 0 529 1 0 1 1 0 8 0 amappl4 104 610 0 593 1 0 1 1 0 8 0 amappl3 96 32647 0 32530 5 1 4 4 0 8 1 amappl2 88 2061 0 2002 2 0 2 2 0 8 0 amappl1 80 30421 0 29885 13 0 13 13 0 8 1 amappl 88 47758 0 47563 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 13 0 13 2 1 1 1 0 8 1 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 131 0 1 3 0 3 3 0 8 0 uaddrrnd 24 5775 0 5721 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 5775 0 5721 1 0 1 1 0 8 0 vmmpekpl 168 40478 0 40433 4 0 4 4 0 8 0 vmmpepl 168 390852 0 388738 118 12 106 106 0 357 10 vmsppl 344 5774 0 5721 6 0 6 6 0 8 0 rwobjpl 24 95593 0 86467 56 0 56 56 0 8 0 pdppl 4096 11556 0 11465 366 273 93 97 0 8 2 pvpl 32 2718972 0 2703023 412 128 284 284 0 265 140 pmappl 216 5774 0 5721 4 0 4 4 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 831 0 417 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(ffffffff82fb6b23) at panic+0x1cf sys/kern/subr_prf.c:198 ufs_rename(ffff80002f8f5308) at ufs_rename+0x18b2 VOP_RENAME(fffffd8071ee61e8,fffffd8071ee6110,ffff80002f8f54d8,fffffd8071ee61e8,fffffd8071ee6470,ffff80002f8f5428) at VOP_RENAME+0x13c sys/kern/vfs_vops.c:376 dorenameat(ffff800031624f58,ffffff9c,200000c0,ffffff9c,200003c0) at dorenameat+0x3f8 sys/kern/vfs_syscalls.c:3021 syscall(ffff80002f8f5670) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x55309fb67b0, 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(ffffffff82fb6b23) at panic+0x1cf sys/kern/subr_prf.c:198 ufs_rename(ffff80002f8f5308) at ufs_rename+0x18b2 VOP_RENAME(fffffd8071ee61e8,fffffd8071ee6110,ffff80002f8f54d8,fffffd8071ee61e8,fffffd8071ee6470,ffff80002f8f5428) at VOP_RENAME+0x13c sys/kern/vfs_vops.c:376 dorenameat(ffff800031624f58,ffffff9c,200000c0,ffffff9c,200003c0) at dorenameat+0x3f8 sys/kern/vfs_syscalls.c:3021 syscall(ffff80002f8f5670) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x55309fb67b0, count: -7