panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *352158 11323 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(ffff8000149ee528,ffff8000149ee528,2feb7e182211820e) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda708,ffff8000149ee5d0,ffff8000149ee590) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda708,ffff8000ffff39e0) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff7078,fffffd803efda708,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000ffff39e0,ffff8000149eeb98,ffff8000149eec63) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000ffff39e0,ffff8000149eecd0,ffff8000149eed40) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff8000149eedb0) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffd25c8,3cb5ad08ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd2550, 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(ffff8000149ee528,ffff8000149ee528,2feb7e182211820e) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda708,ffff8000149ee5d0,ffff8000149ee590) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda708,ffff8000ffff39e0) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff7078,fffffd803efda708,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000ffff39e0,ffff8000149eeb98,ffff8000149eec63) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000ffff39e0,ffff8000149eecd0,ffff8000149eed40) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff8000149eedb0) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffd25c8,3cb5ad08ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd2550, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000149ee340 rbx 0xffff8000149ee3f0 rdx 0x2 rcx 0 rax 0 r8 0xffff8000149ee300 r9 0x1 r10 0 r11 0x5349101133b4951e r12 0x3000000008 r13 0xffff8000149ee350 r14 0x100 r15 0x1 rip 0xffffffff81a73678 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149ee330 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (ifconfig) pid=352158 stat=onproc flags process=2 proc=0 pri=17, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff4718,0xffffffff822b78f0 process=0xffff8000ffff7078 user=0xffff8000149e9000, vmspace=0xfffffd803f014c60 estcpu=0, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *11323 352158 33179 0 7 0x2 ifconfig 33179 166910 41730 0 3 0x10008a pause sh 41730 322183 73261 0 3 0x82 wait syz-executor.1 77448 482795 73261 0 2 0x2 syz-executor.0 30026 312194 0 0 3 0x14200 bored sosplice 73261 431637 54288 0 3 0x82 thrsleep syz-fuzzer 73261 424261 54288 0 3 0x4000082 nanosleep syz-fuzzer 73261 331859 54288 0 3 0x4000082 thrsleep syz-fuzzer 73261 456214 54288 0 3 0x4000082 thrsleep syz-fuzzer 73261 458614 54288 0 3 0x4000082 thrsleep syz-fuzzer 73261 164038 54288 0 3 0x4000082 kqread syz-fuzzer 73261 181258 54288 0 3 0x4000082 thrsleep syz-fuzzer 73261 518740 54288 0 3 0x4000082 thrsleep syz-fuzzer 54288 425186 44240 0 3 0x10008a pause ksh 44240 263016 61742 0 3 0x92 select sshd 38323 496440 1 0 3 0x100083 ttyin getty 61742 361700 1 0 3 0x80 select sshd 67398 498494 60277 73 2 0x100090 syslogd 60277 88908 1 0 3 0x100082 netio syslogd 61729 152098 1 77 3 0x100090 poll dhclient 34353 444007 1 0 3 0x80 poll dhclient 74701 100512 0 0 3 0x14200 pgzero zerothread 1434 150805 0 0 3 0x14200 aiodoned aiodoned 63604 191123 0 0 3 0x14200 syncer update 77353 469546 0 0 3 0x14200 cleaner cleaner 19095 87260 0 0 3 0x14200 reaper reaper 53421 350854 0 0 3 0x14200 pgdaemon pagedaemon 10512 343241 0 0 3 0x14200 bored crynlk 87969 377016 0 0 3 0x14200 bored crypto 33584 73662 0 0 3 0x40014200 acpi0 acpi0 50609 322309 0 0 3 0x14200 bored softnet 87177 157204 0 0 3 0x14200 bored systqmp 53069 513841 0 0 3 0x14200 bored systq 30433 32382 0 0 3 0x40014200 bored softclock 41994 22381 0 0 3 0x40014200 idle0 38856 65229 0 0 3 0x14200 bored smr 1 382696 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 9455 6316K 6836K 78643K 11125 0 0 pcb 23 9K 10K 78643K 151 0 0 rtable 86 3K 4K 78643K 333 0 0 ifaddr 37 10K 11K 78643K 80 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 19 0 0 iov 0 0K 12K 78643K 16 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1230 77K 77K 78643K 1455 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 5 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 26 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 6 17K 25K 78643K 241 0 0 proc 44 46K 62K 78643K 402 0 0 subproc 66 67586K 69634K 78643K 186 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 17 0 0 in_multi 22 1K 2K 78643K 59 0 0 ether_multi 1 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 218 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 80 20K 21K 78643K 1374 0 0 UVM aobj 6 2K 2K 78643K 8 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 23 0 0 temp 103 2764K 2825K 78643K 6268 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 122 0 115 1 0 1 1 0 8 0 plimitpl 152 25 0 18 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 26 0 26 2 2 0 1 0 8 0 tcpcb 544 44 0 40 1 0 1 1 0 8 0 nd6 48 12 0 9 1 0 1 1 0 8 0 ppxss 1128 6 0 6 1 0 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 277 0 132 12 0 12 12 0 8 1 art_table 32 278 0 132 2 0 2 2 0 8 0 art_node 16 66 0 36 1 0 1 1 0 8 0 sysvmsgpl 40 2 0 1 1 0 1 1 0 8 0 semapl 112 22 0 12 1 0 1 1 0 8 0 shmpl 112 6 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1695 0 275 46 0 46 46 0 8 0 ffsino 240 1695 0 275 84 0 84 84 0 8 0 nchpl 144 2163 0 519 61 0 61 61 0 8 0 uvmvnodes 72 1945 0 0 36 0 36 36 0 8 0 vnodes 200 1945 0 0 103 0 103 103 0 8 0 namei 1024 5816 0 5815 2 1 1 1 0 8 0 scsiplug 64 1 0 1 1 1 0 1 0 8 0 scxspl 192 12810 0 12810 8 7 1 6 0 8 1 sigapl 432 402 0 388 2 0 2 2 0 8 0 futexpl 56 3022 0 3022 1 0 1 1 0 8 1 knotepl 112 135 0 114 1 0 1 1 0 8 0 kqueuepl 104 40 0 38 1 0 1 1 0 8 0 pipepl 112 266 0 247 2 1 1 1 0 8 0 fdescpl 424 403 0 388 2 0 2 2 0 8 0 filepl 120 2128 0 2033 4 0 4 4 0 8 0 lockfpl 104 73 0 73 2 1 1 1 0 8 1 lockfspl 48 34 0 34 2 1 1 1 0 8 1 sessionpl 112 20 0 10 1 0 1 1 0 8 0 pgrppl 48 20 0 10 1 0 1 1 0 8 0 ucredpl 96 202 0 195 1 0 1 1 0 8 0 zombiepl 144 388 0 388 2 1 1 1 0 8 1 processpl 840 418 0 388 4 0 4 4 0 8 0 procpl 600 650 0 613 4 0 4 4 0 8 0 sosppl 128 3 0 3 1 1 0 1 0 8 0 sockpl 384 248 0 231 3 0 3 3 0 8 1 mcl64k 65536 2 0 2 2 1 1 1 0 8 1 mcl12k 12288 5 0 5 1 0 1 1 0 8 1 mcl9k 9216 1 0 1 1 0 1 1 0 8 1 mcl8k 8192 2 0 2 1 1 0 1 0 8 0 mcl4k 4096 18 0 18 2 1 1 1 0 8 1 mcl2k2 2112 2 0 2 1 1 0 1 0 8 0 mcl2k 2048 57727 0 57682 16 9 7 13 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 95134 0 95070 11 2 9 10 0 8 2 bufpl 256 18925 0 15818 199 1 198 198 0 8 0 anonpl 16 52153 0 43529 59 5 54 54 0 62 12 amapchunkpl 152 2192 0 2078 12 3 9 9 0 158 3 amappl16 192 1660 0 1115 40 3 37 40 0 8 8 amappl15 184 27 0 26 1 0 1 1 0 8 0 amappl14 176 43 0 40 2 1 1 1 0 8 0 amappl13 168 15 0 14 2 1 1 1 0 8 0 amappl12 160 99 0 98 1 0 1 1 0 8 0 amappl11 152 47 0 33 1 0 1 1 0 8 0 amappl10 144 114 0 111 2 1 1 1 0 8 0 amappl9 136 599 0 595 1 0 1 1 0 8 0 amappl8 128 169 0 155 1 0 1 1 0 8 0 amappl7 120 85 0 78 1 0 1 1 0 8 0 amappl6 112 54 0 46 1 0 1 1 0 8 0 amappl5 104 264 0 253 1 0 1 1 0 8 0 amappl4 96 604 0 579 2 1 1 2 0 8 0 amappl3 88 123 0 117 1 0 1 1 0 8 0 amappl2 80 2242 0 2199 2 0 2 2 0 8 0 amappl1 72 16939 0 16506 23 13 10 19 0 8 0 amappl 72 923 0 889 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 7 0 2 1 0 1 1 0 8 0 uaddrrnd 24 403 0 388 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 403 0 388 1 0 1 1 0 8 0 vmmpekpl 168 6892 0 6871 1 0 1 1 0 8 0 vmmpepl 168 50853 0 49417 104 15 89 89 0 357 21 vmsppl 264 402 0 388 2 1 1 2 0 8 0 pdppl 4096 812 0 776 6 1 5 6 0 8 0 pvpl 32 173917 0 162298 146 10 136 136 0 265 29 pmappl 200 402 0 388 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 342 0 19 10 0 10 10 0 8 0