panic: ufs_rename: lost dir entry Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 25774 56452 0 0 0x4000000 0 syz-executor1501361750 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff82569ff0) at panic+0x161 sys/kern/subr_prf.c:202 ufs_rename(ffff80002164f9e8) at ufs_rename+0x1649 sys/ufs/ufs/ufs_vnops.c:921 VOP_RENAME(fffffd807efe7460,fffffd80785d0508,ffff80002164fbb8,fffffd80785d0dc8,0,ffff80002164fb08) at VOP_RENAME+0xf0 sys/kern/vfs_vops.c:386 dorenameat(ffff8000215f7500,3,20000000,4,20000040) at dorenameat+0x29c sys/kern/vfs_syscalls.c:3022 syscall(ffff80002164fd50) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa35a5a165f0, 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:440 panic(ffffffff82569ff0) at panic+0x161 sys/kern/subr_prf.c:202 ufs_rename(ffff80002164f9e8) at ufs_rename+0x1649 sys/ufs/ufs/ufs_vnops.c:921 VOP_RENAME(fffffd807efe7460,fffffd80785d0508,ffff80002164fbb8,fffffd80785d0dc8,0,ffff80002164fb08) at VOP_RENAME+0xf0 sys/kern/vfs_vops.c:386 dorenameat(ffff8000215f7500,3,20000000,4,20000040) at dorenameat+0x29c sys/kern/vfs_syscalls.c:3022 syscall(ffff80002164fd50) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa35a5a165f0, count: -7 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002164f780 rbx 0xfffffd80785d0ce8 rdx 0x3fd rcx 0 rax 0x22 r8 0x101010101010101 r9 0x8080808080808080 r10 0x837a181cc297061c r11 0x59fb49e347f441d r12 0 r13 0xfffffd806cc08b48 r14 0 r15 0x1 rip 0xffffffff81d28b78 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80002164f770 ss 0 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor1501361750) pid=25774 stat=onproc flags process=0 proc=4000000 pri=17, usrpri=53, nice=20 forw=0xffffffffffffffff, list=0xffff8000215f62a0,0xffff8000215f7270 process=0xffff8000215f8be0 user=0xffff80002164a000, vmspace=0xfffffd806d875010 estcpu=6, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 82755 113621 79293 0 2 0 syz-executor1501361750 99541 149057 87023 0 2 0 syz-executor1501361750 99541 416243 87023 0 3 0x4000080 fsleep syz-executor1501361750 56452 135517 32815 0 2 0 syz-executor1501361750 56452 52458 32815 0 3 0x4000080 fsleep syz-executor1501361750 *56452 25774 32815 0 7 0x4000000 syz-executor1501361750 71902 194106 18699 0 2 0 syz-executor1501361750 71902 400971 18699 0 3 0x4000080 fsleep syz-executor1501361750 18699 189760 92512 0 3 0x80 nanoslp syz-executor1501361750 32815 289527 92512 0 3 0x80 nanoslp syz-executor1501361750 87023 108684 92512 0 3 0x80 nanoslp syz-executor1501361750 79293 101155 92512 0 3 0x80 nanoslp syz-executor1501361750 92512 158527 20000 0 3 0x82 nanoslp syz-executor1501361750 20000 358005 41197 0 3 0x10008a sigsusp ksh 41197 90466 41519 0 3 0x9a kqread sshd 1763 439983 1 0 3 0x100083 ttyin getty 41519 158761 1 0 3 0x88 kqread sshd 54881 111428 75424 73 3 0x1100090 kqread syslogd 75424 455366 1 0 3 0x100082 netio syslogd 15268 330948 1 0 3 0x100080 kqread resolvd 12737 159309 60998 77 3 0x100092 kqread dhcpleased 89304 120970 60998 77 3 0x100092 kqread dhcpleased 60998 167604 1 0 3 0x80 kqread dhcpleased 42521 49515 0 0 3 0x14200 bored smr 52094 160795 0 0 2 0x14200 zerothread 13331 2917 0 0 3 0x14200 aiodoned aiodoned 52751 273005 0 0 3 0x14200 syncer update 56493 85660 0 0 3 0x14200 cleaner cleaner 7159 355624 0 0 3 0x14200 reaper reaper 89262 431774 0 0 3 0x14200 pgdaemon pagedaemon 86437 417169 0 0 3 0x14200 bored viomb 50186 442265 0 0 3 0x40014200 acpi0 acpi0 76224 491840 0 0 3 0x14200 bored softnet 27993 91803 0 0 3 0x14200 bored systqmp 48600 163478 0 0 3 0x14200 bored systq 60589 322855 0 0 3 0x40014200 bored softclock 11648 68339 0 0 3 0x40014200 idle0 1 223933 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 10131 6381K 6412K 78643K 11221 0 pcb 13 8K 8K 78643K 13 0 rtable 62 2K 2K 78643K 114 0 ifaddr 24 7K 7K 78643K 24 0 counters 19 16K 16K 78643K 19 0 ioctlops 0 0K 2K 78643K 25 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1166 73K 73K 78643K 1179 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 1K 78643K 2 0 VM map 2 0K 0K 78643K 2 0 sem 2 0K 0K 78643K 2 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 1 0K 0K 78643K 1 0 proc 55 54K 55K 78643K 226 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 in_multi 11 0K 0K 78643K 11 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 25 122K 122K 78643K 25 0 exec 0 0K 2K 78643K 404 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 7 26K 26K 78643K 7 0 UVM amap 132 5K 7K 78643K 4063 0 UVM aobj 3 2K 2K 78643K 3 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 NDP 3 0K 0K 78643K 3 0 temp 19 4686K 4750K 78643K 4001 0 kqueue 11 16K 18K 78643K 24 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 20 0 17 1 0 1 1 0 8 0 rtentry 112 23 0 1 1 0 1 1 0 8 0 unpcb 136 33 0 20 1 0 1 1 0 8 0 syncache 296 5 0 5 2 1 1 1 0 8 1 tcpcb 736 8 0 5 1 0 1 1 0 8 0 arp 88 2 0 0 1 0 1 1 0 8 0 inpcb 304 25 0 19 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 96 0 0 6 0 6 6 0 8 0 art_table 32 97 0 0 1 0 1 1 0 8 0 art_node 16 22 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1930 0 528 88 0 88 88 0 8 0 ffsino 240 1930 0 528 83 0 83 83 0 8 0 nchpl 144 2859 0 1306 59 0 59 59 0 8 0 uvmvnodes 80 1939 0 0 40 0 40 40 0 8 0 vnodes 224 1939 0 0 115 0 115 115 0 8 0 namei 1024 7088 0 7086 3 1 2 2 0 8 1 scxspl 216 8091 0 8091 11 10 1 8 0 8 1 plimitpl 152 15 0 9 1 0 1 1 0 8 0 sigapl 424 486 0 448 5 0 5 5 0 8 0 futexpl 64 1449 0 1446 1 0 1 1 0 8 0 knotepl 120 7734 0 7704 3 1 2 2 0 8 1 kqueuepl 184 20 0 13 1 0 1 1 0 8 0 pipepl 304 82 0 79 2 1 1 1 0 8 0 fdescpl 432 473 0 452 4 0 4 4 0 8 1 filepl 120 1834 0 1775 3 0 3 3 0 8 1 lockfpl 104 6 0 4 1 0 1 1 0 8 0 lockfspl 48 4 0 2 1 0 1 1 0 8 0 sessionpl 144 17 0 9 1 0 1 1 0 8 0 pgrppl 48 17 0 9 1 0 1 1 0 8 0 ucredpl 96 64 0 54 1 0 1 1 0 8 0 zombiepl 144 452 0 448 2 1 1 1 0 8 0 processpl 1000 486 0 448 6 0 6 6 0 8 0 procpl 672 813 0 771 5 0 5 5 0 8 1 sockpl 448 78 0 56 3 0 3 3 0 8 0 mcl8k 8192 9 0 9 2 1 1 1 0 8 1 mcl4k 4096 5 0 5 2 1 1 1 0 8 1 mcl2k 2048 5849 0 5821 7 1 6 6 0 8 2 mtagpl 96 4 0 4 1 1 0 1 0 8 0 mbufpl 256 11096 0 11029 6 0 6 6 0 8 1 bufpl 288 2463 0 87 170 0 170 170 0 8 0 anonpl 24 74711 0 71577 29 3 26 26 0 188 5 amapchunkpl 152 8547 0 8294 16 1 15 15 0 158 3 amappl16 200 406 0 388 3 1 2 2 0 8 0 amappl15 192 62 0 59 1 0 1 1 0 8 0 amappl13 176 33 0 32 2 1 1 1 0 8 0 amappl12 168 13 0 12 1 0 1 1 0 8 0 amappl11 160 44 0 33 1 0 1 1 0 8 0 amappl10 152 1 0 1 1 1 0 1 0 8 0 amappl9 144 428 0 426 1 0 1 1 0 8 0 amappl8 136 368 0 360 1 0 1 1 0 8 0 amappl7 128 60 0 57 1 0 1 1 0 8 0 amappl6 120 109 0 96 1 0 1 1 0 8 0 amappl5 112 222 0 214 1 0 1 1 0 8 0 amappl4 104 765 0 740 1 0 1 1 0 8 0 amappl3 96 291 0 278 1 0 1 1 0 8 0 amappl2 88 354 0 318 1 0 1 1 0 8 0 amappl1 80 10935 0 10515 13 3 10 10 0 8 0 amappl 88 3785 0 3672 4 0 4 4 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 2 0 0 1 0 1 1 0 8 0 uaddrrnd 24 473 0 452 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 473 0 452 1 0 1 1 0 8 0 vmmpekpl 168 7153 0 7139 1 0 1 1 0 8 0 vmmpepl 168 37761 0 36622 70 5 65 65 0 357 15 vmsppl 272 472 0 452 3 1 2 2 0 8 0 rwobjpl 24 13014 0 10474 16 0 16 16 0 8 0 pdppl 4096 952 0 904 86 30 56 64 0 8 8 pvpl 32 180799 0 175477 61 7 54 54 0 265 9 pmappl 216 472 0 452 2 0 2 2 0 8 0 extentpl 40 58 0 38 1 0 1 1 0 8 0 phpool 112 467 0 37 13 0 13 13 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:440 panic(ffffffff82569ff0) at panic+0x161 sys/kern/subr_prf.c:202 ufs_rename(ffff80002164f9e8) at ufs_rename+0x1649 sys/ufs/ufs/ufs_vnops.c:921 VOP_RENAME(fffffd807efe7460,fffffd80785d0508,ffff80002164fbb8,fffffd80785d0dc8,0,ffff80002164fb08) at VOP_RENAME+0xf0 sys/kern/vfs_vops.c:386 dorenameat(ffff8000215f7500,3,20000000,4,20000040) at dorenameat+0x29c sys/kern/vfs_syscalls.c:3022 syscall(ffff80002164fd50) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa35a5a165f0, count: -7 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff82569ff0) at panic+0x161 sys/kern/subr_prf.c:202 ufs_rename(ffff80002164f9e8) at ufs_rename+0x1649 sys/ufs/ufs/ufs_vnops.c:921 VOP_RENAME(fffffd807efe7460,fffffd80785d0508,ffff80002164fbb8,fffffd80785d0dc8,0,ffff80002164fb08) at VOP_RENAME+0xf0 sys/kern/vfs_vops.c:386 dorenameat(ffff8000215f7500,3,20000000,4,20000040) at dorenameat+0x29c sys/kern/vfs_syscalls.c:3022 syscall(ffff80002164fd50) at syscall+0x44e sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xa35a5a165f0, count: -7 ddb>