panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *257489 32459 0 0x2 0 1K 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(ffff800020c31188,ffff800020c31188,8ce379e87fc9501b) at ufs_dirbadentry VOP_LOOKUP(fffffd807efbd4b0,ffff800020c31230,ffff800020c311f0) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd807efbd4b0,ffff800020b38e28) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode() at unveil_add_vnode+0x221 sys/kern/kern_unveil.c:471 unveil_add(ffff800020b38e28,ffff800020c317f8,ffff800020c318c3) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff800020b38e28,ffff800020c31930,ffff800020c319a0) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff800020c31a10) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c31a10) at syscall+0x552 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,72,1,72,7f7ffffd8c08,889bd08ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd8b90, 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{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic bad dir ddb{1}> 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(ffff800020c31188,ffff800020c31188,8ce379e87fc9501b) at ufs_dirbadentry VOP_LOOKUP(fffffd807efbd4b0,ffff800020c31230,ffff800020c311f0) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd807efbd4b0,ffff800020b38e28) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode() at unveil_add_vnode+0x221 sys/kern/kern_unveil.c:471 unveil_add(ffff800020b38e28,ffff800020c317f8,ffff800020c318c3) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff800020b38e28,ffff800020c31930,ffff800020c319a0) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff800020c31a10) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c31a10) at syscall+0x552 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,72,1,72,7f7ffffd8c08,889bd08ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd8b90, count: -10 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800020c30fa0 rbx 0xffff800020c31050 rdx 0xffff800020b38e28 rcx 0 rax 0 r8 0xffffffff812d2ac3 kprintf+0x173 r9 0x1 r10 0x25 r11 0xc0d318c3f5771943 r12 0x3000000008 r13 0xffff800020c30fb0 r14 0x100 r15 0x1 rip 0xffffffff816ce868 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c30f90 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (ifconfig) pid=257489 stat=onproc flags process=2 proc=0 pri=17, usrpri=55, nice=20 forw=0xffffffffffffffff, list=0xffff800020b39788,0xffffffff82341258 process=0xffff800020b8d710 user=0xffff800020c2c000, vmspace=0xfffffd807effe2d0 estcpu=5, cpticks=2, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND *32459 257489 40568 0 7 0x2 ifconfig 40568 218092 58910 0 3 0x10008a pause sh 58910 72182 97123 0 3 0x82 wait syz-executor.0 73631 331430 0 0 3 0x14200 bored sosplice 94857 94376 97123 0 3 0x82 piperd syz-executor.1 97123 84878 68416 0 3 0x82 thrsleep syz-fuzzer 97123 420148 68416 0 3 0x4000082 thrsleep syz-fuzzer 97123 411763 68416 0 3 0x4000082 thrsleep syz-fuzzer 97123 194765 68416 0 3 0x4000082 thrsleep syz-fuzzer 97123 86664 68416 0 3 0x4000082 thrsleep syz-fuzzer 97123 10874 68416 0 3 0x4000082 thrsleep syz-fuzzer 97123 285009 68416 0 3 0x4000082 thrsleep syz-fuzzer 97123 168695 68416 0 3 0x4000082 thrsleep syz-fuzzer 97123 168367 68416 0 3 0x4000082 thrsleep syz-fuzzer 97123 440948 68416 0 3 0x4000082 thrsleep syz-fuzzer 97123 40703 68416 0 3 0x4000082 kqread syz-fuzzer 68416 183527 80939 0 3 0x10008a pause ksh 80939 160316 26612 0 3 0x92 select sshd 35848 217972 1 0 3 0x100083 ttyin getty 26612 383030 1 0 3 0x80 select sshd 76026 262447 828 74 3 0x100092 bpf pflogd 828 66229 1 0 3 0x80 netio pflogd 42773 78750 32481 73 2 0x100090 syslogd 32481 247994 1 0 3 0x100082 netio syslogd 86484 424002 1 77 3 0x100090 poll dhclient 5834 187315 1 0 3 0x80 poll dhclient 87313 354768 0 0 3 0x14200 pgzero zerothread 6792 174615 0 0 3 0x14200 aiodoned aiodoned 44428 417763 0 0 3 0x14200 syncer update 66744 341905 0 0 3 0x14200 cleaner cleaner 17501 210550 0 0 3 0x14200 reaper reaper 96394 398966 0 0 3 0x14200 pgdaemon pagedaemon 48497 156688 0 0 3 0x14200 bored crynlk 14439 122929 0 0 3 0x14200 bored crypto 76353 116818 0 0 3 0x40014200 acpi0 acpi0 64549 246823 0 0 3 0x40014200 idle1 82858 102391 0 0 3 0x14200 bored softnet 49795 204076 0 0 3 0x14200 bored systqmp 93028 33051 0 0 3 0x14200 bored systq 60628 9717 0 0 3 0x40014200 bored softclock 80049 75654 0 0 7 0x40014200 idle0 85192 8855 0 0 3 0x14200 bored smr 1 49125 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 32459 (ifconfig) thread 0xffff800020b38e28 (257489) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82390318) #0 witness_lock+0x52e sys/kern/subr_witness.c:1161 #1 __mp_acquire_count+0x51 sys/kern/kern_lock.c:227 #2 mi_switch+0x38c sys/kern/sched_bsd.c:439 #3 sleep_finish+0x110 sys/kern/kern_synch.c:303 #4 sleep_finish_all+0x34 sleep_finish_timeout sys/kern/kern_synch.c:327 [inline] #4 sleep_finish_all+0x34 sys/kern/kern_synch.c:157 #5 tsleep+0x195 sys/kern/kern_synch.c:149 #6 biowait+0xa1 sys/kern/vfs_bio.c:1228 #7 ffs_bufatoff+0x14f sys/ufs/ffs/ffs_subr.c:71 #8 ufs_lookup+0x48d sys/ufs/ufs/ufs_lookup.c:258 #9 VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 #10 unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 #11 unveil_add_vnode+0x221 sys/kern/kern_unveil.c:471 #12 unveil_add+0x273 sys/kern/kern_unveil.c:597 #13 sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 #14 syscall+0x552 mi_syscall sys/sys/syscall_mi.h:99 [inline] #14 syscall+0x552 sys/arch/amd64/amd64/trap.c:574 #15 Xsyscall+0x128 exclusive rrwlock inode r = 0 (0xfffffd807ed14808) #0 witness_lock+0x52e sys/kern/subr_witness.c:1161 #1 rw_enter+0x414 sys/kern/kern_rwlock.c:278 #2 rrw_enter+0x4f sys/kern/kern_rwlock.c:407 #3 VOP_LOCK+0x4b sys/kern/vfs_vops.c:602 #4 vn_lock+0x6e sys/kern/vfs_vnops.c:549 #5 vget+0x1c3 sys/kern/vfs_subr.c:672 #6 unveil_find_cover+0x10d sys/kern/kern_unveil.c:286 #7 unveil_add_vnode+0x221 sys/kern/kern_unveil.c:471 #8 unveil_add+0x273 sys/kern/kern_unveil.c:597 #9 sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 #10 syscall+0x552 mi_syscall sys/sys/syscall_mi.h:99 [inline] #10 syscall+0x552 sys/arch/amd64/amd64/trap.c:574 #11 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9486 6392K 6847K 78643K 11323 0 0 pcb 25 9K 10K 78643K 205 0 0 rtable 86 3K 4K 78643K 495 0 0 ifaddr 43 11K 12K 78643K 96 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1480 0 0 iov 0 0K 20K 78643K 188 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 76K 78643K 1559 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 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 58 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 6 17K 25K 78643K 525 0 0 sigio 0 0K 0K 78643K 8 0 0 proc 55 70K 91K 78643K 615 0 0 subproc 66 67586K 69634K 78643K 306 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 25 0 0 in_multi 22 1K 2K 78643K 106 0 0 ether_multi 1 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 308 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 88 21K 29K 78643K 2483 0 0 UVM aobj 20 2K 2K 78643K 20 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 8 0K 0K 78643K 33 0 0 temp 124 2725K 2853K 78643K 7678 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{1}> 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 229 0 222 1 0 1 1 0 8 0 plimitpl 152 36 0 28 1 0 1 1 0 8 0 plcache 128 20 0 0 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 tcpcb 544 54 0 50 1 0 1 1 0 8 0 nd6 48 24 0 21 1 0 1 1 0 8 0 ppxss 1128 2 0 2 1 1 0 1 0 8 0 pfosfp 40 846 0 423 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfstitem 24 13 0 6 1 0 1 1 0 8 0 pfstkey 112 13 0 6 1 0 1 1 0 8 0 pfstate 328 13 0 6 1 0 1 1 0 8 0 pfrule 1360 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 452 0 308 12 0 12 12 0 8 0 art_table 32 453 0 308 2 0 2 2 0 8 0 art_node 16 110 0 80 1 0 1 1 0 8 0 sysvmsgpl 40 8 0 0 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 52 0 42 1 0 1 1 0 8 0 shmpl 112 18 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2097 0 681 46 0 46 46 0 8 0 ffsino 272 2097 0 681 96 1 95 96 0 8 0 nchpl 144 3002 0 1379 61 0 61 61 0 8 0 uvmvnodes 72 2431 0 0 45 0 45 45 0 8 0 vnodes 200 2431 0 0 128 0 128 128 0 8 0 namei 1024 8421 0 8420 3 2 1 1 0 8 0 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 26255 0 26255 13 10 3 6 0 8 3 sigapl 432 703 0 687 3 1 2 3 0 8 0 futexpl 56 4265 0 4265 1 0 1 1 0 8 1 knotepl 112 219 0 198 1 0 1 1 0 8 0 kqueuepl 104 56 0 54 1 0 1 1 0 8 0 pipepl 112 364 0 345 2 1 1 1 0 8 0 fdescpl 488 704 0 687 4 1 3 3 0 8 0 filepl 152 3307 0 3208 5 0 5 5 0 8 1 lockfpl 104 416 0 416 3 2 1 1 0 8 1 lockfspl 48 131 0 131 3 2 1 1 0 8 1 sessionpl 112 25 0 14 1 0 1 1 0 8 0 pgrppl 48 34 0 23 1 0 1 1 0 8 0 ucredpl 96 322 0 313 1 0 1 1 0 8 0 zombiepl 144 687 0 687 3 2 1 1 0 8 1 processpl 840 720 0 687 4 0 4 4 0 8 0 procpl 600 1530 0 1487 4 0 4 4 0 8 0 srpgc 64 42 0 42 2 1 1 1 0 8 1 sosppl 128 5 0 5 1 1 0 1 0 8 0 sockpl 384 384 0 365 4 1 3 3 0 8 1 mcl64k 65536 258 0 0 33 3 30 33 0 8 0 mcl16k 16384 1 0 0 1 0 1 1 0 8 0 mcl12k 12288 3 0 0 1 0 1 1 0 8 0 mcl9k 9216 3 0 0 1 0 1 1 0 8 0 mcl8k 8192 2 0 0 1 0 1 1 0 8 0 mcl4k 4096 5 0 0 1 0 1 1 0 8 0 mcl2k 2048 116 0 0 14 0 14 14 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 377 0 0 23 0 23 23 0 8 0 bufpl 256 30047 0 23835 391 2 389 390 0 8 0 anonpl 16 96817 0 87857 66 18 48 59 0 125 2 amapchunkpl 152 4383 0 4264 13 3 10 10 0 158 5 amappl16 192 4428 0 3831 53 20 33 43 0 8 2 amappl15 184 183 0 182 1 0 1 1 0 8 0 amappl14 176 79 0 74 2 1 1 1 0 8 0 amappl13 168 25 0 25 2 2 0 1 0 8 0 amappl12 160 29 0 26 1 0 1 1 0 8 0 amappl11 152 67 0 48 1 0 1 1 0 8 0 amappl10 144 84 0 82 1 0 1 1 0 8 0 amappl9 136 678 0 674 1 0 1 1 0 8 0 amappl8 128 207 0 192 1 0 1 1 0 8 0 amappl7 120 62 0 56 1 0 1 1 0 8 0 amappl6 112 65 0 56 1 0 1 1 0 8 0 amappl5 104 161 0 147 1 0 1 1 0 8 0 amappl4 96 934 0 901 2 1 1 2 0 8 0 amappl3 88 136 0 130 1 0 1 1 0 8 0 amappl2 80 4586 0 4540 2 0 2 2 0 8 0 amappl1 72 25966 0 25505 25 15 10 20 0 8 0 amappl 72 1882 0 1846 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 19 0 0 1 0 1 1 0 8 0 uaddrrnd 24 704 0 687 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 704 0 687 1 0 1 1 0 8 0 vmmpekpl 168 9255 0 9230 2 0 2 2 0 8 0 vmmpepl 168 85196 0 83628 139 46 93 110 0 357 20 vmsppl 360 703 0 687 2 0 2 2 0 8 0 pdppl 4096 1416 0 1374 7 1 6 6 0 8 0 pvpl 32 298789 0 286641 154 21 133 149 0 265 13 pmappl 232 703 0 687 2 1 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 591 0 12 17 0 17 17 0 8 0