panic: ufs_rename: lost dir entry Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 5831 75585 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(ffff80003164db28) at ufs_rename+0x18b2 VOP_RENAME(fffffd80645eb440,fffffd80645eb008,ffff80003164dcf8,fffffd80645eb290,0,ffff80003164dc48) at VOP_RENAME+0x13c sys/kern/vfs_vops.c:376 dorenameat(ffff80002cbe8cd0,ffffff9c,20000540,ffffff9c,200005c0) at dorenameat+0x3f8 sys/kern/vfs_syscalls.c:3021 syscall(ffff80003164de90) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xe4cd33b72b0, 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(ffff80003164db28) at ufs_rename+0x18b2 VOP_RENAME(fffffd80645eb440,fffffd80645eb008,ffff80003164dcf8,fffffd80645eb290,0,ffff80003164dc48) at VOP_RENAME+0x13c sys/kern/vfs_vops.c:376 dorenameat(ffff80002cbe8cd0,ffffff9c,20000540,ffffff9c,200005c0) at dorenameat+0x3f8 sys/kern/vfs_syscalls.c:3021 syscall(ffff80003164de90) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xe4cd33b72b0, count: -7 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80003164d8b0 rbx 0xfffffd80645eb290 rdx 0 rcx 0 rax 0xffff80002cbe8cd0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x1ec149a8bb244bcd r11 0x19c252f71918253b r12 0 r13 0xfffffd806c6fd1f0 r14 0 r15 0x1 rip 0xffffffff8115ddb5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003164d8a0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=5831 pid=75585 tcnt=4 stat=onproc flags process=8000000 proc=4000000 runpri=32, usrpri=82, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002cbe91e0,0xffff80002cbe9478 process=0xffff80002a4e2cd0 user=0xffff800031648000, vmspace=0xfffffd806ae85170 estcpu=32, cpticks=0, pctcpu=0.0, user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 70000 510063 95091 0 2 0x8000000 syz-executor 70000 169817 95091 0 2 0xc000000 syz-executor 81509 88305 59725 0 3 0x8000000 futex syz-executor 81509 21117 59725 0 2 0xc000000 syz-executor 75585 418731 30002 0 3 0x8000000 futex syz-executor *75585 5831 30002 0 7 0xc000000 syz-executor 75585 224600 30002 0 2 0xc000000 syz-executor 75585 357412 30002 0 2 0xc000000 syz-executor 39391 520235 50025 0 3 0x8000000 futex syz-executor 39391 169547 50025 0 3 0xc000080 fsleep syz-executor 37513 470300 69090 0 2 0x8000000 syz-executor 37513 412918 69090 0 2 0xc000000 syz-executor 37513 257568 69090 0 3 0xc000080 fsleep syz-executor 435 371776 4882 0 3 0x8000000 futex syz-executor 435 479660 4882 0 3 0xc000080 fsleep syz-executor 435 123317 4882 0 3 0xc000080 fsleep syz-executor 83939 268440 75449 60928 3 0x8000010 futex syz-executor 83939 284602 75449 60928 3 0xc000090 fsleep syz-executor 83939 39825 75449 60928 3 0xc000090 fsleep syz-executor 84534 114361 50519 0 3 0x8000010 futex syz-executor 84534 156628 50519 0 3 0xc000090 fsleep syz-executor 84534 60890 50519 0 3 0xc000090 fsleep syz-executor 59725 283353 36001 0 3 0x8000082 nanoslp syz-executor 75449 188135 36001 0 3 0x8000082 nanoslp syz-executor 95091 466232 36001 0 3 0x8000082 nanoslp syz-executor 50519 339457 36001 0 3 0x8000082 nanoslp syz-executor 69090 147013 36001 0 3 0x8000082 nanoslp syz-executor 50025 203080 36001 0 3 0x8000082 nanoslp syz-executor 30002 278896 36001 0 3 0x8000082 nanoslp syz-executor 4882 487862 36001 0 3 0x8000082 nanoslp syz-executor 58122 367990 1 0 3 0x18100083 ttyin getty 53873 116721 0 0 3 0x14200 acct acct 56408 32541 0 0 3 0x14200 bored sosplice 36001 226742 39507 0 3 0x8000082 kqread syz-executor 39507 328218 37915 0 3 0x810008a sigsusp ksh 37915 415358 15261 0 3 0x18000098 kqread sshd-session 15261 82431 53882 0 3 0x18000092 kqread sshd-session 53882 128688 1 0 3 0x18000088 kqread sshd 43047 202813 82052 73 3 0x19100090 kqread syslogd 82052 324638 1 0 3 0x18100082 sbwait syslogd 35340 340447 1 0 3 0x18100080 kqread resolvd 85979 370477 98732 77 3 0x18100092 kqread dhcpleased 74708 321517 98732 77 3 0x18100092 kqread dhcpleased 98732 261783 1 0 3 0x18000080 kqread dhcpleased 63099 51085 0 0 3 0x14200 bored smr 69673 343313 0 0 2 0x14200 zerothread 24430 167565 0 0 3 0x14200 aiodoned aiodoned 34035 256054 0 0 3 0x14200 syncer update 84009 242165 0 0 3 0x14200 cleaner cleaner 5857 55027 0 0 3 0x14200 reaper reaper 26708 364754 0 0 3 0x14200 pgdaemon pagedaemon 71103 43097 0 0 3 0x14200 bored viomb 65908 348336 0 0 3 0x40014200 acpi0 acpi0 92702 236666 0 0 3 0x14200 bored softnet3 45697 4739 0 0 3 0x14200 bored softnet2 51242 179867 0 0 3 0x14200 bored softnet1 14706 343237 0 0 3 0x14200 bored softnet0 8372 86078 0 0 3 0x14200 bored systqmp 60541 3198 0 0 3 0x14200 bored systq 13340 393122 0 0 3 0x40014200 tmoslp softclock 48485 263667 0 0 3 0x40014200 idle0 1 392374 0 0 3 0x8080082 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 10186 10105K 10608K 166960K 14339 0 pcb 17 16K 18K 166960K 456 0 rtable 251 11K 11K 166960K 2767 0 pf 36 14K 18K 166960K 512 0 ifaddr 44 8K 8K 166960K 350 0 ifgroup 58 2K 2K 166960K 372 0 sysctl 3 0K 0K 166960K 5 0 counters 32 17K 18K 166960K 115 0 ioctlops 1 4K 4K 166960K 422 0 iov 0 0K 16K 166960K 161 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1478 93K 93K 166960K 3741 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 4 9K 13K 166960K 40 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 232 0 dirhash 15 2K 3K 166960K 45 0 ACPI 1697 195K 286K 166960K 12548 0 file desc 18 65K 97K 166960K 2794 0 sigio 0 0K 0K 166960K 50 0 proc 58 59K 124K 166960K 2491 0 subproc 56 3K 3K 166960K 561 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 341 0 in_multi 99 7K 7K 166960K 951 0 ether_multi 1 0K 0K 166960K 13 0 mrt 1 0K 0K 166960K 6 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 91 413K 413K 166960K 91 0 exec 0 0K 1K 166960K 1529 0 pfkey data 0 0K 0K 166960K 3 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 256 80K 122K 166960K 22973 0 UVM aobj 38 4K 4K 166960K 58 0 pinsyscall 39 78K 98K 166960K 5631 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 130 0 NDP 13 0K 2K 166960K 252 0 temp 100 6809K 6937K 166960K 62295 0 kqueue 13 20K 28K 166960K 180 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 416 0 413 4 1 3 3 0 8 2 rtentry 112 955 0 845 5 1 4 4 0 8 0 unpcb 144 1524 0 1503 10 4 6 6 0 8 5 syncache 336 9 0 9 1 1 0 1 0 8 0 tcpcb 808 599 0 593 11 7 4 8 0 8 3 arp 88 167 0 148 1 0 1 1 0 8 0 ipq 40 5 0 5 1 0 1 1 0 8 1 ipqe 40 31 0 31 1 0 1 1 0 8 1 inpcb 336 2618 0 2604 15 7 8 12 0 8 6 nd6 104 284 0 248 1 0 1 1 0 8 0 pkpcb 40 6 0 6 1 1 0 1 0 8 0 kcovpl 48 80 0 72 1 0 1 1 0 8 0 ppxss 1072 10 0 10 1 0 1 1 0 8 1 pfstscr 40 1 0 1 1 1 0 1 0 8 0 pfrktable 1344 39 0 36 1 0 1 1 0 8 0 pfanchor 1288 26 0 24 1 0 1 1 0 8 0 pftag 88 7 0 2 1 0 1 1 0 8 0 pfstkey 128 2 0 2 1 1 0 1 0 8 0 pfstate 344 1 0 1 1 1 0 1 0 8 0 pfrule 1344 126 0 93 3 0 3 3 0 8 0 art_heap8 4096 2 0 1 2 1 1 2 0 8 0 art_heap4 256 3813 0 3329 35 4 31 31 0 8 0 art_table 32 3815 0 3330 4 0 4 4 0 8 0 art_node 16 954 0 854 1 0 1 1 0 8 0 sysvmsgpl 40 22 0 14 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 229 0 219 1 0 1 1 0 8 0 shmpl 112 55 0 20 1 0 1 1 0 8 0 dirhash 1024 39 0 20 3 0 3 3 0 8 0 dino2pl 256 4521 0 2893 102 0 102 102 0 8 0 ffsino 240 4521 0 2893 96 0 96 96 0 8 0 nchpl 144 6923 0 5155 66 0 66 66 0 8 0 uvmvnodes 80 6350 0 0 130 0 130 130 0 8 0 vnodes 216 6350 0 0 353 0 353 353 0 8 0 namei 1024 31293 0 31290 4 2 2 2 0 8 1 vcpupl 3904 6 0 0 1 0 1 1 0 8 0 vmpool 664 6 0 0 1 0 1 1 0 8 0 pfiaddrpl 120 31 0 8 1 0 1 1 0 8 0 kstatmem 264 192 0 166 3 0 3 3 0 8 0 scsiplug 72 1 0 1 1 1 0 1 0 8 0 scxspl 216 52590 0 52590 10 7 3 8 1 8 3 plimitpl 152 401 0 384 1 0 1 1 0 8 0 sigapl 424 2933 0 2885 7 1 6 7 0 8 0 futexpl 64 25941 0 25932 1 0 1 1 0 8 0 knotepl 120 201366 0 201319 15 6 9 10 0 8 7 kqueuepl 184 500 0 491 6 2 4 4 0 8 3 pipepl 288 587 0 560 5 0 5 5 0 8 2 fdescpl 432 2912 0 2882 5 1 4 5 0 8 0 filepl 120 16868 0 16658 15 3 12 13 0 8 5 lockfpl 104 605 0 603 2 1 1 2 0 8 0 lockfspl 48 249 0 247 1 0 1 1 0 8 0 sessionpl 144 92 0 84 1 0 1 1 0 8 0 pgrppl 48 188 0 172 1 0 1 1 0 8 0 ucredpl 104 2577 0 2563 2 0 2 2 0 8 1 zombiepl 144 3192 0 3192 1 0 1 1 0 8 1 processpl 1088 2933 0 2885 4 0 4 4 0 8 0 procpl 648 5335 0 5273 6 0 6 6 0 8 0 sosppl 168 21 0 21 2 1 1 1 0 8 1 sockpl 504 4639 0 4602 54 42 12 26 0 8 7 mcl64k 65536 53 0 53 2 1 1 1 0 8 1 mcl16k 16384 22 0 22 2 1 1 1 0 8 1 mcl12k 12288 10 0 10 2 1 1 1 0 8 1 mcl9k 9216 11 0 11 2 1 1 1 0 8 1 mcl8k 8192 90 0 90 2 1 1 1 0 8 1 mcl4k 4096 79 0 79 2 1 1 1 0 8 1 mcl2k2 2112 8 0 7 2 1 1 1 0 8 0 mcl2k 2048 11010 0 10916 27 13 14 27 0 8 1 mtagpl 96 71 0 55 1 0 1 1 0 8 0 mbufpl 256 32254 0 32001 72 48 24 62 0 8 6 bufpl 280 11745 0 4296 533 0 533 533 0 8 0 anonpl 24 406811 0 395385 120 51 69 92 0 187 0 amapchunkpl 152 74001 0 73094 57 22 35 46 0 158 0 amappl16 200 6656 0 6539 40 26 14 16 0 8 6 amappl15 192 14 0 14 1 1 0 1 0 8 0 amappl14 184 249 0 239 1 0 1 1 0 8 0 amappl13 176 8 0 8 1 1 0 1 0 8 0 amappl12 168 4668 0 4638 3 1 2 3 0 8 0 amappl11 160 52 0 42 1 0 1 1 0 8 0 amappl10 152 25 0 25 1 1 0 1 0 8 0 amappl9 144 124 0 124 1 1 0 1 0 8 0 amappl8 136 22 0 20 1 0 1 1 0 8 0 amappl7 128 240 0 230 1 0 1 1 0 8 0 amappl6 120 861 0 860 1 0 1 1 0 8 0 amappl5 112 411 0 402 1 0 1 1 0 8 0 amappl4 104 494 0 479 1 0 1 1 0 8 0 amappl3 96 14834 0 14706 5 1 4 4 0 8 0 amappl2 88 1585 0 1527 2 0 2 2 0 8 0 amappl1 80 19720 0 19182 15 2 13 14 0 8 1 amappl 88 22023 0 21826 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 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 57 0 20 1 0 1 1 0 8 0 uaddrrnd 24 2918 0 2882 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2918 0 2882 1 0 1 1 0 8 0 vmmpekpl 168 22417 0 22368 3 0 3 3 0 8 0 vmmpepl 168 193571 0 191544 106 10 96 96 0 357 7 vmsppl 344 2917 0 2882 4 0 4 4 0 8 0 rwobjpl 24 54780 0 47382 45 0 45 45 0 8 0 pdppl 4096 5842 0 5770 216 144 72 82 0 8 0 pvpl 32 1440703 0 1408321 547 285 262 397 0 265 0 pmappl 216 2917 0 2882 3 0 3 3 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 658 0 275 13 0 13 13 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(ffff80003164db28) at ufs_rename+0x18b2 VOP_RENAME(fffffd80645eb440,fffffd80645eb008,ffff80003164dcf8,fffffd80645eb290,0,ffff80003164dc48) at VOP_RENAME+0x13c sys/kern/vfs_vops.c:376 dorenameat(ffff80002cbe8cd0,ffffff9c,20000540,ffffff9c,200005c0) at dorenameat+0x3f8 sys/kern/vfs_syscalls.c:3021 syscall(ffff80003164de90) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xe4cd33b72b0, 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(ffff80003164db28) at ufs_rename+0x18b2 VOP_RENAME(fffffd80645eb440,fffffd80645eb008,ffff80003164dcf8,fffffd80645eb290,0,ffff80003164dc48) at VOP_RENAME+0x13c sys/kern/vfs_vops.c:376 dorenameat(ffff80002cbe8cd0,ffffff9c,20000540,ffffff9c,200005c0) at dorenameat+0x3f8 sys/kern/vfs_syscalls.c:3021 syscall(ffff80003164de90) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xe4cd33b72b0, count: -7