panic: ufs_rename: lost dir entry Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *284661 70836 0 0 0x4000000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83311ed6) at panic+0x1cf sys/kern/subr_prf.c:198 ufs_rename(ffff80003811d898) at ufs_rename+0x18b2 sys/ufs/ufs/ufs_vnops.c:-1 VOP_RENAME(fffffd8067a5aa68,fffffd8067a5a048,ffff80003811da68,fffffd8067a5aa68,0,ffff80003811d9b8) at VOP_RENAME+0x13c sys/kern/vfs_vops.c:376 dorenameat(ffff80002a7c2538,3,200000000000,3,200000000440) at dorenameat+0x3f8 sys/kern/vfs_syscalls.c:3038 syscall(ffff80003811dc00) at syscall+0x97e mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003811dc00) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x23105869540, 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:438 panic(ffffffff83311ed6) at panic+0x1cf sys/kern/subr_prf.c:198 ufs_rename(ffff80003811d898) at ufs_rename+0x18b2 sys/ufs/ufs/ufs_vnops.c:-1 VOP_RENAME(fffffd8067a5aa68,fffffd8067a5a048,ffff80003811da68,fffffd8067a5aa68,0,ffff80003811d9b8) at VOP_RENAME+0x13c sys/kern/vfs_vops.c:376 dorenameat(ffff80002a7c2538,3,200000000000,3,200000000440) at dorenameat+0x3f8 sys/kern/vfs_syscalls.c:3038 syscall(ffff80003811dc00) at syscall+0x97e mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003811dc00) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x23105869540, count: -7 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80003811d620 rbx 0xfffffd8067a5a3a8 rdx 0 rcx 0 rax 0xffff80002a7c2538 r8 0x101010101010101 r9 0x8080808080808080 r10 0xa5dbbadd9bafa17f r11 0x704249232b1e5e0d r12 0 r13 0xfffffd806c2515d0 r14 0 r15 0x1 rip 0xffffffff81336be5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003811d610 ss 0 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=284661 pid=70836 tcnt=4 stat=onproc flags process=0 proc=4000000 runpri=17, usrpri=83, slppri=17, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a7c3c48,0xffff80002a7f1740 process=0xffff800035d16fe0 user=0xffff800038118000, vmspace=0xfffffd806bf0cb58 estcpu=33, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 8508 67326 565 0 2 0 syz-executor 8508 484313 565 0 2 0x4000000 syz-executor 39164 171807 71374 0 2 0 syz-executor 39164 31164 71374 0 3 0x4000080 fsleep syz-executor 89295 460991 18386 0 2 0 syz-executor 89295 115714 18386 0 3 0x4000080 fsleep syz-executor 62122 300477 29728 0 2 0 syz-executor 62122 516694 29728 0 3 0x4000080 fsleep syz-executor 70836 310104 67074 0 3 0x80 nanoslp syz-executor *70836 284661 67074 0 7 0x4000000 syz-executor 70836 429539 67074 0 3 0x4000080 fsleep syz-executor 70836 306189 67074 0 3 0x4000080 fsleep syz-executor 69708 478374 16558 0 2 0 syz-executor 69708 374087 16558 0 3 0x4000080 fsleep syz-executor 69708 78245 16558 0 3 0x4000080 fsleep syz-executor 61648 328144 29383 0 2 0 syz-executor 61648 240655 29383 0 3 0x4000080 piperd syz-executor 61648 456060 29383 0 3 0x4000080 piperd syz-executor 81399 506597 44163 -1 2 0x10 syz-executor 81399 110318 44163 -1 3 0x4000090 fsleep syz-executor 81399 442637 44163 -1 3 0x4000090 fsleep syz-executor 29728 340140 66535 0 3 0x82 nanoslp syz-executor 71374 464161 66535 0 3 0x82 nanoslp syz-executor 71478 93868 0 0 3 0x14200 acct acct 29383 124513 66535 0 3 0x82 nanoslp syz-executor 16558 33207 66535 0 3 0x82 nanoslp syz-executor 16755 34903 0 0 3 0x14200 bored sosplice 67074 304967 66535 0 3 0x82 nanoslp syz-executor 18386 373954 66535 0 3 0x82 nanoslp syz-executor 565 457617 66535 0 3 0x82 nanoslp syz-executor 44163 48066 66535 0 3 0x82 nanoslp syz-executor 66535 450020 32286 0 2 0x2 syz-executor 32286 427611 30560 0 3 0x10008a sigsusp ksh 30560 306551 9067 0 3 0x98 kqread sshd-session 9067 354091 75764 0 3 0x92 kqread sshd-session 45591 254524 1 0 3 0x100083 ttyin getty 75764 307172 1 0 3 0x88 kqread sshd 97283 171914 56259 73 3 0x1100090 kqread syslogd 56259 447966 1 0 3 0x100082 sbwait syslogd 65965 199978 1 0 3 0x100080 kqread resolvd 96895 508403 83149 77 3 0x100092 kqread dhcpleased 79907 118466 83149 77 3 0x100092 kqread dhcpleased 83149 173394 1 0 3 0x80 kqread dhcpleased 37273 15394 0 0 3 0x14200 bored smr 57176 234505 0 0 2 0x14200 zerothread 17108 501608 0 0 3 0x14200 aiodoned aiodoned 3708 180238 0 0 3 0x14200 syncer update 97596 305920 0 0 3 0x14200 cleaner cleaner 58638 274735 0 0 3 0x14200 reaper reaper 57096 472754 0 0 3 0x14200 pgdaemon pagedaemon 19623 209323 0 0 3 0x14200 bored viomb 41201 159949 0 0 3 0x40014200 acpi0 acpi0 14261 131924 0 0 3 0x14200 bored softnet3 19158 374615 0 0 3 0x14200 bored softnet2 6824 473441 0 0 3 0x14200 bored softnet1 62200 326563 0 0 3 0x14200 bored softnet0 12538 258021 0 0 3 0x14200 bored systqmp 62457 148276 0 0 3 0x14200 bored systq 99789 460735 0 0 3 0x40014200 tmoslp softclock 88502 154250 0 0 3 0x40014200 idle0 1 383669 0 0 3 0x82 wait init 0 0 -1 0 3 0x10010200 scheduler swapper ddb> show all locks No such command ddb> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10206 11056K 11557K 166960K 14102 0 pcb 17 22K 24K 166960K 336 0 rtable 223 12K 12K 166960K 758 0 pf 35 14K 22K 166960K 196 0 ifaddr 37 6K 7K 166960K 123 0 ifgroup 50 2K 2K 166960K 213 0 sysctl 4 1K 1K 166960K 4 0 counters 30 17K 17K 166960K 99 0 ioctlops 0 0K 4K 166960K 278 0 iov 1 16K 24K 166960K 152 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1463 92K 92K 166960K 3021 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 2K 10K 166960K 27 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 79 0 dirhash 12 2K 2K 166960K 24 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 18 65K 240K 166960K 1537 0 sigio 0 0K 0K 166960K 35 0 proc 61 59K 91K 166960K 791 0 subproc 72 4K 4K 166960K 126 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 488 0 in_multi 78 5K 7K 166960K 220 0 ether_multi 1 0K 0K 166960K 12 0 mrt 0 0K 0K 166960K 7 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 247 1102K 1102K 166960K 247 0 exec 0 0K 1K 166960K 727 0 fusefs mount 1 32K 32K 166960K 1 0 pfkey data 0 0K 0K 166960K 2 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 237 151K 169K 166960K 15044 0 UVM aobj 36 5K 5K 166960K 40 0 pinsyscall 39 78K 93K 166960K 2712 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 73 0 NDP 11 0K 1K 166960K 91 0 temp 78 8680K 8778K 166960K 50841 0 kqueue 14 22K 30K 166960K 251 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 260 0 256 3 0 3 3 0 8 2 rtentry 136 237 0 147 4 0 4 4 0 8 0 unpcb 144 1483 0 1466 12 6 6 6 0 8 5 syncache 336 5 0 5 2 1 1 1 0 8 1 tcpqe 32 1 0 1 1 0 1 1 0 8 1 tcpcb 808 434 0 427 14 6 8 8 0 8 7 arp 88 41 0 23 1 0 1 1 0 8 0 ipq 40 4 0 2 1 0 1 1 0 8 0 ipqe 40 7 0 3 1 0 1 1 0 8 0 inpcb 344 1971 0 1961 40 31 9 19 0 8 8 nd6 104 49 0 30 1 0 1 1 0 8 0 pkpcb 40 10 0 10 3 2 1 1 0 8 1 kcovpl 48 14 0 6 1 0 1 1 0 8 0 mppekey 1024 1 0 1 1 0 1 1 0 8 1 ppxss 1072 44 0 44 2 1 1 1 0 8 1 pppxif 1384 4 0 4 3 2 1 1 0 8 1 pfstscr 40 2 0 2 1 1 0 1 0 8 0 pfrktable 1344 9 0 5 1 0 1 1 0 8 0 pfanchor 1288 5 0 0 1 0 1 1 0 8 0 pftag 88 3 0 0 1 0 1 1 0 8 0 pfqueue 320 2 0 2 1 1 0 1 0 8 0 pfstkey 128 3 0 3 2 1 1 1 0 8 1 pfstate 344 2 0 2 2 1 1 1 0 8 1 pfrule 1344 8 0 4 1 0 1 1 0 8 0 art_heap8 4096 7 0 2 6 0 6 6 0 8 1 art_heap4 256 924 0 534 35 8 27 29 0 8 2 art_table 32 931 0 536 4 0 4 4 0 8 0 art_node 16 231 0 154 1 0 1 1 0 8 0 sysvmsgpl 40 7 0 3 1 0 1 1 0 8 0 semapl 112 77 0 67 1 0 1 1 0 8 0 shmpl 112 37 0 4 1 0 1 1 0 8 0 dirhash 1024 25 0 8 3 0 3 3 0 8 0 dino2pl 256 4163 0 2655 95 0 95 95 0 8 0 ffsino 248 4163 0 2655 95 0 95 95 0 8 0 nchpl 144 6295 0 4609 63 0 63 63 0 8 0 rtmask 32 9 0 9 2 1 1 1 0 8 1 uvmvnodes 80 5322 0 0 109 0 109 109 0 8 0 vnodes 216 5322 0 0 296 0 296 296 0 8 0 namei 1024 23320 0 23318 5 3 2 2 0 8 1 pfiaddrpl 120 3 0 1 1 0 1 1 0 8 0 kstatmem 264 120 0 98 2 0 2 2 0 8 0 scsiplug 72 12 0 12 3 2 1 1 0 8 1 scxspl 216 19781 0 19781 17 14 3 8 1 8 3 plimitpl 152 448 0 432 1 0 1 1 0 8 0 sigapl 424 1797 0 1749 6 0 6 6 0 8 0 futexpl 64 20871 0 20862 2 1 1 1 0 8 0 knotepl 120 70785 0 70737 30 19 11 16 0 8 8 kqueuepl 184 701 0 691 10 6 4 4 0 8 3 pipepl 296 315 0 286 10 2 8 8 0 8 5 fdescpl 440 1775 0 1745 5 1 4 5 0 8 0 filepl 120 12954 0 12735 20 7 13 13 0 8 5 lockfpl 104 542 0 539 2 1 1 2 0 8 0 lockfspl 48 232 0 229 1 0 1 1 0 8 0 sessionpl 144 29 0 21 1 0 1 1 0 8 0 pgrppl 48 60 0 44 1 0 1 1 0 8 0 ucredpl 104 1988 0 1976 1 0 1 1 0 8 0 zombiepl 144 2049 0 2049 1 0 1 1 0 8 1 processpl 1112 1797 0 1749 4 0 4 4 0 8 0 procpl 656 3891 0 3830 6 0 6 6 0 8 0 sosppl 168 6 0 6 3 2 1 1 0 8 1 sockpl 528 3752 0 3721 31 20 11 15 0 8 8 mcl64k 65536 17 0 17 1 0 1 1 0 8 1 mcl16k 16384 3 0 3 2 1 1 1 0 8 1 mcl9k 9216 2 0 2 2 2 0 1 0 8 0 mcl8k 8192 14 0 14 3 2 1 1 0 8 1 mcl4k 4096 4169 0 4118 15 7 8 13 0 8 1 mcl2k 2048 1478 0 1477 6 4 2 3 0 8 1 mtagpl 96 84 0 26 2 0 2 2 0 8 0 mbufpl 256 21448 0 21257 56 33 23 52 0 8 8 bufpl 280 6416 0 189 445 0 445 445 0 8 0 anonpl 24 226710 0 223470 64 29 35 45 0 187 7 amapchunkpl 152 50122 0 49602 46 16 30 30 0 158 7 amappl16 200 3704 0 3670 21 17 4 15 0 8 1 amappl15 192 4 0 4 1 1 0 1 0 8 0 amappl14 184 120 0 110 1 0 1 1 0 8 0 amappl13 176 7 0 7 1 1 0 1 0 8 0 amappl12 168 2485 0 2455 3 1 2 3 0 8 0 amappl11 160 46 0 36 1 0 1 1 0 8 0 amappl10 152 10 0 10 2 2 0 1 0 8 0 amappl9 144 268 0 268 1 1 0 1 0 8 0 amappl8 136 20 0 19 1 0 1 1 0 8 0 amappl7 128 111 0 101 1 0 1 1 0 8 0 amappl6 120 234 0 230 1 0 1 1 0 8 0 amappl5 112 138 0 131 1 0 1 1 0 8 0 amappl4 104 328 0 308 1 0 1 1 0 8 0 amappl3 96 10154 0 10033 5 1 4 4 0 8 0 amappl2 88 774 0 718 2 0 2 2 0 8 0 amappl1 80 14196 0 13642 14 2 12 14 0 8 0 amappl 88 14000 0 13828 5 0 5 5 0 92 0 dma8192 8192 1 0 1 1 1 0 1 0 8 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 258 0 258 3 2 1 1 0 8 1 dma64 64 7 0 7 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 25 0 24 1 0 1 1 0 8 0 aobjpl 72 39 0 4 1 0 1 1 0 8 0 uaddrrnd 24 1775 0 1745 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1775 0 1745 1 0 1 1 0 8 0 vmmpekpl 168 14815 0 14774 3 0 3 3 0 8 0 vmmpepl 168 112883 0 110951 101 10 91 95 0 357 5 vmsppl 360 1774 0 1745 4 1 3 4 0 8 0 rwobjpl 32 33805 0 27569 51 0 51 51 0 8 0 pdppl 4096 3556 0 3490 112 46 66 80 0 8 0 pvpl 32 711672 0 703004 163 56 107 128 0 265 20 pmappl 216 1774 0 1745 3 0 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 360 0 114 8 0 8 8 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:438 panic(ffffffff83311ed6) at panic+0x1cf sys/kern/subr_prf.c:198 ufs_rename(ffff80003811d898) at ufs_rename+0x18b2 sys/ufs/ufs/ufs_vnops.c:-1 VOP_RENAME(fffffd8067a5aa68,fffffd8067a5a048,ffff80003811da68,fffffd8067a5aa68,0,ffff80003811d9b8) at VOP_RENAME+0x13c sys/kern/vfs_vops.c:376 dorenameat(ffff80002a7c2538,3,200000000000,3,200000000440) at dorenameat+0x3f8 sys/kern/vfs_syscalls.c:3038 syscall(ffff80003811dc00) at syscall+0x97e mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003811dc00) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x23105869540, count: -7 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83311ed6) at panic+0x1cf sys/kern/subr_prf.c:198 ufs_rename(ffff80003811d898) at ufs_rename+0x18b2 sys/ufs/ufs/ufs_vnops.c:-1 VOP_RENAME(fffffd8067a5aa68,fffffd8067a5a048,ffff80003811da68,fffffd8067a5aa68,0,ffff80003811d9b8) at VOP_RENAME+0x13c sys/kern/vfs_vops.c:376 dorenameat(ffff80002a7c2538,3,200000000000,3,200000000440) at dorenameat+0x3f8 sys/kern/vfs_syscalls.c:3038 syscall(ffff80003811dc00) at syscall+0x97e mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003811dc00) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x23105869540, count: -7