panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *118737 61837 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(ffff800014a18418,ffff800014a18418,b161ea0c460c1479) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda320,ffff800014a184c0,ffff800014a18480) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda320,ffff8000149d6720) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff69e8,fffffd803efda320,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000149d6720,ffff800014a18a88,ffff800014a18b53) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000149d6720,ffff800014a18bc0,ffff800014a18c30) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff800014a18ca0) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffeef18,160fbd08ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffeeea0, 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(ffff800014a18418,ffff800014a18418,b161ea0c460c1479) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda320,ffff800014a184c0,ffff800014a18480) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda320,ffff8000149d6720) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff69e8,fffffd803efda320,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000149d6720,ffff800014a18a88,ffff800014a18b53) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000149d6720,ffff800014a18bc0,ffff800014a18c30) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff800014a18ca0) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffeef18,160fbd08ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffeeea0, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800014a18230 rbx 0xffff800014a182e0 rdx 0x2 rcx 0 rax 0 r8 0xffff800014a181f0 r9 0x1 r10 0 r11 0xe87197f2e98eb13e r12 0x3000000008 r13 0xffff800014a18240 r14 0x100 r15 0x1 rip 0xffffffff81a73678 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014a18220 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (ifconfig) pid=118737 stat=onproc flags process=2 proc=0 pri=17, usrpri=52, nice=20 forw=0xffffffffffffffff, list=0xffff8000149d6bd0,0xffffffff822b78f0 process=0xffff8000ffff69e8 user=0xffff800014a13000, vmspace=0xfffffd803f014e70 estcpu=2, cpticks=2, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *61837 118737 2446 0 7 0x2 ifconfig 2446 7838 44972 0 3 0x10008a pause sh 44972 385405 4691 0 3 0x82 wait syz-executor.0 84974 524123 1 0 3 0x100083 ttyin getty 25492 355882 4691 0 3 0x82 piperd syz-executor.1 29688 34571 0 0 3 0x14200 bored sosplice 4691 376497 63194 0 3 0x82 kqread syz-fuzzer 4691 470110 63194 0 3 0x4000082 thrsleep syz-fuzzer 4691 334518 63194 0 3 0x4000082 thrsleep syz-fuzzer 4691 319509 63194 0 3 0x4000082 thrsleep syz-fuzzer 4691 35990 63194 0 3 0x4000082 thrsleep syz-fuzzer 4691 78126 63194 0 3 0x4000082 thrsleep syz-fuzzer 4691 504760 63194 0 3 0x4000082 thrsleep syz-fuzzer 4691 247931 63194 0 3 0x4000082 thrsleep syz-fuzzer 63194 417459 97829 0 3 0x10008a pause ksh 97829 340618 92894 0 3 0x92 select sshd 92894 137750 1 0 3 0x80 select sshd 1833 419391 95112 73 2 0x100090 syslogd 95112 297175 1 0 3 0x100082 netio syslogd 43090 102167 1 77 3 0x100090 poll dhclient 30445 276874 1 0 3 0x80 poll dhclient 60702 467813 0 0 3 0x14200 pgzero zerothread 3627 286810 0 0 3 0x14200 aiodoned aiodoned 66127 23687 0 0 3 0x14200 syncer update 42711 468252 0 0 3 0x14200 cleaner cleaner 47971 74097 0 0 3 0x14200 reaper reaper 95149 296085 0 0 3 0x14200 pgdaemon pagedaemon 7089 214946 0 0 3 0x14200 bored crynlk 49269 194197 0 0 3 0x14200 bored crypto 60255 35179 0 0 3 0x40014200 acpi0 acpi0 1733 57748 0 0 3 0x14200 bored softnet 10162 263668 0 0 3 0x14200 bored systqmp 66706 311341 0 0 3 0x14200 bored systq 32786 379350 0 0 3 0x40014200 bored softclock 5391 393491 0 0 3 0x40014200 idle0 26994 493493 0 0 3 0x14200 bored smr 1 474379 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 9514 6347K 6991K 78643K 16609 0 0 pcb 23 9K 10K 78643K 2182 0 0 rtable 86 3K 4K 78643K 1188 0 0 ifaddr 55 13K 15K 78643K 357 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 109 0 0 iov 0 0K 32K 78643K 339 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1191 75K 76K 78643K 3360 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 34 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 311 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 6 17K 25K 78643K 3040 0 0 sigio 0 0K 0K 78643K 43 0 0 proc 44 46K 62K 78643K 1119 0 0 subproc 66 67586K 69634K 78643K 584 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 227 0 0 in_multi 22 1K 2K 78643K 249 0 0 ether_multi 1 0K 0K 78643K 20 0 0 mrt 0 0K 0K 78643K 8 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 96 424K 424K 78643K 96 0 0 exec 0 0K 1K 78643K 519 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 85 21K 29K 78643K 7953 0 0 UVM aobj 130 4K 4K 78643K 133 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 2223 0 0 NDP 12 0K 0K 78643K 114 0 0 temp 170 2711K 2839K 78643K 15767 0 0 kqueue 0 0K 0K 78643K 19 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 34 0 30 1 0 1 1 0 8 0 inpcbpl 280 2046 0 2039 1 0 1 1 0 8 0 plimitpl 152 113 0 106 1 0 1 1 0 8 0 rtentry 112 199 0 166 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 334 0 330 1 0 1 1 0 8 0 nd6 48 48 0 45 1 0 1 1 0 8 0 ppxss 1128 47 0 47 7 6 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 828 0 681 13 0 13 13 0 8 0 art_table 32 829 0 681 2 0 2 2 0 8 0 art_node 16 198 0 168 1 0 1 1 0 8 0 sysvmsgpl 40 18 0 8 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 309 0 299 1 0 1 1 0 8 0 shmpl 112 131 0 3 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 5520 0 4034 49 1 48 48 0 8 0 ffsino 240 5520 0 4034 88 0 88 88 0 8 0 nchpl 144 9515 0 7827 63 0 63 63 0 8 0 uvmvnodes 72 5926 0 0 108 0 108 108 0 8 0 vnodes 200 5926 0 0 312 0 312 312 0 8 0 namei 1024 29555 0 29554 2 1 1 1 0 8 0 scsiplug 64 2 0 2 2 2 0 1 0 8 0 scxspl 192 55627 0 55627 16 15 1 6 0 8 1 sigapl 432 3168 0 3154 2 0 2 2 0 8 0 futexpl 56 44586 0 44586 1 0 1 1 0 8 1 knotepl 112 810 0 789 1 0 1 1 0 8 0 kqueuepl 104 596 0 594 1 0 1 1 0 8 0 pipepl 112 1458 0 1439 4 3 1 2 0 8 0 fdescpl 424 3169 0 3154 2 0 2 2 0 8 0 filepl 120 16056 0 15962 4 0 4 4 0 8 1 lockfpl 104 704 0 704 3 2 1 1 0 8 1 lockfspl 48 255 0 255 3 2 1 1 0 8 1 sessionpl 112 35 0 25 1 0 1 1 0 8 0 pgrppl 48 59 0 49 1 0 1 1 0 8 0 ucredpl 96 2307 0 2300 1 0 1 1 0 8 0 zombiepl 144 3154 0 3154 3 2 1 1 0 8 1 processpl 840 3184 0 3154 4 0 4 4 0 8 0 procpl 600 6622 0 6585 4 0 4 4 0 8 0 sosppl 128 25 0 25 9 8 1 1 0 8 1 sockpl 384 2968 0 2951 3 0 3 3 0 8 1 mcl64k 65536 843 0 843 67 66 1 32 0 8 1 mcl16k 16384 6 0 6 4 4 0 1 0 8 0 mcl12k 12288 25 0 25 11 10 1 1 0 8 1 mcl9k 9216 31 0 31 6 6 0 1 0 8 0 mcl8k 8192 49 0 49 8 7 1 1 0 8 1 mcl4k 4096 730 0 730 4 3 1 1 0 8 1 mcl2k2 2112 14 0 14 9 9 0 1 0 8 0 mcl2k 2048 62834 0 62792 17 11 6 12 0 8 0 mtagpl 80 4 0 4 2 2 0 1 0 8 0 mbufpl 256 122244 0 122170 51 42 9 24 0 8 1 bufpl 256 44831 0 41723 198 0 198 198 0 8 0 anonpl 16 280343 0 271530 91 40 51 62 0 62 5 amapchunkpl 152 14614 0 14500 32 26 6 14 0 158 1 amappl16 192 13984 0 13381 75 37 38 43 0 8 6 amappl15 184 2017 0 2015 3 2 1 1 0 8 0 amappl14 176 698 0 695 2 1 1 1 0 8 0 amappl13 168 104 0 104 5 5 0 1 0 8 0 amappl12 160 161 0 160 1 0 1 1 0 8 0 amappl11 152 86 0 71 1 0 1 1 0 8 0 amappl10 144 156 0 153 2 1 1 1 0 8 0 amappl9 136 1693 0 1690 1 0 1 1 0 8 0 amappl8 128 1250 0 1230 1 0 1 1 0 8 0 amappl7 120 132 0 124 1 0 1 1 0 8 0 amappl6 112 73 0 65 1 0 1 1 0 8 0 amappl5 104 410 0 398 1 0 1 1 0 8 0 amappl4 96 3222 0 3195 2 1 1 2 0 8 0 amappl3 88 849 0 843 1 0 1 1 0 8 0 amappl2 80 27035 0 26991 2 0 2 2 0 8 0 amappl1 72 64788 0 64355 24 15 9 19 0 8 0 amappl 72 7113 0 7079 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 132 0 3 3 0 3 3 0 8 0 uaddrrnd 24 3169 0 3154 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 3169 0 3154 1 0 1 1 0 8 0 vmmpekpl 168 23585 0 23567 2 0 2 2 0 8 0 vmmpepl 168 321752 0 320251 189 99 90 94 0 357 18 vmsppl 264 3168 0 3154 2 1 1 2 0 8 0 pdppl 4096 6344 0 6308 6 1 5 6 0 8 0 pvpl 32 834469 0 822585 263 130 133 213 0 265 17 pmappl 200 3168 0 3154 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 465 0 137 11 0 11 11 0 8 0