panic: bad dir Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 51983 84233 0 0x2000 0x4000000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff833833e8) at panic+0x1cf sys/kern/subr_prf.c:198 ufs_lookup() at ufs_lookup+0x1eca VOP_LOOKUP(fffffd80679736d0,ffff80003c9478f8,ffff80003c947928) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 vfs_lookup(ffff80003c9478c8) at vfs_lookup+0x961 sys/kern/vfs_lookup.c:567 namei(ffff80003c9478c8) at namei+0x7ca sys/kern/vfs_lookup.c:250 sys_unveil(ffff8000360ff4f0,ffff80003c947aa0,ffff80003c9479f0) at sys_unveil+0x329 sys/kern/vfs_syscalls.c:1009 syscall(ffff80003c947aa0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c947aa0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xefd07eb4e20, 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> 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:438 panic(ffffffff833833e8) at panic+0x1cf sys/kern/subr_prf.c:198 ufs_lookup() at ufs_lookup+0x1eca VOP_LOOKUP(fffffd80679736d0,ffff80003c9478f8,ffff80003c947928) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 vfs_lookup(ffff80003c9478c8) at vfs_lookup+0x961 sys/kern/vfs_lookup.c:567 namei(ffff80003c9478c8) at namei+0x7ca sys/kern/vfs_lookup.c:250 sys_unveil(ffff8000360ff4f0,ffff80003c947aa0,ffff80003c9479f0) at sys_unveil+0x329 sys/kern/vfs_syscalls.c:1009 syscall(ffff80003c947aa0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c947aa0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xefd07eb4e20, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80003c947570 rbx 0 rdx 0xffff800001652780 rcx 0 rax 0xffff8000360ff4f0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x94cc284f9129aa17 r11 0xf895b899eb1660bf r12 0 r13 0 r14 0 r15 0x1 rip 0xffffffff82289575 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c947560 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=51983 pid=84233 tcnt=3 stat=onproc flags process=2000 proc=4000000 runpri=32, usrpri=79, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0xffff8000360ff4f0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff8000360ff788,0xffff8000360ffcc8 process=0xffff8000338fc928 user=0xffff80003c942000, vmspace=0xfffffd806cba58b8 estcpu=29, cpticks=0, pctcpu=0.0, user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 81655 444421 96700 0 2 0 syz-executor 81655 180320 96700 0 3 0x4000080 fsleep syz-executor 93208 276079 60013 0 3 0x80 nanoslp syz-executor 93208 294769 60013 0 3 0x4000080 kqread syz-executor 93208 107742 60013 0 3 0x4000080 fsleep syz-executor 79792 113683 86126 0 2 0xc90 syz-executor 79792 363173 86126 0 3 0x4000090 kqread syz-executor 79792 307479 86126 0 3 0x4000090 fsleep syz-executor 84233 502148 66771 0 4 0x82000 syz-executor 84233 119755 66771 0 4 0x4082000 syz-executor *84233 51983 66771 0 7 0x4002000 syz-executor 98915 453623 82288 0 2 0xc80 syz-executor 98915 497465 82288 0 3 0x4000080 fsleep syz-executor 98915 64209 82288 0 3 0x4000080 kqsel syz-executor 35124 174056 0 0 3 0x14280 nfsidl nfsio 60170 298537 0 0 3 0x14280 nfsidl nfsio 66707 384721 0 0 3 0x14280 nfsidl nfsio 2832 203188 0 0 3 0x14280 nfsidl nfsio 44613 359736 0 0 3 0x14280 nfsidl nfsio 66253 464272 0 0 3 0x14280 nfsidl nfsio 2506 360662 0 0 3 0x14280 nfsidl nfsio 18575 225092 0 0 3 0x14280 nfsidl nfsio 49123 491537 0 0 3 0x14280 nfsidl nfsio 4448 299925 0 0 3 0x14280 nfsidl nfsio 70881 359815 0 0 3 0x14280 nfsidl nfsio 54546 96900 0 0 3 0x14280 nfsidl nfsio 55538 299087 0 0 3 0x14280 nfsidl nfsio 18274 124776 0 0 3 0x14280 nfsidl nfsio 80468 228801 0 0 3 0x14280 nfsidl nfsio 11237 168860 0 0 3 0x14280 nfsidl nfsio 72923 300379 0 0 3 0x14280 nfsidl nfsio 37472 160079 0 0 3 0x14280 nfsidl nfsio 13790 491004 0 0 3 0x14280 nfsidl nfsio 36378 495718 0 0 3 0x14280 nfsidl nfsio 74659 388620 57394 0 2 0x2 syz-executor 66771 464027 57394 0 3 0x82 nanoslp syz-executor 82288 509708 57394 0 3 0x82 nanoslp syz-executor 3902 355459 57394 0 2 0x2 syz-executor 60013 370092 57394 0 3 0x82 nanoslp syz-executor 86126 36995 57394 0 3 0x82 nanoslp syz-executor 96700 511678 57394 0 2 0xc82 syz-executor 58504 226709 57394 0 3 0x82 nanoslp syz-executor 57394 427064 41792 0 3 0x82 kqread syz-executor 41792 270295 435 0 3 0x10008a sigsusp ksh 435 449893 87191 0 3 0x98 kqread sshd-session 87191 456167 36277 0 3 0x92 kqread sshd-session 77029 506345 1 0 3 0x100083 ttyin getty 36277 305356 1 0 3 0x88 kqread sshd 65387 433147 36611 73 3 0x1100090 kqread syslogd 36611 47369 1 0 3 0x100082 sbwait syslogd 88743 353222 1 0 3 0x100080 kqread resolvd 59174 307923 94429 77 3 0x100092 kqread dhcpleased 38795 171426 94429 77 3 0x100092 kqread dhcpleased 94429 463728 1 0 3 0x80 kqread dhcpleased 75903 72521 0 0 3 0x14200 bored smr 83071 333423 0 0 2 0x14200 zerothread 84418 14162 0 0 3 0x14200 aiodoned aiodoned 41384 239777 0 0 3 0x14200 syncer update 81049 384808 0 0 3 0x14200 cleaner cleaner 27566 454281 0 0 3 0x14200 reaper reaper 16612 244121 0 0 3 0x14200 pgdaemon pagedaemon 99322 427390 0 0 3 0x14200 bored viomb 2800 373307 0 0 3 0x40014200 acpi0 acpi0 49061 234936 0 0 3 0x14200 bored softnet0 1955 142610 0 0 3 0x14200 bored systqmp 91260 462947 0 0 3 0x14200 bored systq 73651 156320 0 0 3 0x40014200 tmoslp softclock 23764 222822 0 0 3 0x40014200 idle0 1 166930 0 0 3 0x80082 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 11062 12266K 13278K 166960K 14277 0 pcb 18 15K 16K 166960K 285 0 rtable 257 11K 11K 166960K 606 0 pf 37 14K 18K 166960K 142 0 ifaddr 41 7K 7K 166960K 90 0 ifgroup 49 2K 2K 166960K 131 0 sysctl 4 1K 9K 166960K 17 0 counters 36 18K 18K 166960K 75 0 ioctlops 0 0K 4K 166960K 522 0 iov 0 0K 16K 166960K 103 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1419 89K 90K 166960K 2689 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 21 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 1K 166960K 97 0 dirhash 12 2K 2K 166960K 33 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 16 57K 240K 166960K 1208 0 sigio 0 0K 0K 166960K 34 0 proc 60 59K 91K 166960K 700 0 subproc 72 4K 4K 166960K 99 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 172 0 in_multi 95 7K 7K 166960K 178 0 ether_multi 1 0K 0K 166960K 12 0 mrt 0 0K 0K 166960K 32 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 109 493K 493K 166960K 109 0 exec 0 0K 1K 166960K 537 0 fusefs mount 1 32K 32K 166960K 1 0 pfkey data 0 0K 0K 166960K 4 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 220 150K 173K 166960K 12397 0 UVM aobj 67 11K 13K 166960K 78 0 pinsyscall 37 74K 93K 166960K 2379 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 1K 166960K 71 0 NDP 12 0K 2K 166960K 66 0 temp 81 9076K 9199K 166960K 45451 0 kqueue 17 26K 32K 166960K 223 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 130 0 127 1 0 1 1 0 8 0 rtentry 136 171 0 67 4 0 4 4 0 8 0 unpcb 144 1036 0 1010 8 7 1 6 0 8 0 syncache 336 8 0 8 2 1 1 1 0 8 1 tcpqe 32 2 0 2 1 0 1 1 0 8 1 tcpcb 736 365 0 358 7 0 7 7 0 8 6 arp 96 27 0 9 1 0 1 1 0 8 0 ipq 40 3 0 1 1 0 1 1 0 8 0 ipqe 40 4 0 2 1 0 1 1 0 8 0 inpcb 328 1312 0 1298 19 12 7 7 0 8 5 ip6q 72 5 0 1 1 0 1 1 0 8 0 ip6af 40 10 0 4 1 0 1 1 0 8 0 nd6 112 42 0 16 1 0 1 1 0 8 0 pkpcb 40 10 0 10 3 2 1 1 0 8 1 kcovpl 48 11 0 3 1 0 1 1 0 8 0 mppekey 1024 1 0 1 1 0 1 1 0 8 1 ppxss 1072 33 0 30 4 3 1 1 0 8 0 pfstscr 40 38 0 38 4 3 1 1 0 8 1 pffrag 232 3 0 0 1 0 1 1 0 482 0 pffrnode 88 3 0 0 1 0 1 1 0 8 0 pffrent 40 5 0 2 1 0 1 1 0 8 0 pfosfp 40 2 0 0 1 0 1 1 0 8 0 pfosfpen 112 2 0 0 1 0 1 1 0 8 0 pfrktable 1344 10 0 8 2 1 1 1 0 8 0 pfanchor 1288 4 0 2 1 0 1 1 0 8 0 pftag 88 1 0 0 1 0 1 1 0 8 0 pfqueue 320 1 0 0 1 0 1 1 0 8 0 pfstitem 24 7 0 0 1 0 1 1 0 8 0 pfstkey 128 88 0 81 1 0 1 1 0 8 0 pfstate 384 45 0 41 1 0 1 1 0 8 0 pfrule 1360 12 0 10 4 3 1 1 0 8 0 rttmr 136 2 0 2 1 1 0 1 0 8 0 art_heap8 4096 3 0 0 3 0 3 3 0 8 0 art_heap4 256 729 0 262 37 6 31 31 0 8 0 art_table 40 732 0 262 5 0 5 5 0 8 0 art_node 32 169 0 74 1 0 1 1 0 8 0 sysvmsgpl 40 18 0 8 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 92 0 82 1 0 1 1 0 8 0 shmpl 112 69 0 9 2 0 2 2 0 8 0 dirhash 1024 31 0 14 3 0 3 3 0 8 0 dino2pl 256 3656 0 2201 92 0 92 92 0 8 0 ffsino 256 3656 0 2201 92 0 92 92 0 8 0 nchpl 144 5257 0 3554 64 0 64 64 0 8 0 rtmask 32 11 0 9 3 2 1 1 0 8 0 vnodes 216 4520 0 0 252 0 252 252 0 8 0 namei 1024 19253 0 19250 3 2 1 2 0 8 0 vcpupl 3904 6 0 2 1 0 1 1 0 8 0 vmpool 808 6 0 2 1 0 1 1 0 8 0 pfiaddrpl 120 3 0 2 2 1 1 1 0 8 0 kstatmem 264 82 0 58 2 0 2 2 0 8 0 scsiplug 72 6 0 6 3 2 1 1 0 8 1 scxspl 216 20016 0 20016 13 9 4 8 1 8 4 plimitpl 152 433 0 417 1 0 1 1 0 8 0 sigapl 424 1529 0 1468 11 3 8 8 0 8 0 knotepl 120 54850 0 54556 60 48 12 17 0 8 3 kqueuepl 184 456 0 443 6 4 2 3 0 8 1 pipepl 304 270 0 243 3 0 3 3 0 8 0 fdescpl 448 1472 0 1444 5 1 4 5 0 8 0 filepl 120 10201 0 9974 17 7 10 13 0 8 2 lockfpl 104 551 0 549 2 1 1 2 0 8 0 lockfspl 48 182 0 180 1 0 1 1 0 8 0 sessionpl 144 27 0 19 1 0 1 1 0 8 0 pgrppl 48 46 0 30 1 0 1 1 0 8 0 ucredpl 104 1812 0 1800 1 0 1 1 0 8 0 zombiepl 144 1627 0 1626 2 1 1 1 0 8 0 processpl 1152 1529 0 1468 6 1 5 5 0 8 0 procpl 664 3182 0 3112 11 4 7 8 0 8 0 sosppl 176 7 0 7 3 2 1 1 0 8 1 sockpl 552 2522 0 2479 26 18 8 12 0 8 4 mcl64k 65536 41 0 40 3 2 1 1 0 8 0 mcl16k 16384 1 0 1 1 0 1 1 0 8 1 mcl12k 12288 1 0 1 1 0 1 1 0 8 1 mcl8k 8192 75 0 75 4 3 1 1 0 8 1 mcl4k 4096 3842 0 3793 17 9 8 14 0 8 0 mcl2k 2048 1222 0 1207 3 0 3 3 0 8 0 mtagpl 96 26 0 8 1 0 1 1 0 8 0 mbufpl 256 16188 0 15963 20 5 15 16 0 8 0 bufpl 280 6574 0 356 445 0 445 445 0 8 0 anonpl 24 216735 0 213468 112 60 52 75 0 187 22 amapchunkpl 152 41737 0 41269 46 16 30 32 0 158 9 amappl16 200 4311 0 4277 47 35 12 24 0 8 8 amappl15 192 9 0 9 1 1 0 1 0 8 0 amappl14 184 466 0 464 1 0 1 1 0 8 0 amappl13 176 124 0 114 1 0 1 1 0 8 0 amappl12 168 1722 0 1695 2 0 2 2 0 8 0 amappl11 160 6 0 5 1 0 1 1 0 8 0 amappl10 152 81 0 71 1 0 1 1 0 8 0 amappl9 144 254 0 253 1 0 1 1 0 8 0 amappl8 136 116 0 114 1 0 1 1 0 8 0 amappl7 128 46 0 44 1 0 1 1 0 8 0 amappl6 120 289 0 279 1 0 1 1 0 8 0 amappl5 112 96 0 89 1 0 1 1 0 8 0 amappl4 104 492 0 455 2 0 2 2 0 8 0 amappl3 96 7268 0 7181 3 0 3 3 0 8 0 amappl2 88 1558 0 1495 2 0 2 2 0 8 0 amappl1 80 14260 0 13730 14 1 13 13 0 8 0 amappl 88 11454 0 11296 5 0 5 5 0 92 0 uvmvnodes 80 136 0 0 3 0 3 3 0 8 0 dma8192 8192 1 0 1 1 0 1 1 0 8 1 dma4096 4096 2 0 2 2 1 1 1 0 8 1 dma1024 1024 1 0 0 1 0 1 1 0 8 0 dma256 256 7 0 7 2 2 0 1 0 8 0 dma128 128 254 0 254 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 19 0 18 1 0 1 1 0 8 0 aobjpl 72 77 0 11 2 0 2 2 0 8 0 uaddrrnd 24 1472 0 1444 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1472 0 1444 1 0 1 1 0 8 0 vmmpekpl 168 12410 0 12353 3 0 3 3 0 8 0 vmmpepl 168 98589 0 96824 117 25 92 99 0 357 7 vmsppl 368 1471 0 1444 4 1 3 4 0 8 0 rwobjpl 40 27716 0 26665 15 1 14 15 0 8 0 pdppl 4096 2962 0 2896 118 49 69 80 0 8 3 pvpl 32 635146 0 625801 231 97 134 160 0 265 53 pmappl 216 1477 0 1446 3 0 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 426 0 85 10 0 10 10 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(ffffffff833833e8) at panic+0x1cf sys/kern/subr_prf.c:198 ufs_lookup() at ufs_lookup+0x1eca VOP_LOOKUP(fffffd80679736d0,ffff80003c9478f8,ffff80003c947928) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 vfs_lookup(ffff80003c9478c8) at vfs_lookup+0x961 sys/kern/vfs_lookup.c:567 namei(ffff80003c9478c8) at namei+0x7ca sys/kern/vfs_lookup.c:250 sys_unveil(ffff8000360ff4f0,ffff80003c947aa0,ffff80003c9479f0) at sys_unveil+0x329 sys/kern/vfs_syscalls.c:1009 syscall(ffff80003c947aa0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c947aa0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xefd07eb4e20, count: -9 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff833833e8) at panic+0x1cf sys/kern/subr_prf.c:198 ufs_lookup() at ufs_lookup+0x1eca VOP_LOOKUP(fffffd80679736d0,ffff80003c9478f8,ffff80003c947928) at VOP_LOOKUP+0x6e sys/kern/vfs_vops.c:85 vfs_lookup(ffff80003c9478c8) at vfs_lookup+0x961 sys/kern/vfs_lookup.c:567 namei(ffff80003c9478c8) at namei+0x7ca sys/kern/vfs_lookup.c:250 sys_unveil(ffff8000360ff4f0,ffff80003c947aa0,ffff80003c9479f0) at sys_unveil+0x329 sys/kern/vfs_syscalls.c:1009 syscall(ffff80003c947aa0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c947aa0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xefd07eb4e20, count: -9