panic: bad dir Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 162878 42779 0 0 0 0 syz-executor *372891 45986 0 0 0x4000000 1K syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8337aa36) at panic+0x1e5 sys/kern/subr_prf.c:198 ufs_dirbadentry(ffff80002ebe5c98,ffff80002ebe5c98,739360d4c72af85c) at ufs_dirbadentry VOP_LOOKUP(fffffd8009ed7798,ffff80002ebe5e68,ffff80002ebe5e98) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 vfs_lookup(ffff80002ebe5e38) at vfs_lookup+0x8fa sys/kern/vfs_lookup.c:566 namei(ffff80002ebe5e38) at namei+0x7aa sys/kern/vfs_lookup.c:250 dorenameat(ffff80003c412a70,ffffff9c,200000000080,ffffff9c,2000000000c0) at dorenameat+0x145 sys/kern/vfs_syscalls.c:3008 syscall(ffff80002ebe60e0) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002ebe60e0) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xbd448b1610, count: 6 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{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic *cpu1: bad dir ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8337aa36) at panic+0x1e5 sys/kern/subr_prf.c:198 ufs_dirbadentry(ffff80002ebe5c98,ffff80002ebe5c98,739360d4c72af85c) at ufs_dirbadentry VOP_LOOKUP(fffffd8009ed7798,ffff80002ebe5e68,ffff80002ebe5e98) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 vfs_lookup(ffff80002ebe5e38) at vfs_lookup+0x8fa sys/kern/vfs_lookup.c:566 namei(ffff80002ebe5e38) at namei+0x7aa sys/kern/vfs_lookup.c:250 dorenameat(ffff80003c412a70,ffffff9c,200000000080,ffffff9c,2000000000c0) at dorenameat+0x145 sys/kern/vfs_syscalls.c:3008 syscall(ffff80002ebe60e0) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002ebe60e0) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xbd448b1610, count: -9 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff80002ebe5ac0 rbx 0xffff8000299eedcf rdx 0xffff80000145c780 rcx 0xffff80003c412a70 rax 0xffff8000299edff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0xf43253b4d872d98c r11 0x858877c833fc8e86 r12 0xffff8000299eebd0 r13 0 r14 0 r15 0x1 rip 0xffffffff83262b95 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002ebe5ab0 ss 0 db_enter+0x25: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor) tid=372891 pid=45986 tcnt=2 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=0xffff80002a2907d0,0xffff80002a2914b0 process=0xffff8000fffe8970 user=0xffff80002ebe1000, vmspace=0xfffffd8066722b68 estcpu=33, cpticks=2, pctcpu=0.0, user=0, sys=2, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 49825 142729 69856 0 2 0 syz-executor 27474 518279 97190 0 2 0 syz-executor 27474 496044 97190 0 3 0x4000000 biowait syz-executor 88288 98218 96762 0 2 0 syz-executor 88288 509350 96762 0 3 0x4000080 fsleep syz-executor 88288 302396 96762 0 3 0x4000080 fsleep syz-executor 31749 18199 87519 0 2 0 syz-executor 31749 5140 87519 0 2 0x4000000 syz-executor 42779 162878 41763 0 7 0 syz-executor 42779 221150 41763 0 3 0x4000000 biowait syz-executor 49112 411390 773 0 2 0 syz-executor 49112 97365 773 0 3 0x4000080 fsleep syz-executor 45986 390449 52327 0 2 0 syz-executor *45986 372891 52327 0 7 0x4000000 syz-executor 88274 149604 1 0 3 0x82 nanoslp getty 69856 439763 93171 0 3 0x82 nanoslp syz-executor 96075 59902 0 0 3 0x14200 acct acct 70198 370742 0 0 3 0x14200 bored sosplice 87519 370544 93171 0 3 0x82 nanoslp syz-executor 63893 497483 93171 0 3 0x82 piperd syz-executor 97190 277923 93171 0 3 0x82 nanoslp syz-executor 96762 202296 93171 0 3 0x82 nanoslp syz-executor 41763 35244 93171 0 3 0x82 nanoslp syz-executor 773 513845 93171 0 3 0x82 nanoslp syz-executor 52327 33727 93171 0 3 0x82 nanoslp syz-executor 93171 342304 74853 0 2 0x2 syz-executor 74853 180075 69974 0 3 0x10008a sigsusp ksh 69974 73930 75804 0 3 0x98 kqread sshd-session 75804 447812 95887 0 3 0x92 kqread sshd-session 95887 254846 1 0 3 0x88 kqread sshd 11398 476293 31728 74 3 0x1100092 bpf pflogd 31728 498335 1 0 3 0x80 sbwait pflogd 58949 498370 99258 73 3 0x1100090 kqread syslogd 99258 413721 1 0 3 0x100082 sbwait syslogd 96017 87855 1 0 3 0x100080 kqread resolvd 41395 44017 18328 77 3 0x100092 kqread dhcpleased 99200 31228 18328 77 3 0x100092 kqread dhcpleased 18328 520377 1 0 3 0x80 kqread dhcpleased 44873 90035 0 0 3 0x14200 bored smr 34461 286750 0 0 2 0x14200 zerothread 82551 144929 0 0 3 0x14200 aiodoned aiodoned 22587 456 0 0 3 0x14200 syncer update 45953 103111 0 0 3 0x14200 cleaner cleaner 26057 418750 0 0 3 0x14200 reaper reaper 69406 185071 0 0 3 0x14200 pgdaemon pagedaemon 35419 335776 0 0 3 0x14200 bored viomb 80614 310066 0 0 3 0x40014200 acpi0 acpi0 24053 336835 0 0 3 0x40014200 idle1 97295 233396 0 0 3 0x14200 bored softnet3 74081 76513 0 0 3 0x14200 bored softnet2 24735 361871 0 0 3 0x14200 bored softnet1 62628 480216 0 0 3 0x14200 bored softnet0 64085 272923 0 0 3 0x14200 bored systqmp 12725 430595 0 0 3 0x14200 bored systq 17666 272352 0 0 3 0x14200 tmoslp softclockmp 93819 75954 0 0 3 0x40014200 tmoslp softclock 37734 451817 0 0 3 0x40014200 idle0 1 300561 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 27474 (syz-executor) thread 0xffff80003c4134b0 (496044) Process 42779 (syz-executor) thread 0xffff80003c4139d0 (221150) Process 45986 (syz-executor) thread 0xffff80003c412a70 (372891) ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10198 11083K 12322K 166960K 12767 0 pcb 18 12K 12K 166960K 117 0 rtable 205 7K 8K 166960K 452 0 pf 36 18K 22K 166960K 106 0 ifaddr 38 6K 8K 166960K 71 0 ifgroup 56 2K 3K 166960K 118 0 sysctl 4 1K 1K 166960K 4 0 counters 62 36K 37K 166960K 110 0 ioctlops 0 0K 4K 166960K 1585 0 iov 0 0K 16K 166960K 39 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1491 94K 94K 166960K 2125 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 12 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 20 0 dirhash 12 2K 2K 166960K 21 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 17 61K 89K 166960K 755 0 sigio 0 0K 0K 166960K 14 0 proc 72 91K 128K 166960K 651 0 subproc 72 4K 4K 166960K 83 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 59 0 in_multi 85 6K 7K 166960K 128 0 ether_multi 1 0K 0K 166960K 3 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 97 440K 440K 166960K 97 0 exec 0 0K 1K 166960K 569 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 225 160K 168K 166960K 8797 0 UVM aobj 17 5K 5K 166960K 20 0 pinsyscall 42 84K 103K 166960K 1893 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 29 0 NDP 11 0K 1K 166960K 46 0 temp 76 8691K 8757K 166960K 19976 0 kqueue 13 20K 28K 166960K 130 0 SYN cache 2 16K 16K 166960K 2 0 ddb{1}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle plcache 128 26 0 0 1 0 1 1 0 8 0 rtpcb 120 109 0 106 2 1 1 2 0 8 0 rtentry 176 139 0 47 6 0 6 6 0 8 0 unpcb 144 443 0 426 6 5 1 4 0 8 0 syncache 336 3 0 3 1 1 0 1 0 8 0 tcpcb 808 256 0 252 8 7 1 8 0 8 0 arp 128 22 0 5 1 0 1 1 0 8 0 inpcb 384 730 0 722 9 7 2 8 0 8 0 nd6 144 29 0 7 1 0 1 1 0 8 0 pkpcb 40 4 0 4 3 2 1 1 0 8 1 kcovpl 48 9 0 1 1 0 1 1 0 8 0 ppxss 1192 14 0 14 2 1 1 1 0 8 1 pppxif 1504 5 0 5 1 0 1 1 0 8 1 pfstscr 40 1 0 1 1 0 1 1 0 8 1 pffrag 232 2 0 1 2 1 1 1 0 482 0 pffrnode 88 2 0 1 2 1 1 1 0 8 0 pffrent 40 33 0 32 2 1 1 1 0 8 0 pfosfp 40 1428 0 1005 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfrktable 1344 1 0 1 1 0 1 1 0 8 1 pfanchor 1288 2 0 0 1 0 1 1 0 8 0 pftag 88 3 0 2 2 1 1 1 0 8 0 pfstitem 24 47 0 18 1 0 1 1 0 8 0 pfstkey 128 49 0 20 2 0 2 2 0 8 0 pfstate 384 47 0 18 5 0 5 5 0 8 0 pfrule 1344 27 0 20 2 1 1 2 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 543 0 171 29 1 28 29 0 8 2 art_table 32 545 0 171 4 0 4 4 0 8 0 art_node 16 135 0 54 1 0 1 1 0 8 0 sysvmsgpl 40 13 0 9 1 0 1 1 0 8 0 semupl 112 1 0 1 1 0 1 1 0 8 1 semapl 112 16 0 6 1 0 1 1 0 8 0 shmpl 112 17 0 3 1 0 1 1 0 8 0 dirhash 1024 23 0 6 3 0 3 3 0 8 0 dino2pl 256 2768 0 1258 95 0 95 95 0 8 0 ffsino 288 2768 0 1258 109 0 109 109 0 8 0 nchpl 144 3810 0 2119 64 0 64 64 0 8 0 rtmask 32 1 0 1 1 1 0 1 0 8 0 uvmvnodes 80 3343 0 0 69 0 69 69 0 8 0 vnodes 216 3343 0 0 186 0 186 186 0 8 0 namei 1024 12704 0 12700 3 2 1 1 0 8 0 percpumem 16 70 0 24 1 0 1 1 0 8 0 kstatmem 264 56 0 34 2 0 2 2 0 8 0 scsiplug 72 3 0 3 3 3 0 1 0 8 0 scxspl 216 12176 0 12174 9 8 1 8 1 8 0 plimitpl 152 213 0 195 1 0 1 1 0 8 0 sigapl 424 1063 0 1012 8 2 6 7 0 8 0 futexpl 64 9433 0 9430 1 0 1 1 0 8 0 knotepl 120 556 0 0 17 0 17 17 0 8 0 kqueuepl 224 277 0 268 6 5 1 5 0 8 0 pipepl 336 244 0 216 8 5 3 8 0 8 0 fdescpl 520 1043 0 1012 3 0 3 3 0 8 0 filepl 160 5900 0 5681 23 11 12 18 0 8 0 lockfpl 104 187 0 184 1 0 1 1 0 8 0 lockfspl 48 74 0 71 1 0 1 1 0 8 0 sessionpl 144 23 0 15 1 0 1 1 0 8 0 pgrppl 48 38 0 22 1 0 1 1 0 8 0 ucredpl 104 784 0 771 1 0 1 1 0 8 0 zombiepl 144 1151 0 1151 1 0 1 1 0 8 1 processpl 1192 1063 0 1012 5 0 5 5 0 8 0 procpl 656 2168 0 2110 8 1 7 7 0 8 1 srpgc 96 5 0 5 3 2 1 1 0 8 1 sosppl 168 3 0 3 2 2 0 1 0 8 0 sockpl 728 1300 0 1272 14 10 4 10 0 8 0 mcl64k 65536 5 0 0 1 0 1 1 0 8 0 mcl16k 16384 3 0 0 1 0 1 1 0 8 0 mcl12k 12288 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 117 0 0 15 0 15 15 0 8 0 mcl2k 2048 21 0 0 3 0 3 3 0 8 0 mtagpl 96 129 0 0 4 0 4 4 0 8 0 mbufpl 256 278 0 0 18 0 18 18 0 8 0 bufpl 280 3575 0 131 246 0 246 246 0 8 0 anonpl 32 8503 0 0 69 0 69 69 0 246 0 amapchunkpl 152 27652 0 27203 34 9 25 28 0 158 3 amappl16 200 3183 0 3151 31 25 6 15 0 8 3 amappl15 192 5 0 5 1 1 0 1 0 8 0 amappl14 184 132 0 120 1 0 1 1 0 8 0 amappl13 176 2 0 2 1 1 0 1 0 8 0 amappl12 168 1715 0 1685 3 1 2 2 0 8 0 amappl11 160 52 0 38 1 0 1 1 0 8 0 amappl10 152 5 0 5 1 1 0 1 0 8 0 amappl9 144 248 0 248 1 1 0 1 0 8 0 amappl8 136 33 0 30 1 0 1 1 0 8 0 amappl7 128 108 0 96 1 0 1 1 0 8 0 amappl6 120 186 0 182 1 0 1 1 0 8 0 amappl5 112 133 0 123 1 0 1 1 0 8 0 amappl4 104 335 0 311 1 0 1 1 0 8 0 amappl3 96 5567 0 5466 5 1 4 4 0 8 0 amappl2 88 658 0 595 2 0 2 2 0 8 0 amappl1 80 10819 0 10217 15 2 13 15 0 8 0 amappl 88 7970 0 7817 5 0 5 5 0 92 0 dma65536 65536 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 9 0 9 3 2 1 1 0 8 1 dma128 128 254 0 254 2 2 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 19 0 3 1 0 1 1 0 8 0 uaddrrnd 24 1043 0 1012 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1043 0 1012 1 0 1 1 0 8 0 vmmpekpl 168 10245 0 10202 3 0 3 3 0 8 0 vmmpepl 168 71155 0 69200 108 14 94 100 0 357 2 vmsppl 480 1042 0 1012 6 1 5 5 0 8 0 rwobjpl 72 23913 0 19638 80 0 80 80 0 8 0 pdppl 4096 2094 0 2024 102 30 72 84 0 8 2 pvpl 32 16203 0 0 131 0 131 131 0 265 0 pmappl 256 1042 0 1012 3 0 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 408 0 50 11 0 11 11 0 8 0 ddb{1}> machine ddbcpu 0 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp x86_ipi_db(ffffffff8382fff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:394 x86_ipi_handler() at x86_ipi_handler+0xd9 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 __mp_lock(ffffffff838daf30) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:113 [inline] __mp_lock(ffffffff838daf30) at __mp_lock+0x192 sys/kern/kern_lock.c:144 intr_handler(ffff80002a2b9460,ffff800000079f00) at intr_handler+0xe1 sys/arch/amd64/amd64/intr.c:559 Xintr_ioapic_edge23_untramp() at Xintr_ioapic_edge23_untramp+0x18f end of kernel end trace frame: 0x73e9e8de0ee0, count: 9 ddb{0}> trace x86_ipi_db(ffffffff8382fff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:394 x86_ipi_handler() at x86_ipi_handler+0xd9 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 __mp_lock(ffffffff838daf30) at __mp_lock+0x192 __mp_lock_spin sys/kern/kern_lock.c:113 [inline] __mp_lock(ffffffff838daf30) at __mp_lock+0x192 sys/kern/kern_lock.c:144 intr_handler(ffff80002a2b9460,ffff800000079f00) at intr_handler+0xe1 sys/arch/amd64/amd64/intr.c:559 Xintr_ioapic_edge23_untramp() at Xintr_ioapic_edge23_untramp+0x18f end of kernel end trace frame: 0x73e9e8de0ee0, count: -6 ddb{0}> machine ddbcpu 1 Stopped at db_enter+0x25: addq $0x8,%rsp db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8337aa36) at panic+0x1e5 sys/kern/subr_prf.c:198 ufs_dirbadentry(ffff80002ebe5c98,ffff80002ebe5c98,739360d4c72af85c) at ufs_dirbadentry VOP_LOOKUP(fffffd8009ed7798,ffff80002ebe5e68,ffff80002ebe5e98) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 vfs_lookup(ffff80002ebe5e38) at vfs_lookup+0x8fa sys/kern/vfs_lookup.c:566 namei(ffff80002ebe5e38) at namei+0x7aa sys/kern/vfs_lookup.c:250 dorenameat(ffff80003c412a70,ffffff9c,200000000080,ffffff9c,2000000000c0) at dorenameat+0x145 sys/kern/vfs_syscalls.c:3008 syscall(ffff80002ebe60e0) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002ebe60e0) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xbd448b1610, count: 6 ddb{1}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8337aa36) at panic+0x1e5 sys/kern/subr_prf.c:198 ufs_dirbadentry(ffff80002ebe5c98,ffff80002ebe5c98,739360d4c72af85c) at ufs_dirbadentry VOP_LOOKUP(fffffd8009ed7798,ffff80002ebe5e68,ffff80002ebe5e98) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 vfs_lookup(ffff80002ebe5e38) at vfs_lookup+0x8fa sys/kern/vfs_lookup.c:566 namei(ffff80002ebe5e38) at namei+0x7aa sys/kern/vfs_lookup.c:250 dorenameat(ffff80003c412a70,ffffff9c,200000000080,ffffff9c,2000000000c0) at dorenameat+0x145 sys/kern/vfs_syscalls.c:3008 syscall(ffff80002ebe60e0) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002ebe60e0) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xbd448b1610, count: -9