panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 83276 18639 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(ffff8000149fadb8,ffff8000149fadb8,6177d407c6a8c5e3) at ufs_dirbadentry VOP_LOOKUP(fffffd803efdaa28,ffff8000149fae60,ffff8000149fae20) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efdaa28,ffff8000ffff8e18) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff7708,fffffd803efdaa28,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000ffff8e18,ffff8000149fb428,ffff8000149fb4f3) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000ffff8e18,ffff8000149fb560,ffff8000149fb5d0) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff8000149fb640) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffccca8,1e6625708ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffccc30, 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(ffff8000149fadb8,ffff8000149fadb8,6177d407c6a8c5e3) at ufs_dirbadentry VOP_LOOKUP(fffffd803efdaa28,ffff8000149fae60,ffff8000149fae20) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efdaa28,ffff8000ffff8e18) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff7708,fffffd803efdaa28,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000ffff8e18,ffff8000149fb428,ffff8000149fb4f3) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000ffff8e18,ffff8000149fb560,ffff8000149fb5d0) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff8000149fb640) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffccca8,1e6625708ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffccc30, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000149fabd0 rbx 0xffff8000149fac80 rdx 0x2 rcx 0 rax 0 r8 0xffff8000149fab90 r9 0x1 r10 0 r11 0xdd217f0f3c2d982b r12 0x3000000008 r13 0xffff8000149fabe0 r14 0x100 r15 0x1 rip 0xffffffff81a73678 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149fabc0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (ifconfig) pid=83276 stat=onproc flags process=2 proc=0 pri=17, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff8008,0xffffffff822b78f0 process=0xffff8000ffff7708 user=0xffff8000149f6000, vmspace=0xfffffd803f014108 estcpu=1, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *18639 83276 29576 0 7 0x2 ifconfig 29576 238885 31806 0 3 0x10008a pause sh 31806 226999 99723 0 3 0x82 wait syz-executor.1 37929 394902 0 0 3 0x14200 bored sosplice 99162 373659 1 0 3 0x100083 ttyin getty 80953 486343 99723 0 3 0x82 piperd syz-executor.0 99723 10856 15889 0 3 0x82 thrsleep syz-fuzzer 99723 68308 15889 0 3 0x4000082 thrsleep syz-fuzzer 99723 326878 15889 0 3 0x4000082 thrsleep syz-fuzzer 99723 125560 15889 0 3 0x4000082 thrsleep syz-fuzzer 99723 130786 15889 0 3 0x4000082 thrsleep syz-fuzzer 99723 406256 15889 0 3 0x4000082 kqread syz-fuzzer 99723 361580 15889 0 3 0x4000082 thrsleep syz-fuzzer 15889 250573 87887 0 3 0x10008a pause ksh 87887 63051 50178 0 3 0x92 select sshd 50178 113194 1 0 3 0x80 select sshd 96176 61287 49501 73 2 0x100090 syslogd 49501 469564 1 0 3 0x100082 netio syslogd 25605 68987 1 77 3 0x100090 poll dhclient 95716 178024 1 0 3 0x80 poll dhclient 60489 414989 0 0 3 0x14200 pgzero zerothread 9364 298797 0 0 3 0x14200 aiodoned aiodoned 34874 49886 0 0 3 0x14200 syncer update 3985 409647 0 0 3 0x14200 cleaner cleaner 64812 149433 0 0 3 0x14200 reaper reaper 65071 498298 0 0 3 0x14200 pgdaemon pagedaemon 9076 317616 0 0 3 0x14200 bored crynlk 14982 334242 0 0 3 0x14200 bored crypto 11124 371733 0 0 3 0x40014200 acpi0 acpi0 75882 344155 0 0 3 0x14200 bored softnet 67740 492659 0 0 3 0x14200 bored systqmp 42678 439252 0 0 3 0x14200 bored systq 60816 312033 0 0 3 0x40014200 bored softclock 57418 361759 0 0 3 0x40014200 idle0 73253 334945 0 0 3 0x14200 bored smr 1 110422 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 9461 6318K 6835K 78643K 11239 0 0 pcb 23 9K 10K 78643K 173 0 0 rtable 86 3K 4K 78643K 241 0 0 ifaddr 40 10K 12K 78643K 67 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 25 0 0 iov 0 0K 24K 78643K 42 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1199 75K 75K 78643K 1448 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 10 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 58 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 6 17K 25K 78643K 286 0 0 sigio 0 0K 0K 78643K 4 0 0 proc 43 46K 62K 78643K 316 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 22 0 0 in_multi 22 1K 2K 78643K 45 0 0 ether_multi 1 0K 0K 78643K 4 0 0 mrt 0 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 48 212K 212K 78643K 48 0 0 exec 0 0K 1K 78643K 195 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 20K 78643K 1442 0 0 UVM aobj 41 4K 4K 78643K 42 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 12 0 0 NDP 7 0K 0K 78643K 17 0 0 temp 119 2706K 2833K 78643K 6083 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 6 0 2 1 0 1 1 0 8 0 inpcbpl 280 152 0 145 1 0 1 1 0 8 0 plimitpl 152 27 0 20 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 tcpqe 32 7 0 7 1 1 0 1 0 8 0 tcpcb 544 46 0 42 1 0 1 1 0 8 0 nd6 48 6 0 3 1 0 1 1 0 8 0 ppxss 1128 5 0 5 2 1 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 188 0 44 12 0 12 12 0 8 1 art_table 32 189 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 1 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 54 0 44 1 0 1 1 0 8 0 shmpl 112 40 0 1 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1836 0 427 46 0 46 46 0 8 0 ffsino 240 1836 0 427 84 0 84 84 0 8 0 nchpl 144 2442 0 812 61 0 61 61 0 8 0 uvmvnodes 72 2053 0 0 38 0 38 38 0 8 0 vnodes 200 2053 0 0 109 0 109 109 0 8 0 namei 1024 6634 0 6633 2 1 1 1 0 8 0 scxspl 192 14848 0 14847 8 7 1 6 0 8 0 sigapl 432 454 0 440 2 0 2 2 0 8 0 futexpl 56 4720 0 4720 1 0 1 1 0 8 1 knotepl 112 107 0 86 1 0 1 1 0 8 0 kqueuepl 104 46 0 44 1 0 1 1 0 8 0 pipepl 112 316 0 297 3 2 1 2 0 8 0 fdescpl 424 455 0 440 2 0 2 2 0 8 0 filepl 120 2442 0 2348 4 0 4 4 0 8 1 lockfpl 104 110 0 110 2 1 1 1 0 8 1 lockfspl 48 34 0 34 2 1 1 1 0 8 1 sessionpl 112 19 0 9 1 0 1 1 0 8 0 pgrppl 48 23 0 13 1 0 1 1 0 8 0 ucredpl 96 299 0 292 1 0 1 1 0 8 0 zombiepl 144 440 0 440 2 1 1 1 0 8 1 processpl 840 470 0 440 4 0 4 4 0 8 0 procpl 600 807 0 771 4 0 4 4 0 8 1 sosppl 128 4 0 4 1 0 1 1 0 8 1 sockpl 384 290 0 273 3 0 3 3 0 8 1 mcl64k 65536 12 0 12 1 1 0 1 0 8 0 mcl16k 16384 1 0 1 1 1 0 1 0 8 0 mcl12k 12288 4 0 4 1 0 1 1 0 8 1 mcl9k 9216 4 0 4 2 1 1 1 0 8 1 mcl8k 8192 3 0 3 2 2 0 1 0 8 0 mcl4k 4096 27 0 27 2 1 1 1 0 8 1 mcl2k2 2112 2 0 2 1 0 1 1 0 8 1 mcl2k 2048 58309 0 58274 11 5 6 9 0 8 1 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 95810 0 95761 9 2 7 9 0 8 0 bufpl 256 19398 0 16285 198 0 198 198 0 8 0 anonpl 16 53961 0 45274 62 2 60 60 0 62 16 amapchunkpl 152 1926 0 1812 9 2 7 7 0 158 2 amappl16 192 2070 0 1484 42 4 38 42 0 8 8 amappl15 184 1 0 1 1 0 1 1 0 8 1 amappl14 176 150 0 147 2 1 1 1 0 8 0 amappl13 168 133 0 133 2 1 1 1 0 8 1 amappl12 160 6 0 4 1 0 1 1 0 8 0 amappl11 152 39 0 24 1 0 1 1 0 8 0 amappl10 144 64 0 62 2 1 1 1 0 8 0 amappl9 136 465 0 461 1 0 1 1 0 8 0 amappl8 128 124 0 109 1 0 1 1 0 8 0 amappl7 120 34 0 28 1 0 1 1 0 8 0 amappl6 112 57 0 48 1 0 1 1 0 8 0 amappl5 104 332 0 321 1 0 1 1 0 8 0 amappl4 96 672 0 645 2 1 1 2 0 8 0 amappl3 88 368 0 361 1 0 1 1 0 8 0 amappl2 80 2894 0 2852 2 0 2 2 0 8 0 amappl1 72 17458 0 17021 26 17 9 19 0 8 0 amappl 72 1038 0 1004 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 41 0 1 1 0 1 1 0 8 0 uaddrrnd 24 455 0 440 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 455 0 440 1 0 1 1 0 8 0 vmmpekpl 168 7230 0 7212 2 0 2 2 0 8 0 vmmpepl 168 56361 0 54884 113 25 88 88 0 357 18 vmsppl 264 454 0 440 2 1 1 2 0 8 0 pdppl 4096 916 0 880 6 1 5 6 0 8 0 pvpl 32 188219 0 176525 160 6 154 154 0 265 43 pmappl 200 454 0 440 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 335 0 16 10 0 10 10 0 8 0