panic: ufs_rename: lost dir entry Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *172810 27148 0 0 0x4000000 0 syz-executor.4 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82592550) at panic+0x161 sys/kern/subr_prf.c:198 ufs_rename(ffff80002e9af618) at ufs_rename+0x1649 sys/ufs/ufs/ufs_vnops.c:909 VOP_RENAME(fffffd807efd1510,fffffd80640bd8b0,ffff80002e9af7e8,fffffd807dfc5ce0,fffffd80640bd2c8,ffff80002e9af738) at VOP_RENAME+0xf0 sys/kern/vfs_vops.c:370 dorenameat(ffff80002178b7b0,7,20000180,9,200001c0) at dorenameat+0x29c sys/kern/vfs_syscalls.c:3033 syscall(ffff80002e9af980) at syscall+0x446 sys/arch/amd64/amd64/trap.c:599 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x9e84aae3350, 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(ffffffff82592550) at panic+0x161 sys/kern/subr_prf.c:198 ufs_rename(ffff80002e9af618) at ufs_rename+0x1649 sys/ufs/ufs/ufs_vnops.c:909 VOP_RENAME(fffffd807efd1510,fffffd80640bd8b0,ffff80002e9af7e8,fffffd807dfc5ce0,fffffd80640bd2c8,ffff80002e9af738) at VOP_RENAME+0xf0 sys/kern/vfs_vops.c:370 dorenameat(ffff80002178b7b0,7,20000180,9,200001c0) at dorenameat+0x29c sys/kern/vfs_syscalls.c:3033 syscall(ffff80002e9af980) at syscall+0x446 sys/arch/amd64/amd64/trap.c:599 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x9e84aae3350, count: -7 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002e9af3b0 rbx 0xfffffd80640bd118 rdx 0 rcx 0 rax 0xffff80002178b7b0 r8 0 r9 0x8080808080808080 r10 0x5d43c115a8c40af r11 0x941d300c5c96ea58 r12 0 r13 0xfffffd806805ed20 r14 0 r15 0x1 rip 0xffffffff818efcf8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80002e9af3a0 ss 0 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.4) pid=172810 stat=onproc flags process=0 proc=4000000 pri=17, usrpri=78, nice=20 forw=0xffffffffffffffff, list=0xffff80002178a7f0,0xffff80002178ba60 process=0xffff800028048000 user=0xffff80002e9aa000, vmspace=0xfffffd806b674ab0 estcpu=28, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 60548 428304 89424 0 2 0 syz-executor.2 9125 512092 33940 0 2 0 syz-executor.7 94538 277178 43622 0 2 0 syz-executor.3 94538 173423 43622 0 3 0x4000080 fsleep syz-executor.3 55612 414855 31674 0 2 0 syz-executor.0 55612 71053 31674 0 2 0x4000000 syz-executor.0 55612 189677 31674 0 2 0x4000000 syz-executor.0 27148 66411 57950 0 2 0 syz-executor.4 27148 329749 57950 0 2 0x4000000 syz-executor.4 *27148 172810 57950 0 7 0x4000000 syz-executor.4 27148 463531 57950 0 3 0x4000080 netio syz-executor.4 8654 126088 65204 0 2 0x480 syz-executor.5 8654 101927 65204 0 3 0x4000080 bell syz-executor.5 99341 394259 59274 0 2 0x10 syz-executor.1 99341 152972 59274 0 3 0x4000090 fsleep syz-executor.1 99341 170605 59274 0 3 0x4000090 fsleep syz-executor.1 65204 378104 72472 0 2 0x482 syz-executor.5 43622 31754 72472 0 3 0x82 nanoslp syz-executor.3 8193 392972 0 0 3 0x14280 nfsidl nfsio 92019 483018 0 0 3 0x14280 nfsidl nfsio 3447 298683 0 0 3 0x14280 nfsidl nfsio 8406 169500 0 0 3 0x14280 nfsidl nfsio 13534 103185 0 0 3 0x14280 nfsidl nfsio 93009 71609 0 0 3 0x14280 nfsidl nfsio 33761 142206 0 0 3 0x14280 nfsidl nfsio 60859 514237 0 0 3 0x14280 nfsidl nfsio 2961 220205 0 0 3 0x14280 nfsidl nfsio 12373 406985 0 0 3 0x14280 nfsidl nfsio 1710 405654 0 0 3 0x14280 nfsidl nfsio 63757 88700 0 0 3 0x14280 nfsidl nfsio 98436 363436 0 0 3 0x14280 nfsidl nfsio 84754 73642 0 0 3 0x14280 nfsidl nfsio 85731 489122 0 0 3 0x14280 nfsidl nfsio 11006 369548 0 0 3 0x14280 nfsidl nfsio 83246 348331 0 0 3 0x14280 nfsidl nfsio 61566 208728 0 0 3 0x14280 nfsidl nfsio 87087 504538 0 0 3 0x14280 nfsidl nfsio 22768 381622 0 0 3 0x14280 nfsidl nfsio 57950 160076 72472 0 2 0x482 syz-executor.4 33940 465895 72472 0 3 0x82 nanoslp syz-executor.7 31674 180330 72472 0 3 0x82 nanoslp syz-executor.0 89703 170844 0 0 3 0x14200 bored sosplice 89424 88534 72472 0 2 0x2 syz-executor.2 74626 81325 72472 0 2 0x482 syz-executor.6 59274 306219 72472 0 2 0x482 syz-executor.1 72472 289387 75976 0 3 0x82 wait syz-fuzzer 72472 336155 75976 0 2 0x4000482 syz-fuzzer 72472 487352 75976 0 3 0x4000082 wait syz-fuzzer 72472 256341 75976 0 3 0x4000082 thrsleep syz-fuzzer 72472 20040 75976 0 3 0x4000082 thrsleep syz-fuzzer 72472 428794 75976 0 3 0x4000082 wait syz-fuzzer 72472 159904 75976 0 3 0x4000082 wait syz-fuzzer 72472 439317 75976 0 3 0x4000082 wait syz-fuzzer 72472 264752 75976 0 3 0x4000082 thrsleep syz-fuzzer 72472 284837 75976 0 3 0x4000082 wait syz-fuzzer 72472 233832 75976 0 3 0x4000082 wait syz-fuzzer 72472 340983 75976 0 3 0x4000082 thrsleep syz-fuzzer 72472 482718 75976 0 3 0x4000082 kqread syz-fuzzer 72472 13427 75976 0 3 0x4000082 wait syz-fuzzer 75976 385682 25092 0 3 0x10008a sigsusp ksh 25092 170070 99319 0 3 0x9a kqread sshd 31763 379472 1 0 3 0x100083 ttyin getty 99319 355964 1 0 3 0x88 kqread sshd 18320 140319 6777 73 3 0x1100090 kqread syslogd 6777 239845 1 0 3 0x100082 netio syslogd 1666 342392 1 0 3 0x100080 kqread resolvd 9525 172523 48517 77 3 0x100092 kqread dhcpleased 56013 464097 48517 77 3 0x100092 kqread dhcpleased 48517 116276 1 0 3 0x80 kqread dhcpleased 95941 470679 0 0 3 0x14200 bored smr 26224 297984 0 0 2 0x14200 zerothread 81277 99547 0 0 3 0x14200 aiodoned aiodoned 96341 405492 0 0 3 0x14200 syncer update 8469 167057 0 0 3 0x14200 cleaner cleaner 86516 466686 0 0 3 0x14200 reaper reaper 99520 477656 0 0 3 0x14200 pgdaemon pagedaemon 65138 73939 0 0 3 0x14200 bored viomb 50048 101751 0 0 3 0x40014200 acpi0 acpi0 92785 395915 0 0 3 0x14200 bored softnet 74826 272173 0 0 3 0x14200 bored softnet 12531 31369 0 0 3 0x14200 bored softnet 76294 206159 0 0 3 0x14200 bored softnet 53673 125718 0 0 3 0x14200 bored systqmp 80885 160650 0 0 3 0x14200 bored systq 71821 444228 0 0 2 0x40014200 softclock 93455 371261 0 0 3 0x40014200 idle0 1 43027 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 10337 6486K 7590K 78643K 18075 0 pcb 13 14K 19K 78643K 617 0 rtable 223 15K 15K 78643K 644 0 ifaddr 72 16K 17K 78643K 188 0 sysctl 2 0K 0K 78643K 2 0 counters 27 17K 17K 78643K 55 0 ioctlops 0 0K 2K 78643K 322 0 iov 0 0K 32K 78643K 134 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1472 92K 92K 78643K 3672 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 9K 78643K 18 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 0K 78643K 368 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 17 61K 73K 78643K 1389 0 sigio 1 0K 0K 78643K 15 0 proc 58 59K 75K 78643K 701 0 subproc 104 6K 6K 78643K 195 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 215 0 in_multi 92 6K 6K 78643K 208 0 ether_multi 1 0K 0K 78643K 4 0 mrt 0 0K 0K 78643K 3 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 169 758K 758K 78643K 169 0 exec 0 0K 1K 78643K 675 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 313 87K 101K 78643K 10535 0 UVM aobj 33 2K 2K 78643K 36 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 43 0 NDP 12 0K 1K 78643K 64 0 temp 131 4686K 5705K 78643K 51260 0 kqueue 14 22K 30K 78643K 213 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 195 0 192 3 2 1 3 0 8 0 rtentry 112 198 0 98 4 0 4 4 0 8 0 unpcb 144 1996 0 1979 16 10 6 6 0 8 5 syncache 296 18 0 18 4 3 1 1 0 8 1 tcpqe 32 221 0 221 4 3 1 1 0 8 1 tcpcb 776 632 0 622 17 15 2 8 0 8 0 arp 88 34 0 18 1 0 1 1 0 8 0 inpcb 336 2302 0 2289 30 20 10 13 0 8 8 nd6 48 46 0 24 1 0 1 1 0 8 0 kcovpl 48 15 0 7 1 0 1 1 0 8 0 ppxss 1160 9 0 9 2 1 1 1 0 8 1 pppxif 1352 6 0 6 1 1 0 1 0 8 0 pfosfp 40 66 0 65 1 0 1 1 0 8 0 pfosfpen 112 66 0 0 2 0 2 2 0 8 0 pfanchor 1280 384 0 8 32 0 32 32 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 809 0 395 31 5 26 29 0 8 0 art_table 32 810 0 395 4 0 4 4 0 8 0 art_node 16 197 0 106 1 0 1 1 0 8 0 sysvmsgpl 40 61 0 50 1 0 1 1 0 8 0 semupl 112 5 0 5 1 1 0 1 0 8 0 semapl 112 364 0 354 1 0 1 1 0 8 0 shmpl 112 33 0 3 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 3761 0 2324 91 0 91 91 0 8 0 ffsino 240 3761 0 2324 85 0 85 85 0 8 0 nchpl 144 6129 0 4513 63 1 62 63 0 8 0 uvmvnodes 80 5538 0 0 114 0 114 114 0 8 0 vnodes 216 5538 0 0 308 0 308 308 0 8 0 namei 1024 26819 0 26817 3 1 2 2 0 8 1 kstatmem 264 68 0 44 2 0 2 2 0 8 0 scsiplug 72 3 0 3 1 1 0 1 0 8 0 scxspl 216 16773 0 16773 10 9 1 8 0 8 1 plimitpl 152 253 0 237 1 0 1 1 0 8 0 sigapl 424 1685 0 1619 8 0 8 8 0 8 0 futexpl 64 16572 0 16569 1 0 1 1 0 8 0 knotepl 120 56139 0 56057 28 16 12 14 0 8 8 kqueuepl 184 395 0 385 6 5 1 4 0 8 0 pipepl 288 692 0 664 15 8 7 7 0 8 4 fdescpl 432 1648 0 1620 4 0 4 4 0 8 0 filepl 120 18399 0 18153 30 15 15 18 0 8 6 lockfpl 104 2348 0 2346 7 5 2 3 0 8 1 lockfspl 48 851 0 849 3 2 1 2 0 8 0 sessionpl 144 30 0 14 1 0 1 1 0 8 0 pgrppl 48 47 0 31 1 0 1 1 0 8 0 ucredpl 104 3350 0 3338 1 0 1 1 0 8 0 zombiepl 144 1620 0 1619 1 0 1 1 0 8 0 processpl 1008 1685 0 1619 10 1 9 9 0 8 0 procpl 672 3826 0 3738 10 1 9 9 0 8 0 sosppl 168 21 0 20 1 0 1 1 0 8 0 sockpl 456 4495 0 4462 115 102 13 29 0 8 8 mcl64k 65536 63 0 63 2 1 1 1 0 8 1 mcl16k 16384 30 0 30 2 2 0 1 0 8 0 mcl12k 12288 54 0 54 3 2 1 1 0 8 1 mcl9k 9216 20 0 20 3 2 1 1 0 8 1 mcl8k 8192 74 0 74 2 1 1 1 0 8 1 mcl4k 4096 212 0 212 2 1 1 1 0 8 1 mcl2k2 2112 20 0 20 3 2 1 1 0 8 1 mcl2k 2048 73481 0 73339 50 31 19 28 0 8 0 mtagpl 96 1390 0 789 16 1 15 15 0 8 0 mbufpl 256 133945 0 133135 174 113 61 99 0 8 8 bufpl 288 6529 0 178 454 0 454 454 0 8 0 anonpl 24 386750 0 370011 153 24 129 134 0 188 13 amapchunkpl 152 30137 0 29417 47 9 38 38 0 158 6 amappl16 200 5670 0 5108 60 17 43 43 0 8 12 amappl15 192 5 0 5 1 1 0 1 0 8 0 amappl14 184 155 0 144 2 1 1 2 0 8 0 amappl13 176 7 0 6 1 0 1 1 0 8 0 amappl12 168 485 0 481 1 0 1 1 0 8 0 amappl11 160 49 0 39 1 0 1 1 0 8 0 amappl10 152 35 0 26 1 0 1 1 0 8 0 amappl9 144 956 0 955 1 0 1 1 0 8 0 amappl8 136 171 0 110 3 0 3 3 0 8 0 amappl7 128 154 0 134 2 0 2 2 0 8 0 amappl6 120 196 0 180 1 0 1 1 0 8 0 amappl5 112 161 0 155 1 0 1 1 0 8 0 amappl4 104 525 0 497 2 1 1 2 0 8 0 amappl3 96 4211 0 4158 2 0 2 2 0 8 0 amappl2 88 2055 0 1987 3 1 2 3 0 8 0 amappl1 80 39478 0 38754 24 7 17 22 0 8 1 amappl 88 9969 0 9784 6 1 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 35 0 3 1 0 1 1 0 8 0 uaddrrnd 24 1648 0 1620 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1648 0 1620 1 0 1 1 0 8 0 vmmpekpl 168 18829 0 18774 3 0 3 3 0 8 0 vmmpepl 168 162336 0 159599 158 20 138 138 0 357 12 vmsppl 272 1647 0 1620 4 2 2 3 0 8 0 rwobjpl 24 50200 0 42959 46 0 46 46 0 8 0 pdppl 4096 3302 0 3240 154 90 64 68 0 8 2 pvpl 32 788273 0 766123 286 67 219 269 0 265 25 pmappl 216 1647 0 1620 2 0 2 2 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 1106 0 277 26 1 25 25 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(ffffffff82592550) at panic+0x161 sys/kern/subr_prf.c:198 ufs_rename(ffff80002e9af618) at ufs_rename+0x1649 sys/ufs/ufs/ufs_vnops.c:909 VOP_RENAME(fffffd807efd1510,fffffd80640bd8b0,ffff80002e9af7e8,fffffd807dfc5ce0,fffffd80640bd2c8,ffff80002e9af738) at VOP_RENAME+0xf0 sys/kern/vfs_vops.c:370 dorenameat(ffff80002178b7b0,7,20000180,9,200001c0) at dorenameat+0x29c sys/kern/vfs_syscalls.c:3033 syscall(ffff80002e9af980) at syscall+0x446 sys/arch/amd64/amd64/trap.c:599 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x9e84aae3350, 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(ffffffff82592550) at panic+0x161 sys/kern/subr_prf.c:198 ufs_rename(ffff80002e9af618) at ufs_rename+0x1649 sys/ufs/ufs/ufs_vnops.c:909 VOP_RENAME(fffffd807efd1510,fffffd80640bd8b0,ffff80002e9af7e8,fffffd807dfc5ce0,fffffd80640bd2c8,ffff80002e9af738) at VOP_RENAME+0xf0 sys/kern/vfs_vops.c:370 dorenameat(ffff80002178b7b0,7,20000180,9,200001c0) at dorenameat+0x29c sys/kern/vfs_syscalls.c:3033 syscall(ffff80002e9af980) at syscall+0x446 sys/arch/amd64/amd64/trap.c:599 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x9e84aae3350, count: -7