panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *277684 37610 0 0x2 0 0 ifconfig db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:212 ufs_dirbadentry(ffff800014a304b8,ffff800014a304b8,3e5ec6c38c766881) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda4b0,ffff800014a30560,ffff800014a30520) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda4b0,ffff800014a00280) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff7708,fffffd803efda4b0,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff800014a00280,ffff800014a30b28,ffff800014a30bf3) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff800014a00280,ffff800014a30c60,ffff800014a30cd0) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff800014a30d40) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffc4688,19e349f08ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc4610, 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 bad dir ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:212 ufs_dirbadentry(ffff800014a304b8,ffff800014a304b8,3e5ec6c38c766881) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda4b0,ffff800014a30560,ffff800014a30520) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda4b0,ffff800014a00280) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff7708,fffffd803efda4b0,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff800014a00280,ffff800014a30b28,ffff800014a30bf3) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff800014a00280,ffff800014a30c60,ffff800014a30cd0) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff800014a30d40) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffc4688,19e349f08ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc4610, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800014a302d0 rbx 0xffff800014a30380 rdx 0x2 rcx 0 rax 0 r8 0xffff800014a30290 r9 0x1 r10 0 r11 0xe1d1d2bba4c05337 r12 0x3000000008 r13 0xffff800014a302e0 r14 0x100 r15 0x1 rip 0xffffffff81a73678 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014a302c0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (ifconfig) pid=277684 stat=onproc flags process=2 proc=0 pri=17, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff800014a01540,0xffffffff822b78f0 process=0xffff8000ffff7708 user=0xffff800014a2b000, vmspace=0xfffffd803f014c60 estcpu=1, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *37610 277684 35091 0 7 0x2 ifconfig 35091 442475 18083 0 3 0x10008a pause sh 18083 8683 97571 0 3 0x82 wait syz-executor.1 27695 495895 32304 0 3 0x80 fsleep syz-executor.0 27695 301391 32304 0 3 0x4000080 ttyin syz-executor.0 32304 3280 97571 0 3 0x82 nanosleep syz-executor.0 99004 27444 0 0 3 0x14200 bored sosplice 97571 402577 99057 0 3 0x82 thrsleep syz-fuzzer 97571 219218 99057 0 3 0x4000082 thrsleep syz-fuzzer 97571 369291 99057 0 3 0x4000082 kqread syz-fuzzer 97571 288771 99057 0 3 0x4000082 thrsleep syz-fuzzer 97571 408649 99057 0 3 0x4000082 thrsleep syz-fuzzer 97571 334159 99057 0 3 0x4000082 thrsleep syz-fuzzer 97571 154839 99057 0 3 0x4000082 thrsleep syz-fuzzer 97571 435618 99057 0 3 0x4000082 thrsleep syz-fuzzer 99057 472454 48977 0 3 0x10008a pause ksh 48977 273830 46578 0 3 0x92 select sshd 12558 393460 1 0 3 0x100083 ttyin getty 46578 173716 1 0 3 0x80 select sshd 95200 68612 1300 73 2 0x100090 syslogd 1300 445824 1 0 3 0x100082 netio syslogd 6141 21781 1 77 3 0x100090 poll dhclient 33828 281643 1 0 3 0x80 poll dhclient 20870 98842 0 0 3 0x14200 pgzero zerothread 27990 392020 0 0 3 0x14200 aiodoned aiodoned 58599 133290 0 0 3 0x14200 syncer update 74279 87233 0 0 3 0x14200 cleaner cleaner 68564 60359 0 0 3 0x14200 reaper reaper 95906 34673 0 0 3 0x14200 pgdaemon pagedaemon 62482 519319 0 0 3 0x14200 bored crynlk 43408 102415 0 0 3 0x14200 bored crypto 36319 425273 0 0 3 0x40014200 acpi0 acpi0 5943 521559 0 0 3 0x14200 bored softnet 34385 416918 0 0 3 0x14200 bored systqmp 39872 392953 0 0 3 0x14200 bored systq 84327 475566 0 0 3 0x40014200 bored softclock 60017 30439 0 0 3 0x40014200 idle0 86786 498704 0 0 3 0x14200 bored smr 1 441288 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 Kern Lim devbuf 9504 6347K 6738K 78643K 13049 0 0 pcb 23 9K 11K 78643K 408 0 0 rtable 86 3K 4K 78643K 520 0 0 ifaddr 51 12K 14K 78643K 160 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 33 0 0 iov 0 0K 16K 78643K 95 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1197 75K 76K 78643K 2065 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 5K 78643K 14 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 54 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 7 21K 25K 78643K 1222 0 0 sigio 0 0K 0K 78643K 8 0 0 proc 44 46K 62K 78643K 520 0 0 subproc 66 67586K 69634K 78643K 238 0 0 NFS srvsock 1 0K 0K 78643K 1 0 0 NFS daemon 1 16K 16K 78643K 1 0 0 ip_moptions 2 0K 0K 78643K 623 0 0 in_multi 22 1K 2K 78643K 103 0 0 ether_multi 1 0K 0K 78643K 2 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 84 371K 371K 78643K 84 0 0 exec 0 0K 1K 78643K 262 0 0 pfkey data 0 0K 0K 78643K 4 0 0 pagedep 1 8K 8K 78643K 1 0 0 inodedep 1 32K 32K 78643K 1 0 0 newblk 1 0K 0K 78643K 1 0 0 VM swap 7 26K 26K 78643K 7 0 0 UVM amap 86 20K 22K 78643K 4009 0 0 UVM aobj 51 2K 2K 78643K 52 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 0K 78643K 17 0 0 NDP 11 0K 0K 78643K 47 0 0 temp 163 2711K 2834K 78643K 9257 0 0 kqueue 0 0K 0K 78643K 2 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 14 0 10 1 0 1 1 0 8 0 inpcbpl 280 694 0 686 2 1 1 2 0 8 0 plimitpl 152 54 0 47 1 0 1 1 0 8 0 rtentry 112 89 0 56 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 204 0 200 1 0 1 1 0 8 0 nd6 48 18 0 15 1 0 1 1 0 8 0 ppxss 1128 18 0 18 11 11 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 371 0 226 13 0 13 13 0 8 1 art_table 32 372 0 226 2 0 2 2 0 8 0 art_node 16 88 0 58 1 0 1 1 0 8 0 sysvmsgpl 40 10 0 1 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 52 0 42 1 0 1 1 0 8 0 shmpl 112 50 0 1 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3065 0 1635 50 3 47 47 0 8 0 ffsino 240 3065 0 1635 86 1 85 85 0 8 0 nchpl 144 4782 0 3136 63 2 61 62 0 8 0 uvmvnodes 72 3749 0 0 69 0 69 69 0 8 0 vnodes 200 3749 0 0 198 0 198 198 0 8 0 namei 1024 14533 0 14532 2 1 1 1 0 8 0 scxspl 192 27521 0 27521 10 9 1 6 0 8 1 sigapl 432 1377 0 1362 2 0 2 2 0 8 0 futexpl 56 29591 0 29590 1 0 1 1 0 8 0 knotepl 112 346 0 325 1 0 1 1 0 8 0 kqueuepl 104 225 0 223 1 0 1 1 0 8 0 pipepl 112 598 0 579 3 2 1 2 0 8 0 fdescpl 424 1378 0 1362 2 0 2 2 0 8 0 filepl 120 7251 0 7154 6 2 4 5 0 8 1 lockfpl 104 261 0 261 24 24 0 1 0 8 0 lockfspl 48 100 0 100 24 24 0 1 0 8 0 sessionpl 112 22 0 12 1 0 1 1 0 8 0 pgrppl 48 33 0 23 1 0 1 1 0 8 0 ucredpl 96 1571 0 1564 1 0 1 1 0 8 0 zombiepl 144 1362 0 1362 2 1 1 1 0 8 1 processpl 840 1393 0 1362 4 0 4 4 0 8 0 procpl 600 3172 0 3133 6 2 4 4 0 8 0 sosppl 128 11 0 11 4 4 0 1 0 8 0 sockpl 384 1048 0 1030 25 23 2 4 0 8 0 mcl64k 65536 281 0 281 44 44 0 33 0 8 0 mcl16k 16384 3 0 3 3 3 0 1 0 8 0 mcl12k 12288 8 0 8 8 8 0 1 0 8 0 mcl9k 9216 8 0 8 7 7 0 1 0 8 0 mcl8k 8192 12 0 12 12 12 0 1 0 8 0 mcl4k 4096 326 0 326 4 3 1 1 0 8 1 mcl2k2 2112 8 0 8 3 3 0 1 0 8 0 mcl2k 2048 59427 0 59386 16 10 6 11 0 8 0 mtagpl 80 4 0 4 2 2 0 1 0 8 0 mbufpl 256 102641 0 102572 27 18 9 21 0 8 0 bufpl 256 27003 0 23895 198 0 198 198 0 8 0 anonpl 16 131777 0 122934 117 70 47 61 0 62 2 amapchunkpl 152 6613 0 6496 10 4 6 7 0 158 0 amappl16 192 6323 0 5721 89 57 32 43 0 8 1 amappl15 184 914 0 912 1 0 1 1 0 8 0 amappl14 176 61 0 59 2 1 1 1 0 8 0 amappl13 168 8 0 7 2 1 1 1 0 8 0 amappl12 160 19 0 18 1 0 1 1 0 8 0 amappl11 152 54 0 40 1 0 1 1 0 8 0 amappl10 144 287 0 284 1 0 1 1 0 8 0 amappl9 136 885 0 880 1 0 1 1 0 8 0 amappl8 128 474 0 453 1 0 1 1 0 8 0 amappl7 120 262 0 254 1 0 1 1 0 8 0 amappl6 112 70 0 60 1 0 1 1 0 8 0 amappl5 104 207 0 196 1 0 1 1 0 8 0 amappl4 96 1559 0 1529 2 1 1 2 0 8 0 amappl3 88 134 0 129 1 0 1 1 0 8 0 amappl2 80 11258 0 11204 2 0 2 2 0 8 0 amappl1 72 36708 0 36262 24 15 9 19 0 8 0 amappl 72 3477 0 3441 1 0 1 1 0 75 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma64 64 259 0 259 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 17 0 17 1 1 0 1 0 8 0 aobjpl 64 51 0 1 1 0 1 1 0 8 0 uaddrrnd 24 1378 0 1362 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1378 0 1362 1 0 1 1 0 8 0 vmmpekpl 168 13082 0 13059 2 0 2 2 0 8 0 vmmpepl 168 148452 0 146867 214 121 93 93 0 357 20 vmsppl 264 1377 0 1362 4 3 1 2 0 8 0 pdppl 4096 2762 0 2724 6 1 5 6 0 8 0 pvpl 32 380920 0 368975 297 174 123 152 0 265 9 pmappl 200 1377 0 1362 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 418 0 95 11 1 10 11 0 8 0