panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *186878 58444 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(ffff800020c1af48,ffff800020c1af48,a59a5b6bb6295083) at ufs_dirbadentry VOP_LOOKUP(fffffd807efbd640,ffff800020c1aff0,ffff800020c1afb0) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd807efbd640,ffff800020b39530) 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(ffff800020b39530,ffff800020c1b5b8,ffff800020c1b683) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff800020b39530,ffff800020c1b6f0,ffff800020c1b760) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff800020c1b7d0) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c1b7d0) at syscall+0x552 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,72,1,72,7f7fffff88f8,17af88f08ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff8880, 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(ffff800020c1af48,ffff800020c1af48,a59a5b6bb6295083) at ufs_dirbadentry VOP_LOOKUP(fffffd807efbd640,ffff800020c1aff0,ffff800020c1afb0) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd807efbd640,ffff800020b39530) 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(ffff800020b39530,ffff800020c1b5b8,ffff800020c1b683) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff800020b39530,ffff800020c1b6f0,ffff800020c1b760) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff800020c1b7d0) at syscall+0x552 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c1b7d0) at syscall+0x552 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,72,1,72,7f7fffff88f8,17af88f08ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff8880, count: -10 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800020c1ad60 rbx 0xffff800020c1ae10 rdx 0xffff800020b39530 rcx 0 rax 0 r8 0xffffffff812d2ac3 kprintf+0x173 r9 0x1 r10 0x25 r11 0xa894f16a6108e75d r12 0x3000000008 r13 0xffff800020c1ad70 r14 0x100 r15 0x1 rip 0xffffffff816ce868 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c1ad50 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (ifconfig) pid=186878 stat=onproc flags process=2 proc=0 pri=17, usrpri=53, nice=20 forw=0xffffffffffffffff, list=0xffff800020b392d8,0xffffffff82341258 process=0xffff800020b8d710 user=0xffff800020c16000, vmspace=0xfffffd807effe000 estcpu=3, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND *58444 186878 73861 0 7 0x2 ifconfig 73861 20745 13005 0 3 0x10008a pause sh 13005 280020 67412 0 3 0x82 wait syz-executor.1 94971 229025 5532 0 3 0 vmmaplk syz-executor.0 94971 488555 5532 0 3 0x4000000 physio syz-executor.0 19047 125879 0 0 3 0x14200 bored sosplice 5532 251234 67412 0 3 0x82 nanosleep syz-executor.0 67412 419751 99614 0 3 0x82 thrsleep syz-fuzzer 67412 260069 99614 0 3 0x4000082 thrsleep syz-fuzzer 67412 293642 99614 0 3 0x4000082 thrsleep syz-fuzzer 67412 156154 99614 0 3 0x4000082 thrsleep syz-fuzzer 67412 437002 99614 0 3 0x4000082 thrsleep syz-fuzzer 67412 156852 99614 0 3 0x4000082 thrsleep syz-fuzzer 67412 119272 99614 0 3 0x4000082 thrsleep syz-fuzzer 67412 335826 99614 0 3 0x4000082 thrsleep syz-fuzzer 67412 103788 99614 0 3 0x4000082 kqread syz-fuzzer 67412 10846 99614 0 3 0x4000082 thrsleep syz-fuzzer 99614 462718 17528 0 3 0x10008a pause ksh 17528 344102 12062 0 3 0x92 select sshd 91992 33394 1 0 3 0x100083 ttyin getty 12062 21551 1 0 3 0x80 select sshd 69242 390928 47632 74 3 0x100092 bpf pflogd 47632 16551 1 0 3 0x80 netio pflogd 9630 112236 93190 73 2 0x100090 syslogd 93190 56223 1 0 3 0x100082 netio syslogd 62862 311365 1 77 3 0x100090 poll dhclient 33824 508258 1 0 3 0x80 poll dhclient 10884 441860 0 0 3 0x14200 pgzero zerothread 6298 512036 0 0 3 0x14200 aiodoned aiodoned 54312 433365 0 0 3 0x14200 syncer update 40563 307832 0 0 3 0x14200 cleaner cleaner 51375 283320 0 0 3 0x14200 reaper reaper 57313 302461 0 0 3 0x14200 pgdaemon pagedaemon 62070 495128 0 0 3 0x14200 bored crynlk 56878 211740 0 0 3 0x14200 bored crypto 26655 335162 0 0 3 0x40014200 acpi0 acpi0 92530 315265 0 0 3 0x40014200 idle1 84810 501830 0 0 3 0x14200 bored softnet 90793 4524 0 0 3 0x14200 bored systqmp 33944 69054 0 0 3 0x14200 bored systq 27207 220740 0 0 3 0x40014200 bored softclock 34298 376607 0 0 7 0x40014200 idle0 59724 436710 0 0 3 0x14200 bored smr 1 306424 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 58444 (ifconfig) thread 0xffff800020b39530 (186878) 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 (0xfffffd807ed146f8) #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 Process 94971 (syz-executor.0) thread 0xffff800020b38270 (488555) shared rwlock vmmaplk r = 0 (0xfffffd807effe720) #0 witness_lock+0x52e sys/kern/subr_witness.c:1161 #1 uvm_vslock_device+0x11e sys/uvm/uvm_glue.c:174 #2 physio+0x26a sys/kern/kern_physio.c:139 #3 spec_write+0xd7 sys/kern/spec_vnops.c:310 #4 VOP_WRITE+0x6a sys/kern/vfs_vops.c:268 #5 vn_write+0x208 sys/kern/vfs_vnops.c:397 #6 dofilewritev+0x1a9 sys/kern/sys_generic.c:364 #7 sys_pwritev+0xb8 sys/kern/vfs_syscalls.c:3161 #8 syscall+0x552 mi_syscall sys/sys/syscall_mi.h:99 [inline] #8 syscall+0x552 sys/arch/amd64/amd64/trap.c:574 #9 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9468 6388K 6840K 78643K 10653 0 0 pcb 25 9K 12K 78643K 99 0 0 rtable 86 3K 4K 78643K 221 0 0 ifaddr 37 10K 11K 78643K 49 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1471 0 0 iov 0 0K 12K 78643K 4 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1206 76K 76K 78643K 1257 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 1K 78643K 2 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 7 0K 0K 78643K 7 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 7 21K 25K 78643K 78 0 0 proc 54 70K 91K 78643K 365 0 0 subproc 66 67586K 69634K 78643K 102 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 14 0 0 in_multi 22 1K 2K 78643K 40 0 0 ether_multi 1 0K 0K 78643K 4 0 0 mrt 0 0K 0K 78643K 3 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 215 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 90 21K 21K 78643K 1088 0 0 UVM aobj 4 2K 2K 78643K 4 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 4 0 0 NDP 6 0K 0K 78643K 12 0 0 temp 93 2717K 2781K 78643K 5895 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 6 0 2 1 0 1 1 0 8 0 inpcbpl 280 71 0 64 1 0 1 1 0 8 0 plimitpl 152 17 0 9 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 46 0 13 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 16 0 12 1 0 1 1 0 8 0 rttmr 72 1 0 1 1 0 1 1 0 8 1 nd6 48 6 0 3 1 0 1 1 0 8 0 ppxss 1128 1 0 1 1 0 1 1 0 8 1 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 2 1 0 1 1 0 8 0 pfstkey 112 13 0 2 1 0 1 1 0 8 0 pfstate 328 13 0 2 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 189 0 44 12 0 12 12 0 8 2 art_table 32 190 0 44 2 0 2 2 0 8 0 art_node 16 45 0 15 1 0 1 1 0 8 0 semupl 112 1 0 1 1 0 1 1 0 8 1 semapl 112 5 0 0 1 0 1 1 0 8 0 shmpl 112 2 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1502 0 81 46 0 46 46 0 8 0 ffsino 272 1502 0 81 95 0 95 95 0 8 0 nchpl 144 1799 0 157 61 0 61 61 0 8 0 uvmvnodes 72 1587 0 0 29 0 29 29 0 8 0 vnodes 200 1587 0 0 84 0 84 84 0 8 0 namei 1024 4681 0 4680 3 2 1 1 0 8 0 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 11029 0 11028 7 6 1 6 0 8 0 sigapl 432 274 0 257 3 0 3 3 0 8 1 futexpl 56 581 0 581 1 0 1 1 0 8 1 knotepl 112 67 0 46 1 0 1 1 0 8 0 kqueuepl 104 10 0 8 1 0 1 1 0 8 0 pipepl 112 198 0 179 3 1 2 2 0 8 1 fdescpl 488 275 0 257 5 2 3 3 0 8 0 filepl 152 1391 0 1289 8 1 7 7 0 8 3 lockfpl 104 31 0 31 2 1 1 1 0 8 1 lockfspl 48 8 0 8 2 1 1 1 0 8 1 sessionpl 112 19 0 8 1 0 1 1 0 8 0 pgrppl 48 19 0 8 1 0 1 1 0 8 0 ucredpl 96 81 0 72 1 0 1 1 0 8 0 zombiepl 144 257 0 257 3 2 1 1 0 8 1 processpl 840 291 0 257 4 0 4 4 0 8 0 procpl 600 385 0 341 4 0 4 4 0 8 0 srpgc 64 7 0 7 1 0 1 1 0 8 1 sosppl 128 2 0 2 1 0 1 1 0 8 1 sockpl 384 143 0 124 6 1 5 5 0 8 3 mcl9k 9216 1 0 0 1 0 1 1 0 8 0 mcl4k 4096 6 0 0 1 0 1 1 0 8 0 mcl2k 2048 146 0 0 17 0 17 17 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 193 0 0 11 0 11 11 0 8 0 bufpl 256 18795 0 12576 390 0 390 390 0 8 0 anonpl 16 38677 0 26060 53 2 51 51 0 125 0 amapchunkpl 152 1225 0 1103 7 1 6 6 0 158 1 amappl16 192 1090 0 301 40 0 40 40 0 8 0 amappl14 176 54 0 48 2 1 1 1 0 8 0 amappl13 168 24 0 23 3 2 1 1 0 8 0 amappl12 160 13 0 10 1 0 1 1 0 8 0 amappl11 152 46 0 27 1 0 1 1 0 8 0 amappl10 144 74 0 69 1 0 1 1 0 8 0 amappl9 136 602 0 598 1 0 1 1 0 8 0 amappl8 128 142 0 128 1 0 1 1 0 8 0 amappl7 120 36 0 31 1 0 1 1 0 8 0 amappl6 112 55 0 49 1 0 1 1 0 8 0 amappl5 104 119 0 105 1 0 1 1 0 8 0 amappl4 96 493 0 466 2 1 1 2 0 8 0 amappl3 88 164 0 153 1 0 1 1 0 8 0 amappl2 80 1100 0 1043 3 1 2 2 0 8 0 amappl1 72 15801 0 15322 25 14 11 20 0 8 1 amappl 72 643 0 606 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 3 0 0 1 0 1 1 0 8 0 uaddrrnd 24 275 0 257 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 275 0 257 1 0 1 1 0 8 0 vmmpekpl 168 6294 0 6267 2 0 2 2 0 8 0 vmmpepl 168 38358 0 36510 131 19 112 112 0 357 30 vmsppl 360 274 0 257 2 0 2 2 0 8 0 pdppl 4096 558 0 514 8 2 6 6 0 8 0 pvpl 32 137755 0 121910 138 9 129 129 0 265 0 pmappl 232 274 0 257 2 0 2 2 0 8 1 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 546 0 7 16 0 16 16 0 8 0