panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *289001 16350 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(ffff8000149ae388,ffff8000149ae388,f5bb765ed3b24ee2) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda640,ffff8000149ae430,ffff8000149ae3f0) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda640,ffff800014a1f2d8) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff7078,fffffd803efda640,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff800014a1f2d8,ffff8000149ae9f8,ffff8000149aeac3) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff800014a1f2d8,ffff8000149aeb30,ffff8000149aeba0) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff8000149aec10) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffe86f8,ab6c5e08ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe8680, 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(ffff8000149ae388,ffff8000149ae388,f5bb765ed3b24ee2) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda640,ffff8000149ae430,ffff8000149ae3f0) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda640,ffff800014a1f2d8) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff7078,fffffd803efda640,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff800014a1f2d8,ffff8000149ae9f8,ffff8000149aeac3) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff800014a1f2d8,ffff8000149aeb30,ffff8000149aeba0) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff8000149aec10) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffe86f8,ab6c5e08ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe8680, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000149ae1a0 rbx 0xffff8000149ae250 rdx 0x2 rcx 0 rax 0 r8 0xffff8000149ae160 r9 0x1 r10 0 r11 0x66ea2ebe98685aab r12 0x3000000008 r13 0xffff8000149ae1b0 r14 0x100 r15 0x1 rip 0xffffffff81a73678 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149ae190 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (ifconfig) pid=289001 stat=onproc flags process=2 proc=0 pri=17, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff800014a1e4c8,0xffffffff822b78f0 process=0xffff8000ffff7078 user=0xffff8000149a9000, vmspace=0xfffffd803f014210 estcpu=1, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *16350 289001 91527 0 7 0x2 ifconfig 91527 452040 75189 0 3 0x10008a pause sh 75189 408639 50679 0 3 0x82 wait syz-executor.0 44408 172499 0 0 3 0x14200 bored sosplice 2286 68914 50679 0 3 0x82 piperd syz-executor.1 50679 106388 13917 0 3 0x82 thrsleep syz-fuzzer 50679 314370 13917 0 3 0x4000082 thrsleep syz-fuzzer 50679 505615 13917 0 3 0x4000082 thrsleep syz-fuzzer 50679 391247 13917 0 3 0x4000082 thrsleep syz-fuzzer 50679 381713 13917 0 3 0x4000082 thrsleep syz-fuzzer 50679 455127 13917 0 3 0x4000082 kqread syz-fuzzer 50679 92669 13917 0 3 0x4000082 thrsleep syz-fuzzer 50679 281020 13917 0 3 0x4000082 thrsleep syz-fuzzer 13917 95927 99453 0 3 0x10008a pause ksh 99453 335959 62982 0 3 0x92 select sshd 18513 245260 1 0 3 0x100083 ttyin getty 62982 239550 1 0 3 0x80 select sshd 49916 261050 49362 73 2 0x100090 syslogd 49362 507903 1 0 3 0x100082 netio syslogd 48780 123901 1 77 3 0x100090 poll dhclient 22660 161730 1 0 3 0x80 poll dhclient 2991 328092 0 0 3 0x14200 pgzero zerothread 97709 11211 0 0 3 0x14200 aiodoned aiodoned 74820 326393 0 0 3 0x14200 syncer update 46235 156881 0 0 3 0x14200 cleaner cleaner 75853 191105 0 0 3 0x14200 reaper reaper 54676 403651 0 0 3 0x14200 pgdaemon pagedaemon 38333 91606 0 0 3 0x14200 bored crynlk 87851 165105 0 0 3 0x14200 bored crypto 47161 474040 0 0 3 0x40014200 acpi0 acpi0 26287 59104 0 0 3 0x14200 bored softnet 64233 199914 0 0 3 0x14200 bored systqmp 47477 427586 0 0 3 0x14200 bored systq 35353 128365 0 0 3 0x40014200 bored softclock 50763 208341 0 0 3 0x40014200 idle0 62545 322714 0 0 3 0x14200 bored smr 1 208435 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 9472 6329K 6719K 78643K 11863 0 0 pcb 23 9K 10K 78643K 285 0 0 rtable 86 3K 4K 78643K 337 0 0 ifaddr 43 11K 12K 78643K 107 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 22 0 0 iov 0 0K 24K 78643K 83 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1207 76K 76K 78643K 1666 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 90 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 6 17K 25K 78643K 545 0 0 sigio 0 0K 0K 78643K 6 0 0 proc 44 46K 62K 78643K 355 0 0 subproc 66 67586K 69634K 78643K 150 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 50 0 0 in_multi 22 1K 2K 78643K 72 0 0 ether_multi 1 0K 0K 78643K 4 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 239 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 79 20K 22K 78643K 2092 0 0 UVM aobj 21 2K 3K 78643K 27 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 33 0 0 NDP 8 0K 0K 78643K 29 0 0 temp 137 2709K 2837K 78643K 7117 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 8 0 4 1 0 1 1 0 8 0 inpcbpl 280 246 0 239 1 0 1 1 0 8 0 plimitpl 152 40 0 33 1 0 1 1 0 8 0 rtentry 112 56 0 23 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 17 0 17 1 1 0 1 0 8 0 tcpcb 544 90 0 86 1 0 1 1 0 8 0 nd6 48 9 0 6 1 0 1 1 0 8 0 ppxss 1128 11 0 11 3 2 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 232 0 88 12 0 12 12 0 8 0 art_table 32 233 0 88 2 0 2 2 0 8 0 art_node 16 55 0 25 1 0 1 1 0 8 0 sysvmsgpl 40 11 0 5 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 86 0 76 1 0 1 1 0 8 0 shmpl 112 25 0 6 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2234 0 823 46 0 46 46 0 8 0 ffsino 240 2234 0 823 84 0 84 84 0 8 0 nchpl 144 3158 0 1524 61 0 61 61 0 8 0 uvmvnodes 72 2610 0 0 48 0 48 48 0 8 0 vnodes 200 2610 0 0 138 0 138 138 0 8 0 namei 1024 9229 0 9228 1 0 1 1 0 8 0 scsiplug 64 1 0 1 1 0 1 1 0 8 1 scxspl 192 19652 0 19652 12 10 2 7 0 8 2 sigapl 432 709 0 695 2 0 2 2 0 8 0 futexpl 56 9002 0 9002 1 0 1 1 0 8 1 knotepl 112 185 0 164 1 0 1 1 0 8 0 kqueuepl 104 132 0 130 1 0 1 1 0 8 0 pipepl 112 424 0 405 2 1 1 1 0 8 0 fdescpl 424 710 0 695 2 0 2 2 0 8 0 filepl 120 4179 0 4085 4 0 4 4 0 8 1 lockfpl 104 169 0 169 2 1 1 1 0 8 1 lockfspl 48 65 0 65 2 1 1 1 0 8 1 sessionpl 112 19 0 9 1 0 1 1 0 8 0 pgrppl 48 21 0 11 1 0 1 1 0 8 0 ucredpl 96 799 0 792 1 0 1 1 0 8 0 zombiepl 144 695 0 695 2 1 1 1 0 8 1 processpl 840 725 0 695 4 0 4 4 0 8 0 procpl 600 1367 0 1330 4 0 4 4 0 8 0 sosppl 128 6 0 6 2 1 1 1 0 8 1 sockpl 384 478 0 461 3 0 3 3 0 8 1 mcl64k 65536 10 0 10 4 3 1 1 0 8 1 mcl16k 16384 4 0 4 2 1 1 1 0 8 1 mcl12k 12288 5 0 5 4 3 1 1 0 8 1 mcl9k 9216 9 0 9 2 1 1 1 0 8 1 mcl8k 8192 14 0 14 3 2 1 1 0 8 1 mcl4k 4096 33 0 33 2 1 1 1 0 8 1 mcl2k2 2112 2 0 2 1 1 0 1 0 8 0 mcl2k 2048 58409 0 58363 16 9 7 13 0 8 0 mtagpl 80 4 0 4 2 2 0 1 0 8 0 mbufpl 256 97770 0 97693 11 3 8 10 0 8 1 bufpl 256 22563 0 19452 201 1 200 200 0 8 0 anonpl 16 78879 0 70133 72 19 53 58 0 62 7 amapchunkpl 152 3532 0 3403 21 12 9 12 0 158 3 amappl16 192 3476 0 2877 50 18 32 41 0 8 1 amappl15 184 101 0 100 1 0 1 1 0 8 0 amappl14 176 36 0 33 2 1 1 1 0 8 0 amappl13 168 7 0 7 2 2 0 1 0 8 0 amappl12 160 20 0 19 1 0 1 1 0 8 0 amappl11 152 45 0 29 1 0 1 1 0 8 0 amappl10 144 525 0 519 1 0 1 1 0 8 0 amappl9 136 571 0 568 1 0 1 1 0 8 0 amappl8 128 140 0 125 1 0 1 1 0 8 0 amappl7 120 481 0 473 1 0 1 1 0 8 0 amappl6 112 56 0 47 1 0 1 1 0 8 0 amappl5 104 134 0 122 1 0 1 1 0 8 0 amappl4 96 922 0 897 2 1 1 2 0 8 0 amappl3 88 128 0 123 1 0 1 1 0 8 0 amappl2 80 5153 0 5112 2 0 2 2 0 8 0 amappl1 72 21951 0 21520 24 15 9 19 0 8 0 amappl 72 1644 0 1610 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 26 0 6 1 0 1 1 0 8 0 uaddrrnd 24 710 0 695 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 710 0 695 1 0 1 1 0 8 0 vmmpekpl 168 8363 0 8344 2 0 2 2 0 8 0 vmmpepl 168 81299 0 79808 135 46 89 108 0 357 20 vmsppl 264 709 0 695 2 1 1 2 0 8 0 pdppl 4096 1426 0 1390 6 1 5 6 0 8 0 pvpl 32 251605 0 239855 160 25 135 147 0 265 20 pmappl 200 709 0 695 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 349 0 23 10 0 10 10 0 8 0