panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *392797 88699 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(ffff8000149e1438,ffff8000149e1438,eb7228c78fd6b8f4) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda320,ffff8000149e14e0,ffff8000149e14a0) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda320,ffff8000ffff4970) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff800014953a58,fffffd803efda320,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000ffff4970,ffff8000149e1aa8,ffff8000149e1b73) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000ffff4970,ffff8000149e1be0,ffff8000149e1c50) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff8000149e1cc0) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffe8488,c9983d08ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe8410, 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(ffff8000149e1438,ffff8000149e1438,eb7228c78fd6b8f4) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda320,ffff8000149e14e0,ffff8000149e14a0) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda320,ffff8000ffff4970) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff800014953a58,fffffd803efda320,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000ffff4970,ffff8000149e1aa8,ffff8000149e1b73) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000ffff4970,ffff8000149e1be0,ffff8000149e1c50) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff8000149e1cc0) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffe8488,c9983d08ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe8410, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000149e1250 rbx 0xffff8000149e1300 rdx 0x2 rcx 0 rax 0 r8 0xffff8000149e1210 r9 0x1 r10 0 r11 0x2dc7db06c899b024 r12 0x3000000008 r13 0xffff8000149e1260 r14 0x100 r15 0x1 rip 0xffffffff81a73678 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149e1240 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (ifconfig) pid=392797 stat=onproc flags process=2 proc=0 pri=17, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff59d8,0xffffffff822b78f0 process=0xffff800014953a58 user=0xffff8000149dc000, vmspace=0xfffffd803f014630 estcpu=1, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *88699 392797 43983 0 7 0x2 ifconfig 43983 85031 12602 0 3 0x10008a pause sh 12602 322797 12316 0 3 0x82 wait syz-executor.0 33377 301575 1 0 3 0x100083 ttyin getty 415 175845 12316 0 3 0x82 piperd syz-executor.1 24549 386345 0 0 3 0x14200 bored sosplice 12316 449982 75496 0 3 0x82 thrsleep syz-fuzzer 12316 353361 75496 0 3 0x4000082 thrsleep syz-fuzzer 12316 324061 75496 0 3 0x4000082 kqread syz-fuzzer 12316 121782 75496 0 3 0x4000082 thrsleep syz-fuzzer 12316 288187 75496 0 3 0x4000082 thrsleep syz-fuzzer 12316 311077 75496 0 3 0x4000082 thrsleep syz-fuzzer 12316 382609 75496 0 3 0x4000082 thrsleep syz-fuzzer 12316 186506 75496 0 3 0x4000082 thrsleep syz-fuzzer 75496 276882 43918 0 3 0x10008a pause ksh 43918 261500 33291 0 3 0x92 select sshd 33291 264327 1 0 3 0x80 select sshd 80193 166024 39835 73 2 0x100090 syslogd 39835 508158 1 0 3 0x100082 netio syslogd 23640 305946 1 77 3 0x100090 poll dhclient 3910 397419 1 0 3 0x80 poll dhclient 21711 339218 0 0 3 0x14200 pgzero zerothread 61169 383555 0 0 3 0x14200 aiodoned aiodoned 64740 479121 0 0 3 0x14200 syncer update 35544 425458 0 0 3 0x14200 cleaner cleaner 65381 462111 0 0 3 0x14200 reaper reaper 99945 416331 0 0 3 0x14200 pgdaemon pagedaemon 31413 181329 0 0 3 0x14200 bored crynlk 27591 464062 0 0 3 0x14200 bored crypto 5270 33200 0 0 3 0x40014200 acpi0 acpi0 24714 436953 0 0 3 0x14200 bored softnet 59604 276940 0 0 3 0x14200 bored systqmp 57735 119041 0 0 3 0x14200 bored systq 12800 255890 0 0 3 0x40014200 bored softclock 88337 316243 0 0 3 0x40014200 idle0 24604 112225 0 0 3 0x14200 bored smr 1 78594 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 9491 6343K 6856K 78643K 13771 0 0 pcb 23 9K 10K 78643K 325 0 0 rtable 86 3K 4K 78643K 428 0 0 ifaddr 49 12K 13K 78643K 141 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 35 0 0 iov 0 0K 16K 78643K 60 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1203 75K 76K 78643K 2174 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 13 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 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 957 0 0 sigio 0 0K 0K 78643K 6 0 0 proc 44 46K 62K 78643K 495 0 0 subproc 66 67586K 69634K 78643K 170 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 55 0 0 in_multi 22 1K 2K 78643K 72 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 60 265K 265K 78643K 60 0 0 exec 0 0K 1K 78643K 258 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 84 20K 24K 78643K 3012 0 0 UVM aobj 41 3K 3K 78643K 43 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 1K 78643K 38 0 0 NDP 10 0K 0K 78643K 41 0 0 temp 155 2707K 2835K 78643K 8593 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 10 0 6 1 0 1 1 0 8 0 inpcbpl 280 330 0 323 1 0 1 1 0 8 0 plimitpl 152 54 0 47 1 0 1 1 0 8 0 rtentry 112 67 0 34 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 4 0 4 1 1 0 1 0 8 0 tcpcb 544 126 0 122 1 0 1 1 0 8 0 nd6 48 12 0 9 1 0 1 1 0 8 0 ppxss 1128 12 0 12 4 3 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 279 0 132 12 0 12 12 0 8 1 art_table 32 280 0 132 2 0 2 2 0 8 0 art_node 16 66 0 36 1 0 1 1 0 8 0 sysvmsgpl 40 8 0 2 1 0 1 1 0 8 0 semapl 112 88 0 78 1 0 1 1 0 8 0 shmpl 112 41 0 2 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2744 0 1321 46 0 46 46 0 8 0 ffsino 240 2744 0 1321 84 0 84 84 0 8 0 nchpl 144 4176 0 2536 61 0 61 61 0 8 0 uvmvnodes 72 3574 0 0 65 0 65 65 0 8 0 vnodes 200 3574 0 0 189 0 189 189 0 8 0 namei 1024 12759 0 12758 2 1 1 1 0 8 0 scsiplug 64 2 0 2 1 1 0 1 0 8 0 scxspl 192 24822 0 24822 9 8 1 6 0 8 1 sigapl 432 1122 0 1108 2 0 2 2 0 8 0 futexpl 56 13812 0 13812 1 0 1 1 0 8 1 knotepl 112 211 0 190 1 0 1 1 0 8 0 kqueuepl 104 136 0 134 1 0 1 1 0 8 0 pipepl 112 502 0 483 2 1 1 1 0 8 0 fdescpl 424 1123 0 1108 2 0 2 2 0 8 0 filepl 120 5906 0 5812 4 0 4 4 0 8 1 lockfpl 104 270 0 270 2 1 1 1 0 8 1 lockfspl 48 96 0 96 2 1 1 1 0 8 1 sessionpl 112 24 0 14 1 0 1 1 0 8 0 pgrppl 48 30 0 20 1 0 1 1 0 8 0 ucredpl 96 1077 0 1070 1 0 1 1 0 8 0 zombiepl 144 1108 0 1108 2 1 1 1 0 8 1 processpl 840 1138 0 1108 4 0 4 4 0 8 0 procpl 600 2259 0 2222 4 0 4 4 0 8 1 sosppl 128 8 0 8 2 2 0 1 0 8 0 sockpl 384 614 0 597 3 0 3 3 0 8 1 mcl64k 65536 273 0 273 33 33 0 32 0 8 0 mcl16k 16384 1 0 1 1 1 0 1 0 8 0 mcl12k 12288 19 0 19 3 2 1 1 0 8 1 mcl9k 9216 7 0 7 4 4 0 1 0 8 0 mcl8k 8192 4 0 4 3 3 0 1 0 8 0 mcl4k 4096 42 0 42 2 1 1 1 0 8 1 mcl2k2 2112 2 0 2 2 2 0 1 0 8 0 mcl2k 2048 58919 0 58875 14 7 7 10 0 8 1 mtagpl 80 4 0 2 2 1 1 1 0 8 0 mbufpl 256 100769 0 100696 28 20 8 21 0 8 0 bufpl 256 25280 0 22173 199 1 198 198 0 8 0 anonpl 16 104705 0 95920 76 16 60 61 0 62 14 amapchunkpl 152 4646 0 4547 9 3 6 7 0 158 1 amappl16 192 5157 0 4551 56 17 39 43 0 8 8 amappl14 176 276 0 269 2 1 1 1 0 8 0 amappl13 168 202 0 202 2 2 0 1 0 8 0 amappl12 160 374 0 374 2 1 1 1 0 8 1 amappl11 152 48 0 34 1 0 1 1 0 8 0 amappl10 144 169 0 169 4 3 1 1 0 8 1 amappl9 136 571 0 568 1 0 1 1 0 8 0 amappl8 128 172 0 150 1 0 1 1 0 8 0 amappl7 120 136 0 129 1 0 1 1 0 8 0 amappl6 112 52 0 45 1 0 1 1 0 8 0 amappl5 104 539 0 526 1 0 1 1 0 8 0 amappl4 96 978 0 952 2 1 1 2 0 8 0 amappl3 88 516 0 509 1 0 1 1 0 8 0 amappl2 80 8830 0 8787 3 1 2 2 0 8 0 amappl1 72 29566 0 29132 24 15 9 19 0 8 0 amappl 72 2533 0 2499 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 42 0 2 1 0 1 1 0 8 0 uaddrrnd 24 1123 0 1108 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1123 0 1108 1 0 1 1 0 8 0 vmmpekpl 168 10733 0 10711 2 0 2 2 0 8 0 vmmpepl 168 120868 0 119367 148 58 90 90 0 357 16 vmsppl 264 1122 0 1108 2 1 1 2 0 8 0 pdppl 4096 2252 0 2216 6 1 5 6 0 8 0 pvpl 32 322941 0 311119 190 37 153 153 0 265 37 pmappl 200 1122 0 1108 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 391 0 70 11 0 11 11 0 8 0