panic: bad dir Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *290884 94038 0 0x1000 0x4080000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82ffbc04) at panic+0x1cf sys/kern/subr_prf.c:198 ufs_dirbadentry(ffff800037618e58,ffff800037618e58,9677aaba3ee97ee4) at ufs_dirbadentry VOP_LOOKUP(fffffd8061a06528,ffff8000376191f8,ffff800037619228) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 vfs_lookup(ffff8000376191c8) at vfs_lookup+0x8e1 sys/kern/vfs_lookup.c:566 namei(ffff8000376191c8) at namei+0x7aa sys/kern/vfs_lookup.c:250 vn_open(ffff8000376191c8,9,0) at vn_open+0x13f sys/kern/vfs_vnops.c:140 doopenat(ffff80002a560548,ffffff9c,20000000,8,0,ffff800037619370) at doopenat+0x31d sys/kern/vfs_syscalls.c:1123 syscall(ffff800037619420) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xe102759f890, count: 5 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: bad dir ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82ffbc04) at panic+0x1cf sys/kern/subr_prf.c:198 ufs_dirbadentry(ffff800037618e58,ffff800037618e58,9677aaba3ee97ee4) at ufs_dirbadentry VOP_LOOKUP(fffffd8061a06528,ffff8000376191f8,ffff800037619228) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 vfs_lookup(ffff8000376191c8) at vfs_lookup+0x8e1 sys/kern/vfs_lookup.c:566 namei(ffff8000376191c8) at namei+0x7aa sys/kern/vfs_lookup.c:250 vn_open(ffff8000376191c8,9,0) at vn_open+0x13f sys/kern/vfs_vnops.c:140 doopenat(ffff80002a560548,ffffff9c,20000000,8,0,ffff800037619370) at doopenat+0x31d sys/kern/vfs_syscalls.c:1123 syscall(ffff800037619420) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xe102759f890, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800037618c90 rbx 0xffff800022612000 rdx 0 rcx 0 rax 0xffff80002a560548 r8 0x101010101010101 r9 0x8080808080808080 r10 0x772da8758d4cfce2 r11 0x51ef4852c8b5d75d r12 0 r13 0xfffffd806e02e880 r14 0 r15 0x1 rip 0xffffffff816016a5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff800037618c80 ss 0 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=290884 pid=94038 tcnt=2 stat=onproc flags process=1000 proc=4080000 runpri=17, usrpri=50, slppri=17, nice=20 wchan=0x0, wmesg=, ps_single=0xffff80002a561478 scnt=1 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a561478,0xffff80003766a2c0 process=0xffff8000339f8018 user=0xffff800037614000, vmspace=0xfffffd806c1829b8 estcpu=36, cpticks=0, pctcpu=0.0, user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 75182 17408 146 0 3 0x2 biowait syz-executor 94038 171536 50605 0 3 0x3000 suspend syz-executor *94038 290884 50605 0 7 0x4081000 syz-executor 26858 354032 0 0 3 0x14280 nfsidl nfsio 22018 251966 0 0 3 0x14280 nfsidl nfsio 83202 255529 0 0 3 0x14280 nfsidl nfsio 59874 19035 0 0 3 0x14280 nfsidl nfsio 66991 88212 0 0 3 0x14280 nfsidl nfsio 34011 18172 0 0 3 0x14280 nfsidl nfsio 31338 192474 0 0 3 0x14280 nfsidl nfsio 52972 120543 0 0 3 0x14280 nfsidl nfsio 66517 54534 0 0 3 0x14280 nfsidl nfsio 42792 48315 0 0 3 0x14280 nfsidl nfsio 54613 5325 0 0 3 0x14280 nfsidl nfsio 13902 41415 0 0 3 0x14280 nfsidl nfsio 29765 32743 0 0 3 0x14280 nfsidl nfsio 658 439949 0 0 3 0x14280 nfsidl nfsio 91526 263278 0 0 3 0x14280 nfsidl nfsio 46574 317091 0 0 3 0x14280 nfsidl nfsio 26024 398978 0 0 3 0x14280 nfsidl nfsio 40373 293217 0 0 3 0x14280 nfsidl nfsio 14639 520367 0 0 3 0x14280 nfsidl nfsio 87411 512261 0 0 3 0x14280 nfsidl nfsio 50605 172633 146 0 2 0x482 syz-executor 27265 38904 0 0 3 0x14200 bored sosplice 38967 294100 1 0 3 0x100083 ttyin getty 90782 293652 146 0 3 0x2 biowait syz-executor 146 139756 20605 0 2 0x2 syz-executor 20605 309866 93188 0 3 0x10008a sigsusp ksh 93188 104132 8668 0 3 0x98 kqread sshd-session 8668 460276 12452 0 3 0x92 kqread sshd-session 12452 154393 1 0 3 0x88 kqread sshd 86445 260929 51640 73 2 0x1100010 syslogd 51640 267647 1 0 3 0x100082 sbwait syslogd 15480 22698 1 0 3 0x100080 kqread resolvd 19689 128287 53127 77 3 0x100092 kqread dhcpleased 79870 301708 53127 77 3 0x100092 kqread dhcpleased 53127 38439 1 0 3 0x80 kqread dhcpleased 67132 132990 0 0 3 0x14200 bored smr 64411 417548 0 0 2 0x14200 zerothread 50182 504604 0 0 3 0x14200 aiodoned aiodoned 83024 235728 0 0 3 0x14200 syncer update 22961 147282 0 0 3 0x14200 cleaner cleaner 67770 516523 0 0 3 0x14200 reaper reaper 57727 293809 0 0 3 0x14200 pgdaemon pagedaemon 20966 16652 0 0 3 0x14200 bored viomb 54065 368600 0 0 3 0x40014200 acpi0 acpi0 34252 262515 0 0 3 0x14200 bored softnet3 55794 66350 0 0 3 0x14200 bored softnet2 57828 318762 0 0 3 0x14200 bored softnet1 16576 309572 0 0 3 0x14200 bored softnet0 14753 274438 0 0 3 0x14200 bored systqmp 73995 323620 0 0 3 0x14200 bored systq 95041 306966 0 0 2 0x40014200 softclock 50347 408219 0 0 3 0x40014200 idle0 1 380714 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 10210 11112K 11343K 166960K 12774 0 pcb 17 13K 14K 166960K 151 0 rtable 199 7K 9K 166960K 489 0 pf 33 13K 269K 166960K 82 0 ifaddr 37 6K 7K 166960K 71 0 ifgroup 50 2K 2K 166960K 96 0 sysctl 2 0K 0K 166960K 2 0 counters 30 17K 17K 166960K 44 0 ioctlops 0 0K 4K 166960K 88 0 iov 0 0K 16K 166960K 57 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1498 94K 94K 166960K 2323 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 18 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 25 0 dirhash 12 2K 3K 166960K 21 0 ACPI 1690 195K 286K 166960K 12468 0 file desc 11 34K 97K 166960K 776 0 sigio 0 0K 0K 166960K 21 0 proc 60 59K 116K 166960K 602 0 subproc 91 5K 6K 166960K 132 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 109 0 in_multi 81 6K 7K 166960K 164 0 ether_multi 1 0K 0K 166960K 1 0 mrt 1 0K 0K 166960K 3 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 235 1049K 1049K 166960K 235 0 exec 0 0K 1K 166960K 480 0 fusefs mount 1 32K 32K 166960K 1 0 pfkey data 0 0K 0K 166960K 1 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 167 62K 86K 166960K 8829 0 UVM aobj 22 2K 2K 166960K 25 0 pinsyscall 32 64K 96K 166960K 1847 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 1K 166960K 34 0 NDP 11 0K 2K 166960K 49 0 temp 70 6815K 6888K 166960K 19497 0 kqueue 13 20K 28K 166960K 136 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 125 0 122 2 0 2 2 0 8 1 rtentry 112 147 0 59 4 0 4 4 0 8 0 unpcb 144 471 0 456 3 0 3 3 0 8 2 syncache 336 3 0 3 1 1 0 1 0 8 0 tcpcb 808 173 0 169 2 1 1 2 0 8 0 arp 88 23 0 6 1 0 1 1 0 8 0 ipq 40 2 0 1 1 0 1 1 0 8 0 ipqe 40 37 0 34 1 0 1 1 0 8 0 inpcb 336 959 0 952 13 6 7 7 0 8 6 nd6 104 36 0 14 1 0 1 1 0 8 0 pkpcb 40 5 0 5 2 1 1 1 0 8 1 kcovpl 48 10 0 3 1 0 1 1 0 8 0 ppxss 1072 7 0 7 2 1 1 1 0 8 1 pfrktable 1344 1 0 0 1 0 1 1 0 8 0 pfanchor 1288 1 0 0 1 0 1 1 0 8 0 pftag 88 3 0 0 1 0 1 1 0 8 0 pfrule 1344 6 0 4 1 0 1 1 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 672 0 286 31 1 30 31 0 8 5 art_table 32 674 0 286 4 0 4 4 0 8 0 art_node 16 145 0 66 1 0 1 1 0 8 0 sysvmsgpl 40 1 0 1 1 1 0 1 0 8 0 semapl 112 22 0 12 1 0 1 1 0 8 0 shmpl 112 22 0 3 1 0 1 1 0 8 0 dirhash 1024 23 0 6 3 0 3 3 0 8 0 dino2pl 256 2901 0 1402 95 0 95 95 0 8 0 ffsino 240 2901 0 1402 89 0 89 89 0 8 0 nchpl 144 3999 0 2321 63 0 63 63 0 8 0 uvmvnodes 80 3583 0 0 74 0 74 74 0 8 0 vnodes 216 3583 0 0 200 0 200 200 0 8 0 namei 1024 14380 0 14377 2 1 1 2 0 8 0 kstatmem 264 50 0 28 2 0 2 2 0 8 0 scsiplug 72 3 0 3 1 0 1 1 0 8 1 scxspl 216 11113 0 11111 9 7 2 8 1 8 1 plimitpl 152 250 0 233 1 0 1 1 0 8 0 sigapl 424 1073 0 1013 9 1 8 8 0 8 0 futexpl 64 10069 0 10069 1 0 1 1 0 8 1 knotepl 120 26819 0 26774 29 19 10 16 0 8 8 kqueuepl 184 345 0 336 6 2 4 4 0 8 3 pipepl 288 222 0 195 5 2 3 5 0 8 0 fdescpl 432 1034 0 1011 5 1 4 5 0 8 0 filepl 120 7215 0 6998 17 4 13 13 0 8 4 lockfpl 104 284 0 282 1 0 1 1 0 8 0 lockfspl 48 84 0 82 1 0 1 1 0 8 0 sessionpl 144 24 0 16 1 0 1 1 0 8 0 pgrppl 48 45 0 29 1 0 1 1 0 8 0 ucredpl 104 1493 0 1481 1 0 1 1 0 8 0 zombiepl 144 1272 0 1266 1 0 1 1 0 8 0 processpl 1096 1073 0 1013 5 0 5 5 0 8 0 procpl 648 2115 0 2054 8 0 8 8 0 8 0 sosppl 168 4 0 4 2 1 1 1 0 8 1 sockpl 504 1574 0 1549 23 11 12 13 0 8 8 mcl64k 65536 13 0 13 2 1 1 1 0 8 1 mcl8k 8192 79 0 79 2 1 1 1 0 8 1 mcl4k 4096 3455 0 3400 17 9 8 16 0 8 0 mcl2k 2048 876 0 873 2 0 2 2 0 8 1 mtagpl 96 15 0 14 1 0 1 1 0 8 0 mbufpl 256 11940 0 11854 23 3 20 23 0 8 8 bufpl 280 4401 0 103 307 0 307 307 0 8 0 anonpl 24 205945 0 203167 46 1 45 45 0 187 22 amapchunkpl 152 28761 0 28455 39 7 32 32 0 158 11 amappl16 200 5171 0 5149 17 5 12 15 0 8 8 amappl15 192 33 0 33 1 1 0 1 0 8 0 amappl14 184 155 0 145 1 0 1 1 0 8 0 amappl13 176 6 0 6 1 1 0 1 0 8 0 amappl12 168 1677 0 1655 3 1 2 3 0 8 0 amappl11 160 49 0 39 1 0 1 1 0 8 0 amappl10 152 10 0 10 2 1 1 1 0 8 1 amappl9 144 159 0 159 1 1 0 1 0 8 0 amappl8 136 23 0 21 1 0 1 1 0 8 0 amappl7 128 99 0 89 1 0 1 1 0 8 0 amappl6 120 180 0 179 1 0 1 1 0 8 0 amappl5 112 141 0 132 1 0 1 1 0 8 0 amappl4 104 299 0 282 1 0 1 1 0 8 0 amappl3 96 5263 0 5204 3 0 3 3 0 8 0 amappl2 88 1305 0 1234 2 0 2 2 0 8 0 amappl1 80 9324 0 8826 13 1 12 13 0 8 0 amappl 88 8391 0 8277 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 8 0 8 2 1 1 1 0 8 1 dma128 128 255 0 255 2 1 1 1 0 8 1 dma64 64 8 0 8 2 1 1 1 0 8 1 dma32 32 8 0 8 2 1 1 1 0 8 1 dma16 16 18 0 17 1 0 1 1 0 8 0 aobjpl 72 24 0 3 1 0 1 1 0 8 0 uaddrrnd 24 1034 0 1011 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1034 0 1011 1 0 1 1 0 8 0 vmmpekpl 168 9423 0 9383 3 0 3 3 0 8 0 vmmpepl 168 70308 0 68916 90 1 89 89 0 357 9 vmsppl 352 1033 0 1011 4 1 3 4 0 8 0 rwobjpl 24 25890 0 21505 27 0 27 27 0 8 0 pdppl 4096 2075 0 2022 107 40 67 83 0 8 14 pvpl 32 476612 0 469666 120 8 112 112 0 265 34 pmappl 216 1033 0 1011 3 0 3 3 0 8 0 extentpl 40 55 0 38 1 0 1 1 0 8 0 phpool 112 423 0 79 11 0 11 11 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(ffffffff82ffbc04) at panic+0x1cf sys/kern/subr_prf.c:198 ufs_dirbadentry(ffff800037618e58,ffff800037618e58,9677aaba3ee97ee4) at ufs_dirbadentry VOP_LOOKUP(fffffd8061a06528,ffff8000376191f8,ffff800037619228) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 vfs_lookup(ffff8000376191c8) at vfs_lookup+0x8e1 sys/kern/vfs_lookup.c:566 namei(ffff8000376191c8) at namei+0x7aa sys/kern/vfs_lookup.c:250 vn_open(ffff8000376191c8,9,0) at vn_open+0x13f sys/kern/vfs_vnops.c:140 doopenat(ffff80002a560548,ffffff9c,20000000,8,0,ffff800037619370) at doopenat+0x31d sys/kern/vfs_syscalls.c:1123 syscall(ffff800037619420) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xe102759f890, count: -10 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82ffbc04) at panic+0x1cf sys/kern/subr_prf.c:198 ufs_dirbadentry(ffff800037618e58,ffff800037618e58,9677aaba3ee97ee4) at ufs_dirbadentry VOP_LOOKUP(fffffd8061a06528,ffff8000376191f8,ffff800037619228) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 vfs_lookup(ffff8000376191c8) at vfs_lookup+0x8e1 sys/kern/vfs_lookup.c:566 namei(ffff8000376191c8) at namei+0x7aa sys/kern/vfs_lookup.c:250 vn_open(ffff8000376191c8,9,0) at vn_open+0x13f sys/kern/vfs_vnops.c:140 doopenat(ffff80002a560548,ffffff9c,20000000,8,0,ffff800037619370) at doopenat+0x31d sys/kern/vfs_syscalls.c:1123 syscall(ffff800037619420) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xe102759f890, count: -10