panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *189733 61741 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(ffff8000149bb958,ffff8000149bb958,aa3d857bfcb35387) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda578,ffff8000149bba00,ffff8000149bb9c0) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda578,ffff8000ffff9520) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff6010,fffffd803efda578,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000ffff9520,ffff8000149bbfc8,ffff8000149bc093) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000ffff9520,ffff8000149bc100,ffff8000149bc170) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff8000149bc1e0) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffe7de8,93a76d08ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe7d70, 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(ffff8000149bb958,ffff8000149bb958,aa3d857bfcb35387) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda578,ffff8000149bba00,ffff8000149bb9c0) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda578,ffff8000ffff9520) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff6010,fffffd803efda578,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000ffff9520,ffff8000149bbfc8,ffff8000149bc093) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000ffff9520,ffff8000149bc100,ffff8000149bc170) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff8000149bc1e0) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffe7de8,93a76d08ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe7d70, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000149bb770 rbx 0xffff8000149bb820 rdx 0x2 rcx 0 rax 0 r8 0xffff8000149bb730 r9 0x1 r10 0 r11 0xcb94e9e3bf5bc837 r12 0x3000000008 r13 0xffff8000149bb780 r14 0x100 r15 0x1 rip 0xffffffff81a73678 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149bb760 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (ifconfig) pid=189733 stat=onproc flags process=2 proc=0 pri=17, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff8008,0xffffffff822b78f0 process=0xffff8000ffff6010 user=0xffff8000149b7000, vmspace=0xfffffd803f014630 estcpu=0, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *61741 189733 13879 0 7 0x2 ifconfig 13879 434002 15576 0 3 0x10008a pause sh 15576 523415 70094 0 3 0x82 wait syz-executor.0 88047 37383 70094 0 3 0x82 piperd syz-executor.1 97338 174140 0 0 3 0x14200 bored sosplice 70094 191158 81698 0 3 0x82 thrsleep syz-fuzzer 70094 387066 81698 0 3 0x4000082 thrsleep syz-fuzzer 70094 182155 81698 0 3 0x4000082 thrsleep syz-fuzzer 70094 41110 81698 0 3 0x4000082 thrsleep syz-fuzzer 70094 325791 81698 0 3 0x4000082 thrsleep syz-fuzzer 70094 211216 81698 0 3 0x4000082 kqread syz-fuzzer 70094 400677 81698 0 3 0x4000082 thrsleep syz-fuzzer 70094 325018 81698 0 3 0x4000082 thrsleep syz-fuzzer 81698 82842 49220 0 3 0x10008a pause ksh 49220 71486 85836 0 3 0x92 select sshd 25189 510036 1 0 3 0x100083 ttyin getty 85836 292709 1 0 3 0x80 select sshd 17026 370126 44430 73 2 0x100090 syslogd 44430 257716 1 0 3 0x100082 netio syslogd 56542 142332 1 77 3 0x100090 poll dhclient 87565 413845 1 0 3 0x80 poll dhclient 93970 246815 0 0 3 0x14200 pgzero zerothread 23716 381359 0 0 3 0x14200 aiodoned aiodoned 54320 517937 0 0 3 0x14200 syncer update 23897 445371 0 0 3 0x14200 cleaner cleaner 858 40762 0 0 3 0x14200 reaper reaper 85569 109606 0 0 3 0x14200 pgdaemon pagedaemon 18729 200217 0 0 3 0x14200 bored crynlk 784 237413 0 0 3 0x14200 bored crypto 74639 254361 0 0 3 0x40014200 acpi0 acpi0 73895 205493 0 0 3 0x14200 bored softnet 58016 503475 0 0 3 0x14200 bored systqmp 82818 451054 0 0 3 0x14200 bored systq 89547 8939 0 0 3 0x40014200 bored softclock 66408 380027 0 0 3 0x40014200 idle0 3230 100220 0 0 3 0x14200 bored smr 1 14467 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 6862K 78643K 12472 0 0 pcb 23 9K 10K 78643K 462 0 0 rtable 89 3K 4K 78643K 561 0 0 ifaddr 49 11K 13K 78643K 129 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 59 0 0 iov 0 0K 24K 78643K 92 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 76K 78643K 1918 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 8 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 1K 1K 78643K 124 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 6 17K 25K 78643K 1122 0 0 sigio 0 0K 0K 78643K 18 0 0 proc 44 46K 62K 78643K 618 0 0 subproc 66 67586K 69634K 78643K 308 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 70 0 0 in_multi 22 1K 2K 78643K 110 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 60 265K 265K 78643K 60 0 0 exec 0 0K 1K 78643K 296 0 0 pfkey data 0 0K 0K 78643K 2 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 83 20K 29K 78643K 3612 0 0 UVM aobj 25 2K 2K 78643K 29 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 35 0 0 NDP 10 0K 0K 78643K 42 0 0 temp 156 2711K 2839K 78643K 9002 0 0 kqueue 0 0K 0K 78643K 6 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 18 0 14 1 0 1 1 0 8 0 inpcbpl 280 1308 0 1301 1 0 1 1 0 8 0 plimitpl 152 55 0 48 1 0 1 1 0 8 0 rtentry 112 111 0 78 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 14 0 14 1 1 0 1 0 8 0 tcpcb 544 1052 0 1048 1 0 1 1 0 8 0 nd6 48 24 0 21 1 0 1 1 0 8 0 ppxss 1128 9 0 9 4 3 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 465 0 321 12 0 12 12 0 8 2 art_table 32 466 0 321 2 0 2 2 0 8 0 art_node 16 110 0 80 1 0 1 1 0 8 0 sysvmsgpl 40 8 0 2 1 0 1 1 0 8 0 semapl 112 122 0 112 1 0 1 1 0 8 0 shmpl 112 27 0 4 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2812 0 1370 47 0 47 47 0 8 0 ffsino 240 2812 0 1370 85 0 85 85 0 8 0 nchpl 144 4352 0 2697 62 0 62 62 0 8 0 uvmvnodes 72 3401 0 0 62 0 62 62 0 8 0 vnodes 200 3401 0 0 179 0 179 179 0 8 0 namei 1024 12371 0 12370 2 1 1 1 0 8 0 scsiplug 64 2 0 2 1 1 0 1 0 8 0 scxspl 192 25494 0 25494 12 11 1 6 0 8 1 sigapl 432 1271 0 1257 2 0 2 2 0 8 0 futexpl 56 18314 0 18314 1 0 1 1 0 8 1 knotepl 112 289 0 268 1 0 1 1 0 8 0 kqueuepl 104 150 0 148 1 0 1 1 0 8 0 pipepl 112 694 0 675 2 1 1 1 0 8 0 fdescpl 424 1272 0 1257 2 0 2 2 0 8 0 filepl 120 6711 0 6617 4 0 4 4 0 8 1 lockfpl 104 262 0 262 3 2 1 1 0 8 1 lockfspl 48 87 0 87 3 2 1 1 0 8 1 sessionpl 112 24 0 14 1 0 1 1 0 8 0 pgrppl 48 28 0 18 1 0 1 1 0 8 0 ucredpl 96 783 0 776 1 0 1 1 0 8 0 zombiepl 144 1257 0 1257 2 1 1 1 0 8 1 processpl 840 1287 0 1257 4 0 4 4 0 8 0 procpl 600 2713 0 2676 4 0 4 4 0 8 1 sosppl 128 14 0 14 5 4 1 1 0 8 1 sockpl 384 1686 0 1669 3 0 3 3 0 8 1 mcl64k 65536 15 0 15 5 4 1 1 0 8 1 mcl16k 16384 4 0 4 3 3 0 1 0 8 0 mcl12k 12288 12 0 12 4 4 0 1 0 8 0 mcl9k 9216 8 0 8 5 5 0 1 0 8 0 mcl8k 8192 14 0 14 4 4 0 1 0 8 0 mcl4k 4096 62 0 62 2 1 1 1 0 8 1 mcl2k2 2112 5 0 5 2 2 0 1 0 8 0 mcl2k 2048 59994 0 59951 13 7 6 12 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 105329 0 105269 14 6 8 11 0 8 0 bufpl 256 25647 0 22540 198 0 198 198 0 8 0 anonpl 16 120372 0 111468 83 27 56 61 0 62 10 amapchunkpl 152 6162 0 6038 13 7 6 10 0 158 0 amappl16 192 5830 0 5235 68 29 39 43 0 8 8 amappl15 184 9 0 9 1 1 0 1 0 8 0 amappl14 176 329 0 327 2 1 1 1 0 8 0 amappl13 168 112 0 112 2 2 0 1 0 8 0 amappl12 160 38 0 34 1 0 1 1 0 8 0 amappl11 152 523 0 507 1 0 1 1 0 8 0 amappl10 144 227 0 224 2 1 1 1 0 8 0 amappl9 136 634 0 631 1 0 1 1 0 8 0 amappl8 128 195 0 179 1 0 1 1 0 8 0 amappl7 120 215 0 207 1 0 1 1 0 8 0 amappl6 112 511 0 502 1 0 1 1 0 8 0 amappl5 104 176 0 165 1 0 1 1 0 8 0 amappl4 96 1472 0 1447 2 1 1 2 0 8 0 amappl3 88 404 0 396 1 0 1 1 0 8 0 amappl2 80 9765 0 9723 2 0 2 2 0 8 0 amappl1 72 34095 0 33657 24 14 10 19 0 8 0 amappl 72 3047 0 3011 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 28 0 4 1 0 1 1 0 8 0 uaddrrnd 24 1272 0 1257 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1272 0 1257 1 0 1 1 0 8 0 vmmpekpl 168 12154 0 12136 2 0 2 2 0 8 0 vmmpepl 168 139534 0 138039 155 66 89 89 0 357 16 vmsppl 264 1271 0 1257 2 1 1 2 0 8 0 pdppl 4096 2550 0 2514 6 1 5 6 0 8 0 pvpl 32 364583 0 352649 199 53 146 151 0 265 30 pmappl 200 1271 0 1257 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 351 0 29 10 0 10 10 0 8 0