panic: ufs_rename: lost dir entry Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *471745 79735 0 0 0x4000000 0 syz-executor.1 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82738384) at panic+0x161 sys/kern/subr_prf.c:198 ufs_rename(ffff80002e91ca48) at ufs_rename+0x1649 sys/ufs/ufs/ufs_vnops.c:909 VOP_RENAME(fffffd807efd0360,fffffd8067d2d6c8,ffff80002e91cc18,fffffd80724b46c0,fffffd8067d2d7a0,ffff80002e91cb68) at VOP_RENAME+0xf0 sys/kern/vfs_vops.c:370 dorenameat(ffff800029a3ab10,4,20000180,6,200001c0) at dorenameat+0x29c sys/kern/vfs_syscalls.c:3033 syscall(ffff80002e91cdb0) at syscall+0x4e6 sys/arch/amd64/amd64/trap.c:626 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xdb189c51400, 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(ffffffff82738384) at panic+0x161 sys/kern/subr_prf.c:198 ufs_rename(ffff80002e91ca48) at ufs_rename+0x1649 sys/ufs/ufs/ufs_vnops.c:909 VOP_RENAME(fffffd807efd0360,fffffd8067d2d6c8,ffff80002e91cc18,fffffd80724b46c0,fffffd8067d2d7a0,ffff80002e91cb68) at VOP_RENAME+0xf0 sys/kern/vfs_vops.c:370 dorenameat(ffff800029a3ab10,4,20000180,6,200001c0) at dorenameat+0x29c sys/kern/vfs_syscalls.c:3033 syscall(ffff80002e91cdb0) at syscall+0x4e6 sys/arch/amd64/amd64/trap.c:626 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xdb189c51400, count: -7 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002e91c7e0 rbx 0xfffffd8067d2d290 rdx 0 rcx 0 rax 0xffff800029a3ab10 r8 0x101010101010101 r9 0x8080808080808080 r10 0xfe51d075736c9d0a r11 0x8c9ae997f6bc2a0c r12 0 r13 0xfffffd806459cd20 r14 0 r15 0x1 rip 0xffffffff81817ba8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80002e91c7d0 ss 0 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=471745 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=81, nice=20 forw=0xffffffffffffffff, list=0xffff800029a3b8a8,0xffff800029a3add8 process=0xffff800024b9ebd8 user=0xffff80002e917000, vmspace=0xfffffd806b919890 estcpu=31, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 63464 79619 86268 0 2 0 syz-executor.5 63464 226400 86268 0 2 0x4000000 syz-executor.5 63464 271406 86268 0 2 0x4000000 syz-executor.5 63464 288115 86268 0 3 0x4000080 fsleep syz-executor.5 2330 142240 21265 0 2 0 syz-executor.7 2330 199601 21265 0 3 0x4000080 msgwait syz-executor.7 2330 303679 21265 0 2 0x4000000 syz-executor.7 30267 325141 71434 60928 2 0x10 syz-executor.6 30267 40202 71434 60928 3 0x4000090 fsleep syz-executor.6 26518 377831 74023 0 3 0x80 nanoslp syz-executor.4 26518 357521 74023 0 3 0x4000080 msgwait syz-executor.4 26518 46350 74023 0 3 0x4000080 fsleep syz-executor.4 79735 218690 56152 0 3 0x80 nanoslp syz-executor.1 79735 97876 56152 0 3 0x4000080 fsleep syz-executor.1 *79735 471745 56152 0 7 0x4000000 syz-executor.1 79735 508114 56152 0 3 0x4000080 fsleep syz-executor.1 31419 180688 66759 0 3 0x80 nanoslp syz-executor.3 31419 263136 66759 0 3 0x4000080 fsleep syz-executor.3 31419 427477 66759 0 3 0x4000080 fsleep syz-executor.3 31419 133608 66759 0 3 0x4000080 fsleep syz-executor.3 24170 419205 5767 60928 2 0x10 syz-executor.2 24170 62595 5767 60928 3 0x4000090 fsleep syz-executor.2 97783 263789 0 0 3 0x14280 nfsidl nfsio 81298 64791 0 0 3 0x14280 nfsidl nfsio 20518 90493 0 0 3 0x14280 nfsidl nfsio 71623 123128 0 0 3 0x14280 nfsidl nfsio 4888 13535 0 0 3 0x14280 nfsidl nfsio 77559 231261 0 0 3 0x14280 nfsidl nfsio 90450 319719 0 0 3 0x14280 nfsidl nfsio 91471 112786 0 0 3 0x14280 nfsidl nfsio 87239 447269 0 0 3 0x14280 nfsidl nfsio 30684 232651 0 0 3 0x14280 nfsidl nfsio 44903 96081 0 0 3 0x14280 nfsidl nfsio 32882 334267 0 0 3 0x14280 nfsidl nfsio 14797 278660 0 0 3 0x14280 nfsidl nfsio 42025 241414 0 0 3 0x14280 nfsidl nfsio 38860 404745 0 0 3 0x14280 nfsidl nfsio 42246 117366 0 0 3 0x14280 nfsidl nfsio 99728 119962 0 0 3 0x14280 nfsidl nfsio 83925 30947 0 0 3 0x14280 nfsidl nfsio 9470 15742 0 0 3 0x14280 nfsidl nfsio 96270 193268 0 0 3 0x14280 nfsidl nfsio 21265 343288 9752 0 3 0x82 nanoslp syz-executor.7 9536 512970 0 0 3 0x14200 bored sosplice 71434 431411 9752 0 3 0x82 nanoslp syz-executor.6 86268 150011 9752 0 3 0x82 nanoslp syz-executor.5 74023 64321 9752 0 3 0x82 nanoslp syz-executor.4 5767 455372 9752 0 3 0x82 nanoslp syz-executor.2 56152 144013 9752 0 3 0x82 nanoslp syz-executor.1 92709 506111 9752 0 2 0x2 syz-executor.0 66759 120129 9752 0 3 0x82 nanoslp syz-executor.3 9752 146175 37683 0 3 0x82 thrsleep syz-fuzzer 9752 195809 37683 0 3 0x4000082 nanoslp syz-fuzzer 9752 298704 37683 0 3 0x4000082 thrsleep syz-fuzzer 9752 400197 37683 0 3 0x4000082 wait syz-fuzzer 9752 224314 37683 0 3 0x4000082 wait syz-fuzzer 9752 221849 37683 0 3 0x4000082 wait syz-fuzzer 9752 83673 37683 0 3 0x4000082 wait syz-fuzzer 9752 27724 37683 0 3 0x4000082 thrsleep syz-fuzzer 9752 383024 37683 0 3 0x4000082 thrsleep syz-fuzzer 9752 466399 37683 0 3 0x4000082 wait syz-fuzzer 9752 136106 37683 0 3 0x4000082 wait syz-fuzzer 9752 283330 37683 0 3 0x4000082 wait syz-fuzzer 9752 260142 37683 0 3 0x4000082 wait syz-fuzzer 9752 135225 37683 0 3 0x4000082 kqread syz-fuzzer 37683 506836 7032 0 3 0x10008a sigsusp ksh 7032 516740 5778 0 3 0x9a kqread sshd 26860 141494 1 0 3 0x100083 ttyin getty 5778 320499 1 0 3 0x88 kqread sshd 57109 77395 50803 73 3 0x1100090 kqread syslogd 50803 101344 1 0 3 0x100082 netio syslogd 32780 334216 1 0 3 0x100080 kqread resolvd 29746 38548 91345 77 3 0x100092 kqread dhcpleased 91990 76516 91345 77 3 0x100092 kqread dhcpleased 91345 10341 1 0 3 0x80 kqread dhcpleased 67135 485710 0 0 3 0x14200 bored smr 29734 402718 0 0 2 0x14200 zerothread 76500 462514 0 0 3 0x14200 aiodoned aiodoned 62699 362821 0 0 3 0x14200 syncer update 51400 506767 0 0 3 0x14200 cleaner cleaner 30796 471540 0 0 3 0x14200 reaper reaper 58912 388688 0 0 3 0x14200 pgdaemon pagedaemon 34632 270831 0 0 3 0x14200 bored viomb 4441 265130 0 0 3 0x40014200 acpi0 acpi0 10656 482058 0 0 3 0x14200 bored softnet 23807 246557 0 0 3 0x14200 bored softnet 33108 160514 0 0 3 0x14200 bored softnet 20808 242042 0 0 3 0x14200 bored softnet 7565 60685 0 0 3 0x14200 bored systqmp 95393 398044 0 0 3 0x14200 bored systq 97330 390186 0 0 3 0x40014200 bored softclock 11984 21546 0 0 3 0x40014200 idle0 1 33307 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 10185 6401K 6804K 78643K 11725 0 pcb 13 10K 12K 78643K 107 0 rtable 217 6K 6K 78643K 390 0 ifaddr 71 20K 20K 78643K 96 0 counters 29 17K 17K 78643K 36 0 ioctlops 0 0K 2K 78643K 35 0 iov 0 0K 12K 78643K 151 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1403 88K 88K 78643K 1511 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 5 0 VM map 2 0K 0K 78643K 2 0 sem 9 1K 1K 78643K 12 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 17 61K 77K 78643K 381 0 proc 56 58K 83K 78643K 505 0 subproc 104 6K 6K 78643K 117 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 3 0 in_multi 89 6K 6K 78643K 119 0 ether_multi 1 0K 0K 78643K 4 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 55 254K 254K 78643K 55 0 exec 0 0K 1K 78643K 378 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 300 79K 79K 78643K 3930 0 UVM aobj 131 4K 4K 78643K 134 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 6 0 NDP 11 0K 2K 78643K 33 0 temp 118 5764K 5828K 78643K 10117 0 kqueue 14 22K 26K 78643K 73 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 41 0 38 1 0 1 1 0 8 0 rtentry 112 126 0 26 4 0 4 4 0 8 0 unpcb 144 381 0 365 6 1 5 6 0 8 4 syncache 296 4 0 4 1 1 0 1 0 8 0 tcpqe 32 182 0 182 2 2 0 1 0 8 0 tcpcb 776 100 0 96 8 0 8 8 0 8 7 arp 88 20 0 4 1 0 1 1 0 8 0 inpcb 336 283 0 276 9 0 9 9 0 8 8 nd6 48 27 0 6 1 0 1 1 0 8 0 kcovpl 48 9 0 1 1 0 1 1 0 8 0 ppxss 1160 4 0 3 1 0 1 1 0 8 0 pppxif 1360 4 0 3 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 520 0 106 29 0 29 29 0 8 2 art_table 32 521 0 106 4 0 4 4 0 8 0 art_node 16 125 0 34 1 0 1 1 0 8 0 sysvmsgpl 40 100 0 83 1 0 1 1 0 8 0 semupl 112 4 0 4 1 1 0 1 0 8 0 semapl 112 7 0 0 1 0 1 1 0 8 0 shmpl 112 131 0 3 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1805 0 367 91 0 91 91 0 8 0 ffsino 240 1805 0 367 85 0 85 85 0 8 0 nchpl 144 2621 0 957 63 0 63 63 0 8 0 uvmvnodes 80 2137 0 0 44 0 44 44 0 8 0 vnodes 216 2137 0 0 119 0 119 119 0 8 0 namei 1024 9660 0 9656 4 2 2 2 0 8 1 kstatmem 264 30 0 8 2 0 2 2 0 8 0 scxspl 216 8388 0 8388 9 2 7 8 0 8 7 plimitpl 152 35 0 20 1 0 1 1 0 8 0 sigapl 424 691 0 626 8 0 8 8 0 8 0 futexpl 64 4297 0 4288 1 0 1 1 0 8 0 knotepl 120 10114 0 10032 11 1 10 10 0 8 5 kqueuepl 184 150 0 140 4 0 4 4 0 8 3 pipepl 288 259 0 231 7 2 5 7 0 8 2 fdescpl 432 654 0 626 4 0 4 4 0 8 0 filepl 120 4388 0 4077 15 2 13 15 0 8 3 lockfpl 104 133 0 131 1 0 1 1 0 8 0 lockfspl 48 30 0 28 1 0 1 1 0 8 0 sessionpl 144 24 0 8 1 0 1 1 0 8 0 pgrppl 48 24 0 8 1 0 1 1 0 8 0 ucredpl 104 337 0 325 1 0 1 1 0 8 0 zombiepl 144 626 0 626 1 0 1 1 0 8 1 processpl 1008 691 0 626 11 2 9 9 0 8 0 procpl 696 1158 0 1065 10 1 9 9 0 8 0 sosppl 168 3 0 3 1 1 0 1 0 8 0 sockpl 456 705 0 679 27 16 11 20 0 8 7 mcl64k 65536 17 0 17 1 0 1 1 0 8 1 mcl16k 16384 20 0 20 1 0 1 1 0 8 1 mcl12k 12288 5 0 5 1 0 1 1 0 8 1 mcl9k 9216 4 0 4 1 0 1 1 0 8 1 mcl8k 8192 23 0 23 2 1 1 1 0 8 1 mcl4k 4096 83 0 83 2 1 1 1 0 8 1 mcl2k2 2112 2 0 2 1 0 1 1 0 8 1 mcl2k 2048 74230 0 74161 47 36 11 36 0 8 1 mtagpl 96 146 0 75 3 1 2 2 0 8 0 mbufpl 256 134558 0 134222 136 104 32 86 0 8 8 bufpl 288 4379 0 138 303 0 303 303 0 8 0 anonpl 24 172196 0 156152 101 1 100 101 0 188 0 amapchunkpl 152 11136 0 10405 31 1 30 30 0 158 1 amappl16 200 2921 0 2377 31 1 30 30 0 8 1 amappl15 192 25 0 22 1 0 1 1 0 8 0 amappl14 184 150 0 139 2 0 2 2 0 8 0 amappl13 176 9 0 9 1 1 0 1 0 8 0 amappl12 168 415 0 413 1 0 1 1 0 8 0 amappl11 160 42 0 32 1 0 1 1 0 8 0 amappl10 152 30 0 20 1 0 1 1 0 8 0 amappl9 144 956 0 954 1 0 1 1 0 8 0 amappl8 136 121 0 78 2 0 2 2 0 8 0 amappl7 128 129 0 111 2 0 2 2 0 8 0 amappl6 120 149 0 139 1 0 1 1 0 8 0 amappl5 112 120 0 114 1 0 1 1 0 8 0 amappl4 104 477 0 453 2 1 1 2 0 8 0 amappl3 96 1298 0 1240 2 0 2 2 0 8 0 amappl2 88 989 0 919 3 1 2 3 0 8 0 amappl1 80 16892 0 16127 23 6 17 22 0 8 0 amappl 88 3439 0 3250 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 133 0 3 3 0 3 3 0 8 0 uaddrrnd 24 654 0 626 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 654 0 626 1 0 1 1 0 8 0 vmmpekpl 168 10827 0 10777 3 0 3 3 0 8 0 vmmpepl 168 69680 0 66907 131 3 128 131 0 357 3 vmsppl 272 653 0 626 4 2 2 3 0 8 0 rwobjpl 24 22392 0 18446 24 0 24 24 0 8 0 pdppl 4096 1314 0 1252 104 40 64 70 0 8 2 pvpl 32 397590 0 376011 270 13 257 270 0 265 80 pmappl 216 653 0 626 2 0 2 2 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 833 0 190 20 0 20 20 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(ffffffff82738384) at panic+0x161 sys/kern/subr_prf.c:198 ufs_rename(ffff80002e91ca48) at ufs_rename+0x1649 sys/ufs/ufs/ufs_vnops.c:909 VOP_RENAME(fffffd807efd0360,fffffd8067d2d6c8,ffff80002e91cc18,fffffd80724b46c0,fffffd8067d2d7a0,ffff80002e91cb68) at VOP_RENAME+0xf0 sys/kern/vfs_vops.c:370 dorenameat(ffff800029a3ab10,4,20000180,6,200001c0) at dorenameat+0x29c sys/kern/vfs_syscalls.c:3033 syscall(ffff80002e91cdb0) at syscall+0x4e6 sys/arch/amd64/amd64/trap.c:626 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xdb189c51400, 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(ffffffff82738384) at panic+0x161 sys/kern/subr_prf.c:198 ufs_rename(ffff80002e91ca48) at ufs_rename+0x1649 sys/ufs/ufs/ufs_vnops.c:909 VOP_RENAME(fffffd807efd0360,fffffd8067d2d6c8,ffff80002e91cc18,fffffd80724b46c0,fffffd8067d2d7a0,ffff80002e91cb68) at VOP_RENAME+0xf0 sys/kern/vfs_vops.c:370 dorenameat(ffff800029a3ab10,4,20000180,6,200001c0) at dorenameat+0x29c sys/kern/vfs_syscalls.c:3033 syscall(ffff80002e91cdb0) at syscall+0x4e6 sys/arch/amd64/amd64/trap.c:626 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xdb189c51400, count: -7