panic: ufs_rename: lost dir entry Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *215908 6157 0 0 0x4000000 0 syz-executor.5 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82735a3b) at panic+0x161 sys/kern/subr_prf.c:198 ufs_rename(ffff800023147d88) at ufs_rename+0x1649 sys/ufs/ufs/ufs_vnops.c:909 VOP_RENAME(fffffd807efd05e8,fffffd805eba46c0,ffff800023147f58,fffffd80586c3010,fffffd807c26a010,ffff800023147ea8) at VOP_RENAME+0xf0 sys/kern/vfs_vops.c:370 dorenameat(ffff8000ffff02d8,3,20000200,8,200001c0) at dorenameat+0x29c sys/kern/vfs_syscalls.c:3033 syscall(ffff8000231480f0) at syscall+0x4e6 sys/arch/amd64/amd64/trap.c:626 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa6a63631300, 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(ffffffff82735a3b) at panic+0x161 sys/kern/subr_prf.c:198 ufs_rename(ffff800023147d88) at ufs_rename+0x1649 sys/ufs/ufs/ufs_vnops.c:909 VOP_RENAME(fffffd807efd05e8,fffffd805eba46c0,ffff800023147f58,fffffd80586c3010,fffffd807c26a010,ffff800023147ea8) at VOP_RENAME+0xf0 sys/kern/vfs_vops.c:370 dorenameat(ffff8000ffff02d8,3,20000200,8,200001c0) at dorenameat+0x29c sys/kern/vfs_syscalls.c:3033 syscall(ffff8000231480f0) at syscall+0x4e6 sys/arch/amd64/amd64/trap.c:626 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa6a63631300, count: -7 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800023147b20 rbx 0xfffffd805da20b48 rdx 0 rcx 0 rax 0xffff8000ffff02d8 r8 0x101010101010101 r9 0x8080808080808080 r10 0x1c34801669f12c65 r11 0x2289b35614182013 r12 0 r13 0xfffffd80754b75a8 r14 0 r15 0x1 rip 0xffffffff82493f98 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800023147b10 ss 0 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.5) pid=215908 stat=onproc flags process=0 proc=4000000 pri=17, usrpri=84, nice=20 forw=0xffffffffffffffff, list=0xffff8000fffec2e8,0xffff8000ffff1080 process=0xffff8000fffee400 user=0xffff800023143000, vmspace=0xfffffd807f013220 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 60796 416023 56743 0 2 0 syz-executor.2 60796 339293 56743 0 2 0x4000000 syz-executor.2 60796 456203 56743 0 3 0x4000000 inode syz-executor.2 60796 487093 56743 0 3 0x4000000 inode syz-executor.2 60796 253357 56743 0 2 0x4000000 syz-executor.2 60796 100301 56743 0 2 0x4000000 syz-executor.2 93494 313306 37730 0 3 0x80 nanoslp syz-executor.3 93494 392967 37730 0 2 0x4000000 syz-executor.3 93494 468369 37730 0 3 0x4000080 fsleep syz-executor.3 78495 339021 24276 0 2 0 syz-executor.0 78495 164251 24276 0 3 0x4000080 fsleep syz-executor.0 78495 157515 24276 0 2 0x4000000 syz-executor.0 6157 491988 17361 0 2 0 syz-executor.5 6157 212931 17361 0 3 0x4000080 fsleep syz-executor.5 6157 61065 17361 0 3 0x4000080 fsleep syz-executor.5 * 6157 215908 17361 0 7 0x4000000 syz-executor.5 17361 92204 25958 0 3 0x82 nanoslp syz-executor.5 89669 73783 44837 0 3 0x80 nanoslp syz-executor.4 89669 89490 44837 0 3 0x4000080 kqpoll syz-executor.4 89669 99723 44837 0 3 0x4000080 fsleep syz-executor.4 72399 310206 88000 0 3 0x80 nanoslp syz-executor.6 72399 306881 88000 0 3 0x4000080 ttyout syz-executor.6 88000 222558 25958 0 3 0x82 nanoslp syz-executor.6 420 205482 1 0 3 0x100083 ttyin getty 56743 477790 25958 0 3 0x82 nanoslp syz-executor.2 24276 241323 25958 0 3 0x82 nanoslp syz-executor.0 68404 368193 25958 0 3 0x82 piperd syz-executor.1 44837 263526 25958 0 3 0x82 nanoslp syz-executor.4 635 273021 25958 0 3 0x82 piperd syz-executor.7 37730 484554 25958 0 3 0x82 nanoslp syz-executor.3 10955 480520 0 0 3 0x14200 bored sosplice 25958 171892 9729 0 3 0x82 thrsleep syz-fuzzer 25958 442533 9729 0 3 0x4000082 nanoslp syz-fuzzer 25958 386247 9729 0 3 0x4000082 wait syz-fuzzer 25958 390880 9729 0 3 0x4000082 wait syz-fuzzer 25958 246964 9729 0 3 0x4000082 thrsleep syz-fuzzer 25958 277784 9729 0 3 0x4000082 wait syz-fuzzer 25958 437080 9729 0 3 0x4000082 thrsleep syz-fuzzer 25958 200695 9729 0 3 0x4000082 wait syz-fuzzer 25958 280843 9729 0 3 0x4000082 thrsleep syz-fuzzer 25958 408579 9729 0 3 0x4000082 wait syz-fuzzer 25958 66381 9729 0 3 0x4000082 wait syz-fuzzer 25958 503543 9729 0 3 0x4000082 wait syz-fuzzer 25958 387855 9729 0 3 0x4000082 kqread syz-fuzzer 25958 110621 9729 0 3 0x4000082 wait syz-fuzzer 9729 440686 60890 0 3 0x10008a sigsusp ksh 60890 82258 30269 0 3 0x9a kqread sshd 30269 402407 1 0 3 0x88 kqread sshd 40483 99981 63433 73 3 0x1100090 kqread syslogd 63433 240045 1 0 3 0x100082 netio syslogd 26355 348195 1 0 3 0x100080 kqread resolvd 47527 154975 52093 77 3 0x100092 kqread dhcpleased 55576 391149 52093 77 3 0x100092 kqread dhcpleased 52093 101997 1 0 3 0x80 kqread dhcpleased 5057 466264 0 0 3 0x14200 bored smr 99546 107560 0 0 2 0x14200 zerothread 99555 487500 0 0 3 0x14200 aiodoned aiodoned 63924 492935 0 0 3 0x14200 syncer update 73320 137783 0 0 3 0x14200 cleaner cleaner 59098 384578 0 0 3 0x14200 reaper reaper 19029 35334 0 0 3 0x14200 pgdaemon pagedaemon 70751 277821 0 0 3 0x14200 bored viomb 82575 70062 0 0 3 0x40014200 acpi0 acpi0 55294 518716 0 0 3 0x14200 bored softnet 69915 516547 0 0 3 0x14200 bored softnet 52345 214229 0 0 3 0x14200 bored softnet 54752 120301 0 0 3 0x14200 bored softnet 36143 516166 0 0 3 0x14200 bored systqmp 28795 355947 0 0 3 0x14200 bored systq 15477 447114 0 0 3 0x40014200 bored softclock 79350 500843 0 0 3 0x40014200 idle0 1 336794 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 10239 6451K 14832K 78643K 45747 0 pcb 13 24K 28K 78643K 5705 0 rtable 229 17K 18K 78643K 5325 0 ifaddr 122 38K 42K 78643K 3051 0 sysctl 2 0K 2K 78643K 17 0 counters 29 17K 17K 78643K 1064 0 ioctlops 0 0K 4K 78643K 4607 0 iov 1 8K 32K 78643K 3195 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1639 102K 103K 78643K 24441 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 9K 78643K 165 0 VM map 2 0K 0K 78643K 2 0 sem 19 16K 32K 78643K 11672 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 16 57K 81K 78643K 25545 0 sigio 0 0K 0K 78643K 1701 0 proc 68 59K 75K 78643K 3614 0 subproc 104 6K 7K 78643K 1131 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 61509 0 in_multi 85 5K 6K 78643K 1724 0 ether_multi 1 0K 0K 78643K 201 0 mrt 1 0K 0K 78643K 524 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 253 1129K 1129K 78643K 253 0 exec 0 0K 1K 78643K 6105 0 pfkey data 0 0K 0K 78643K 53 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 393 90K 112K 78643K 165253 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 1366 0 NDP 18 0K 1K 78643K 925 0 temp 150 5770K 39562K 78643K 1285586 0 kqueue 14 22K 26K 78643K 1614 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 1739 0 1736 25 24 1 3 0 8 0 rtentry 112 1677 0 1583 6 2 4 4 0 8 0 unpcb 144 23429 0 23415 241 238 3 12 0 8 2 syncache 296 92 0 92 26 26 0 1 0 8 0 tcpqe 32 251 138 251 8 8 0 2 0 8 0 tcpcb 776 37620 0 37615 558 549 9 22 0 8 8 arp 88 193 0 177 1 0 1 1 0 8 0 ipq 40 44 0 43 7 6 1 1 0 8 0 ipqe 40 160 0 159 7 6 1 1 0 8 0 inpcb 336 53735 0 53727 501 492 9 18 0 8 7 nd6 48 306 0 283 1 0 1 1 0 8 0 pkpcb 40 68 0 68 9 8 1 1 0 8 1 kcovpl 48 87 0 79 1 0 1 1 0 8 0 mppekey 1024 7 0 7 3 3 0 1 0 8 0 ppxss 1160 405 0 405 41 40 1 1 0 8 1 pppxif 1360 194 0 194 29 28 1 1 0 8 1 pfstscr 40 255 0 234 1 0 1 1 0 8 0 pfosfp 40 495 0 482 1 0 1 1 0 8 0 pfosfpen 112 495 0 436 2 0 2 2 0 8 0 pfanchor 1280 2340 3 1828 45 2 43 43 0 8 0 pfqueue 264 12 0 12 4 4 0 1 0 8 0 pfstitem 24 98 0 59 1 0 1 1 0 8 0 pfstkey 128 483 0 435 3 1 2 2 0 8 0 pfstate 352 250 0 230 2 0 2 2 0 8 0 rttmr 136 158 0 158 9 9 0 1 0 8 0 art_heap8 4096 9 0 8 8 7 1 2 0 8 0 art_heap4 256 6347 0 5939 66 37 29 30 0 8 1 art_table 32 6356 0 5947 5 1 4 4 0 8 0 art_node 16 1570 0 1488 1 0 1 1 0 8 0 sysvmsgpl 40 83 0 43 1 0 1 1 0 8 0 semupl 112 3 0 3 2 2 0 1 0 8 0 semapl 112 11662 0 11645 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 37422 0 35321 132 0 132 132 0 8 0 ffsino 240 37422 0 35321 124 0 124 124 0 8 0 nchpl 144 72339 0 70712 63 1 62 63 0 8 0 rtmask 32 5 0 5 2 2 0 1 0 8 0 uvmvnodes 80 20181 0 0 412 0 412 412 0 8 0 vnodes 216 20181 0 0 1122 0 1122 1122 0 8 0 namei 1024 269554 0 269547 15 13 2 2 0 8 0 vmpool 664 201 0 201 12 12 0 1 0 8 0 kstatmem 264 1442 0 1410 4 1 3 3 0 8 0 scsiplug 72 30 0 30 10 10 0 1 0 8 0 scxspl 216 223746 0 223746 60 58 2 8 0 8 2 plimitpl 152 2646 0 2631 1 0 1 1 0 8 0 sigapl 424 25968 0 25924 9 1 8 8 0 8 0 futexpl 64 307721 0 307716 7 6 1 1 0 8 0 knotepl 120 348992 0 348910 87 83 4 12 0 8 0 kqueuepl 184 4346 0 4334 61 59 2 4 0 8 1 pipepl 288 6965 0 6937 135 128 7 10 0 8 4 fdescpl 432 25666 0 25639 5 1 4 4 0 8 0 filepl 120 219493 0 219180 312 298 14 19 0 8 4 lockfpl 104 7634 0 7632 25 23 2 3 0 8 1 lockfspl 48 2275 0 2273 1 0 1 1 0 8 0 sessionpl 144 107 0 91 1 0 1 1 0 8 0 pgrppl 48 238 0 222 1 0 1 1 0 8 0 ucredpl 104 22841 0 22831 1 0 1 1 0 8 0 zombiepl 144 25924 0 25924 4 3 1 1 0 8 1 processpl 1008 25968 0 25924 13 7 6 9 0 8 0 procpl 696 65540 0 65468 24 15 9 10 0 8 0 sosppl 168 216 0 216 35 35 0 1 0 8 0 sockpl 456 78995 0 78970 1571 1560 11 46 0 8 7 mcl64k 65536 964 0 964 73 72 1 1 0 8 1 mcl16k 16384 503 0 503 72 71 1 1 0 8 1 mcl12k 12288 1035 0 1035 66 65 1 1 0 8 1 mcl9k 9216 626 0 626 64 63 1 1 0 8 1 mcl8k 8192 2065 0 2065 43 42 1 1 0 8 1 mcl4k 4096 3340 0 3340 25 24 1 1 0 8 1 mcl2k2 2112 240 0 240 69 68 1 1 0 8 1 mcl2k 2048 130452 0 130382 104 93 11 30 0 8 1 mtagpl 96 3617 0 3159 42 30 12 12 0 8 0 mbufpl 256 539720 0 539017 1254 1199 55 99 0 8 8 bufpl 288 61965 0 53232 1442 614 828 1442 0 8 3 anonpl 24 4761980 0 4746190 284 148 136 139 0 188 13 amapchunkpl 152 510200 0 509479 161 127 34 44 0 158 0 amappl16 200 41236 0 40629 201 157 44 46 0 8 8 amappl15 192 101 0 100 1 0 1 1 0 8 0 amappl14 184 449 0 434 2 0 2 2 0 8 0 amappl13 176 7 0 6 1 0 1 1 0 8 0 amappl12 168 1382 0 1371 1 0 1 1 0 8 0 amappl11 160 45 0 35 1 0 1 1 0 8 0 amappl10 152 112 0 101 1 0 1 1 0 8 0 amappl9 144 1068 0 1067 1 0 1 1 0 8 0 amappl8 136 1123 0 982 5 0 5 5 0 8 0 amappl7 128 360 0 336 2 0 2 2 0 8 0 amappl6 120 633 0 616 1 0 1 1 0 8 0 amappl5 112 804 0 796 1 0 1 1 0 8 0 amappl4 104 1765 0 1732 2 1 1 2 0 8 0 amappl3 96 73941 0 73885 2 0 2 2 0 8 0 amappl2 88 28208 0 28129 3 1 2 3 0 8 0 amappl1 80 572267 0 571516 51 34 17 22 0 8 0 amappl 88 163490 0 163280 6 0 6 6 0 92 1 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 25867 0 25840 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 25867 0 25840 1 0 1 1 0 8 0 vmmpekpl 168 190528 0 190479 3 0 3 3 0 8 0 vmmpepl 168 2320216 0 2317293 593 438 155 174 0 357 9 vmsppl 272 25866 0 25840 4 2 2 3 0 8 0 rwobjpl 24 604548 0 582385 143 7 136 136 0 8 1 pdppl 4096 51740 0 51680 1287 1223 64 72 0 8 4 pvpl 32 9428942 0 9407430 725 496 229 261 0 265 26 pmappl 216 25866 0 25840 2 0 2 2 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 5323 0 4050 55 0 55 55 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(ffffffff82735a3b) at panic+0x161 sys/kern/subr_prf.c:198 ufs_rename(ffff800023147d88) at ufs_rename+0x1649 sys/ufs/ufs/ufs_vnops.c:909 VOP_RENAME(fffffd807efd05e8,fffffd805eba46c0,ffff800023147f58,fffffd80586c3010,fffffd807c26a010,ffff800023147ea8) at VOP_RENAME+0xf0 sys/kern/vfs_vops.c:370 dorenameat(ffff8000ffff02d8,3,20000200,8,200001c0) at dorenameat+0x29c sys/kern/vfs_syscalls.c:3033 syscall(ffff8000231480f0) at syscall+0x4e6 sys/arch/amd64/amd64/trap.c:626 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa6a63631300, 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(ffffffff82735a3b) at panic+0x161 sys/kern/subr_prf.c:198 ufs_rename(ffff800023147d88) at ufs_rename+0x1649 sys/ufs/ufs/ufs_vnops.c:909 VOP_RENAME(fffffd807efd05e8,fffffd805eba46c0,ffff800023147f58,fffffd80586c3010,fffffd807c26a010,ffff800023147ea8) at VOP_RENAME+0xf0 sys/kern/vfs_vops.c:370 dorenameat(ffff8000ffff02d8,3,20000200,8,200001c0) at dorenameat+0x29c sys/kern/vfs_syscalls.c:3033 syscall(ffff8000231480f0) at syscall+0x4e6 sys/arch/amd64/amd64/trap.c:626 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa6a63631300, count: -7