panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *398896 99387 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(ffff800014a14cb8,ffff800014a14cb8,488e3537bea90cae) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda7d0,ffff800014a14d60,ffff800014a14d20) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda7d0,ffff8000ffff8260) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff6d30,fffffd803efda7d0,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000ffff8260,ffff800014a15328,ffff800014a153f3) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000ffff8260,ffff800014a15460,ffff800014a154d0) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff800014a15540) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffdadd8,1f5ea8c08ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffdad60, 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(ffff800014a14cb8,ffff800014a14cb8,488e3537bea90cae) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda7d0,ffff800014a14d60,ffff800014a14d20) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda7d0,ffff8000ffff8260) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff6d30,fffffd803efda7d0,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000ffff8260,ffff800014a15328,ffff800014a153f3) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000ffff8260,ffff800014a15460,ffff800014a154d0) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff800014a15540) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffdadd8,1f5ea8c08ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffdad60, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800014a14ad0 rbx 0xffff800014a14b80 rdx 0x2 rcx 0 rax 0 r8 0xffff800014a14a90 r9 0x1 r10 0 r11 0xceaccd8969b10ee0 r12 0x3000000008 r13 0xffff800014a14ae0 r14 0x100 r15 0x1 rip 0xffffffff81a73678 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014a14ac0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (ifconfig) pid=398896 stat=onproc flags process=2 proc=0 pri=17, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff9520,0xffffffff822b78f0 process=0xffff8000ffff6d30 user=0xffff800014a10000, vmspace=0xfffffd803f014108 estcpu=0, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *99387 398896 91099 0 7 0x2 ifconfig 91099 36494 57822 0 3 0x10008a pause sh 57822 360352 26533 0 3 0x82 wait syz-executor.1 87320 120990 1 0 3 0x100083 ttyin getty 28931 432209 0 0 3 0x14200 bored sosplice 15203 27404 26533 0 3 0x82 piperd syz-executor.0 26533 515453 99976 0 3 0x82 thrsleep syz-fuzzer 26533 180907 99976 0 3 0x4000082 thrsleep syz-fuzzer 26533 156557 99976 0 3 0x4000082 kqread syz-fuzzer 26533 290302 99976 0 3 0x4000082 thrsleep syz-fuzzer 26533 334854 99976 0 3 0x4000082 thrsleep syz-fuzzer 26533 180968 99976 0 3 0x4000082 thrsleep syz-fuzzer 26533 80580 99976 0 3 0x4000082 thrsleep syz-fuzzer 26533 30964 99976 0 3 0x4000082 thrsleep syz-fuzzer 99976 140608 66006 0 3 0x10008a pause ksh 66006 387547 43271 0 3 0x92 select sshd 43271 448775 1 0 3 0x80 select sshd 98288 239526 98029 73 2 0x100090 syslogd 98029 77239 1 0 3 0x100082 netio syslogd 72509 295965 1 77 3 0x100090 poll dhclient 92189 320483 1 0 3 0x80 poll dhclient 13868 151415 0 0 3 0x14200 pgzero zerothread 97116 448388 0 0 3 0x14200 aiodoned aiodoned 89653 318800 0 0 3 0x14200 syncer update 57586 292491 0 0 3 0x14200 cleaner cleaner 90695 213430 0 0 3 0x14200 reaper reaper 48858 192494 0 0 3 0x14200 pgdaemon pagedaemon 20795 120048 0 0 3 0x14200 bored crynlk 43031 500063 0 0 3 0x14200 bored crypto 69166 394140 0 0 3 0x40014200 acpi0 acpi0 84561 233478 0 0 3 0x14200 bored softnet 85789 81580 0 0 3 0x14200 bored systqmp 82872 372779 0 0 3 0x14200 bored systq 57529 227347 0 0 3 0x40014200 bored softclock 86444 99670 0 0 3 0x40014200 idle0 88657 41327 0 0 3 0x14200 bored smr 1 352827 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 9490 6343K 6717K 78643K 11827 0 0 pcb 23 9K 11K 78643K 309 0 0 rtable 86 3K 4K 78643K 327 0 0 ifaddr 49 11K 12K 78643K 122 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 43 0 0 iov 0 0K 24K 78643K 66 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1199 75K 76K 78643K 1648 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 12 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 84 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 6 17K 25K 78643K 506 0 0 sigio 0 0K 0K 78643K 16 0 0 proc 43 46K 62K 78643K 345 0 0 subproc 66 67586K 69634K 78643K 102 0 0 NFS srvsock 1 0K 0K 78643K 1 0 0 NFS daemon 1 16K 16K 78643K 1 0 0 ip_moptions 0 0K 0K 78643K 40 0 0 in_multi 22 1K 2K 78643K 41 0 0 ether_multi 1 0K 0K 78643K 1 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 54 238K 238K 78643K 54 0 0 exec 0 0K 1K 78643K 219 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 78 20K 22K 78643K 1964 0 0 UVM aobj 44 2K 2K 78643K 47 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 20 0 0 NDP 10 0K 0K 78643K 33 0 0 temp 129 2704K 2827K 78643K 6856 0 0 kqueue 0 0K 0K 78643K 5 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 6 0 2 1 0 1 1 0 8 0 inpcbpl 280 238 0 231 1 0 1 1 0 8 0 plimitpl 152 40 0 33 1 0 1 1 0 8 0 rtentry 112 45 0 12 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 116 0 112 1 0 1 1 0 8 0 nd6 48 6 0 3 1 0 1 1 0 8 0 ppxss 1128 18 0 18 2 1 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 189 0 44 12 0 12 12 0 8 1 art_table 32 190 0 44 2 0 2 2 0 8 0 art_node 16 44 0 14 1 0 1 1 0 8 0 sysvmsgpl 40 2 0 2 1 1 0 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 82 0 72 1 0 1 1 0 8 0 shmpl 112 45 0 3 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2213 0 801 46 0 46 46 0 8 0 ffsino 240 2213 0 801 84 0 84 84 0 8 0 nchpl 144 3105 0 1474 61 0 61 61 0 8 0 uvmvnodes 72 2555 0 0 47 0 47 47 0 8 0 vnodes 200 2555 0 0 135 0 135 135 0 8 0 namei 1024 8486 0 8485 3 2 1 1 0 8 0 scxspl 192 17942 0 17942 12 9 3 6 0 8 3 sigapl 432 674 0 660 2 0 2 2 0 8 0 futexpl 56 8516 0 8516 1 0 1 1 0 8 1 knotepl 112 159 0 138 1 0 1 1 0 8 0 kqueuepl 104 128 0 126 1 0 1 1 0 8 0 pipepl 112 418 0 399 3 2 1 2 0 8 0 fdescpl 424 675 0 660 2 0 2 2 0 8 0 filepl 120 3748 0 3654 5 1 4 5 0 8 1 lockfpl 104 129 0 129 2 1 1 1 0 8 1 lockfspl 48 48 0 48 2 1 1 1 0 8 1 sessionpl 112 19 0 9 1 0 1 1 0 8 0 pgrppl 48 19 0 9 1 0 1 1 0 8 0 ucredpl 96 456 0 449 1 0 1 1 0 8 0 zombiepl 144 660 0 660 3 2 1 1 0 8 1 processpl 840 690 0 660 4 0 4 4 0 8 0 procpl 600 1299 0 1262 4 0 4 4 0 8 1 sosppl 128 9 0 9 2 2 0 1 0 8 0 sockpl 384 506 0 489 4 1 3 4 0 8 1 mcl64k 65536 238 0 238 29 19 10 29 0 8 10 mcl12k 12288 10 0 10 1 0 1 1 0 8 1 mcl9k 9216 5 0 5 3 2 1 1 0 8 1 mcl8k 8192 3 0 3 1 0 1 1 0 8 1 mcl4k 4096 37 0 37 2 1 1 1 0 8 1 mcl2k2 2112 1 0 1 1 1 0 1 0 8 0 mcl2k 2048 58827 0 58795 10 5 5 7 0 8 0 mtagpl 80 4 0 4 2 1 1 1 0 8 1 mbufpl 256 97836 0 97783 23 13 10 19 0 8 4 bufpl 256 22769 0 19658 198 0 198 198 0 8 0 anonpl 16 78901 0 70268 72 11 61 62 0 62 15 amapchunkpl 152 3220 0 3097 17 12 5 15 0 158 0 amappl16 192 3361 0 2763 52 14 38 43 0 8 7 amappl14 176 41 0 36 2 1 1 1 0 8 0 amappl13 168 239 0 238 2 1 1 1 0 8 0 amappl12 160 4 0 3 1 0 1 1 0 8 0 amappl11 152 38 0 24 1 0 1 1 0 8 0 amappl10 144 59 0 59 4 4 0 1 0 8 0 amappl9 136 437 0 434 1 0 1 1 0 8 0 amappl8 128 369 0 350 1 0 1 1 0 8 0 amappl7 120 30 0 25 1 0 1 1 0 8 0 amappl6 112 53 0 47 1 0 1 1 0 8 0 amappl5 104 836 0 824 1 0 1 1 0 8 0 amappl4 96 884 0 858 2 1 1 2 0 8 0 amappl3 88 137 0 132 1 0 1 1 0 8 0 amappl2 80 5106 0 5063 3 1 2 2 0 8 0 amappl1 72 20909 0 20478 25 16 9 19 0 8 0 amappl 72 1552 0 1516 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 46 0 3 1 0 1 1 0 8 0 uaddrrnd 24 675 0 660 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 675 0 660 1 0 1 1 0 8 0 vmmpekpl 168 8467 0 8450 1 0 1 1 0 8 0 vmmpepl 168 77482 0 75995 120 31 89 89 0 357 17 vmsppl 264 674 0 660 2 1 1 2 0 8 0 pdppl 4096 1356 0 1320 6 1 5 6 0 8 0 pvpl 32 271608 0 259947 247 28 219 238 0 265 104 pmappl 200 674 0 660 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 375 0 43 11 0 11 11 0 8 0