panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *319488 36561 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(ffff800014a1ff58,ffff800014a1ff58,6b71208334901a8e) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda898,ffff800014a20000,ffff800014a1ffc0) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda898,ffff8000ffff8008) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff73c0,fffffd803efda898,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000ffff8008,ffff800014a205c8,ffff800014a20693) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000ffff8008,ffff800014a20700,ffff800014a20770) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff800014a207e0) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffd82b8,15d8a2b08ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd8240, 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(ffff800014a1ff58,ffff800014a1ff58,6b71208334901a8e) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda898,ffff800014a20000,ffff800014a1ffc0) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda898,ffff8000ffff8008) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff73c0,fffffd803efda898,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000ffff8008,ffff800014a205c8,ffff800014a20693) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000ffff8008,ffff800014a20700,ffff800014a20770) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff800014a207e0) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffd82b8,15d8a2b08ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd8240, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800014a1fd70 rbx 0xffff800014a1fe20 rdx 0x2 rcx 0 rax 0 r8 0xffff800014a1fd30 r9 0x1 r10 0 r11 0xfbe93cd7d0803ebb r12 0x3000000008 r13 0xffff800014a1fd80 r14 0x100 r15 0x1 rip 0xffffffff81a73678 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014a1fd60 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (ifconfig) pid=319488 stat=onproc flags process=2 proc=0 pri=17, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff8e18,0xffffffff822b78f0 process=0xffff8000ffff73c0 user=0xffff800014a1b000, vmspace=0xfffffd803f014318 estcpu=1, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *36561 319488 25369 0 7 0x2 ifconfig 25369 304125 73985 0 3 0x10008a pause sh 73985 153694 71231 0 3 0x82 wait syz-executor.0 77524 216197 0 0 3 0x14200 bored sosplice 71792 144585 71231 0 3 0x82 piperd syz-executor.1 29214 500081 1 0 3 0x100083 ttyin getty 71231 307961 45479 0 3 0x82 thrsleep syz-fuzzer 71231 132361 45479 0 3 0x4000082 thrsleep syz-fuzzer 71231 60249 45479 0 3 0x4000082 kqread syz-fuzzer 71231 140035 45479 0 3 0x4000082 thrsleep syz-fuzzer 71231 85344 45479 0 3 0x4000082 thrsleep syz-fuzzer 71231 71652 45479 0 3 0x4000082 thrsleep syz-fuzzer 71231 252963 45479 0 3 0x4000082 thrsleep syz-fuzzer 71231 49831 45479 0 3 0x4000082 thrsleep syz-fuzzer 45479 25657 17781 0 3 0x10008a pause ksh 17781 213801 8447 0 3 0x92 select sshd 8447 332708 1 0 3 0x80 select sshd 5842 231654 2569 73 2 0x100090 syslogd 2569 261307 1 0 3 0x100082 netio syslogd 5235 522647 1 77 3 0x100090 poll dhclient 41367 422989 1 0 3 0x80 poll dhclient 81195 188152 0 0 3 0x14200 pgzero zerothread 38005 319827 0 0 3 0x14200 aiodoned aiodoned 563 315195 0 0 3 0x14200 syncer update 3555 374812 0 0 3 0x14200 cleaner cleaner 41523 114824 0 0 3 0x14200 reaper reaper 58598 304292 0 0 3 0x14200 pgdaemon pagedaemon 66012 471012 0 0 3 0x14200 bored crynlk 39826 43858 0 0 3 0x14200 bored crypto 82407 343494 0 0 3 0x40014200 acpi0 acpi0 51823 461450 0 0 3 0x14200 bored softnet 54940 247733 0 0 3 0x14200 bored systqmp 33944 464960 0 0 3 0x14200 bored systq 66910 309228 0 0 3 0x40014200 bored softclock 5766 185367 0 0 3 0x40014200 idle0 53322 360249 0 0 3 0x14200 bored smr 1 389030 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 9496 6328K 6958K 78643K 12431 0 0 pcb 23 9K 10K 78643K 337 0 0 rtable 89 3K 4K 78643K 387 0 0 ifaddr 52 12K 13K 78643K 108 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 39 0 0 iov 0 0K 24K 78643K 67 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1206 76K 76K 78643K 1835 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 9 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 76 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 6 17K 25K 78643K 672 0 0 sigio 0 0K 0K 78643K 12 0 0 proc 44 46K 62K 78643K 434 0 0 subproc 66 67586K 69634K 78643K 174 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 55 0 0 in_multi 22 1K 2K 78643K 63 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 42 185K 185K 78643K 42 0 0 exec 0 0K 1K 78643K 255 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 79 20K 30K 78643K 2378 0 0 UVM aobj 36 6K 6K 78643K 40 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 14 0 0 NDP 11 0K 0K 78643K 32 0 0 temp 156 2709K 3347K 78643K 7601 0 0 kqueue 0 0K 0K 78643K 4 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 10 0 6 1 0 1 1 0 8 0 inpcbpl 280 288 0 281 1 0 1 1 0 8 0 plimitpl 152 38 0 31 1 0 1 1 0 8 0 rtentry 112 67 0 34 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 108 0 104 1 0 1 1 0 8 0 nd6 48 12 0 9 1 0 1 1 0 8 0 ppxss 1128 6 0 6 2 1 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 277 0 132 12 0 12 12 0 8 0 art_table 32 278 0 132 2 0 2 2 0 8 0 art_node 16 66 0 36 1 0 1 1 0 8 0 sysvmsgpl 40 10 0 4 1 0 1 1 0 8 0 semupl 112 5 0 5 1 1 0 1 0 8 0 semapl 112 74 0 64 1 0 1 1 0 8 0 shmpl 112 38 0 4 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2355 0 937 46 0 46 46 0 8 0 ffsino 240 2355 0 937 84 0 84 84 0 8 0 nchpl 144 3428 0 1789 61 0 61 61 0 8 0 uvmvnodes 72 2893 0 0 53 0 53 53 0 8 0 vnodes 200 2893 0 0 153 0 153 153 0 8 0 namei 1024 9735 0 9734 2 1 1 1 0 8 0 scsiplug 64 1 0 1 1 1 0 1 0 8 0 scxspl 192 20218 0 20218 8 7 1 6 0 8 1 sigapl 432 834 0 820 2 0 2 2 0 8 0 futexpl 56 10260 0 10260 1 0 1 1 0 8 1 knotepl 112 203 0 182 1 0 1 1 0 8 0 kqueuepl 104 146 0 144 1 0 1 1 0 8 0 pipepl 112 508 0 489 3 2 1 2 0 8 0 fdescpl 424 835 0 820 2 0 2 2 0 8 0 filepl 120 4547 0 4453 4 0 4 4 0 8 1 lockfpl 104 230 0 230 2 1 1 1 0 8 1 lockfspl 48 84 0 84 2 1 1 1 0 8 1 sessionpl 112 21 0 11 1 0 1 1 0 8 0 pgrppl 48 33 0 23 1 0 1 1 0 8 0 ucredpl 96 522 0 515 1 0 1 1 0 8 0 zombiepl 144 820 0 820 3 2 1 1 0 8 1 processpl 840 850 0 820 4 0 4 4 0 8 0 procpl 600 1627 0 1590 4 0 4 4 0 8 1 sosppl 128 12 0 12 2 1 1 1 0 8 1 sockpl 384 568 0 551 3 0 3 3 0 8 1 mcl64k 65536 272 0 272 33 32 1 33 0 8 1 mcl16k 16384 3 0 3 2 2 0 1 0 8 0 mcl12k 12288 17 0 17 1 0 1 1 0 8 1 mcl9k 9216 10 0 10 2 1 1 1 0 8 1 mcl8k 8192 12 0 12 4 3 1 1 0 8 1 mcl4k 4096 33 0 33 4 3 1 1 0 8 1 mcl2k2 2112 11 0 11 4 3 1 1 0 8 1 mcl2k 2048 59107 0 59072 12 6 6 9 0 8 1 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 98908 0 98854 22 14 8 21 0 8 2 bufpl 256 22705 0 19598 198 0 198 198 0 8 0 anonpl 16 96443 0 87669 73 14 59 61 0 62 13 amapchunkpl 152 4237 0 4123 21 14 7 12 0 158 1 amappl16 192 4305 0 3699 54 17 37 43 0 8 6 amappl15 184 1 0 0 1 0 1 1 0 8 0 amappl14 176 386 0 384 2 1 1 1 0 8 0 amappl13 168 199 0 198 2 1 1 1 0 8 0 amappl12 160 12 0 8 1 0 1 1 0 8 0 amappl11 152 107 0 93 1 0 1 1 0 8 0 amappl10 144 76 0 72 2 1 1 1 0 8 0 amappl9 136 266 0 262 1 0 1 1 0 8 0 amappl8 128 154 0 139 1 0 1 1 0 8 0 amappl7 120 42 0 35 1 0 1 1 0 8 0 amappl6 112 119 0 111 1 0 1 1 0 8 0 amappl5 104 802 0 789 1 0 1 1 0 8 0 amappl4 96 1220 0 1191 2 1 1 2 0 8 0 amappl3 88 142 0 136 1 0 1 1 0 8 0 amappl2 80 6075 0 6032 3 1 2 2 0 8 0 amappl1 72 24575 0 24142 23 13 10 19 0 8 0 amappl 72 1908 0 1874 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 39 0 4 1 0 1 1 0 8 0 uaddrrnd 24 835 0 820 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 835 0 820 1 0 1 1 0 8 0 vmmpekpl 168 9713 0 9693 2 0 2 2 0 8 0 vmmpepl 168 93777 0 92277 129 39 90 90 0 357 17 vmsppl 264 834 0 820 2 1 1 2 0 8 0 pdppl 4096 1676 0 1640 6 1 5 6 0 8 0 pvpl 32 287963 0 276158 172 20 152 154 0 265 38 pmappl 200 834 0 820 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 386 0 64 11 0 11 11 0 8 0