panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *462523 17091 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(ffff8000149cbc08,ffff8000149cbc08,cf4fef6feec052fc) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda000,ffff8000149cbcb0,ffff8000149cbc70) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda000,ffff8000ffff8968) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff6358,fffffd803efda000,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000ffff8968,ffff8000149cc278,ffff8000149cc343) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000ffff8968,ffff8000149cc3b0,ffff8000149cc420) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff8000149cc490) at syscall+0x511 Xsyscall(6,72,1,72,7f7fffffaca8,12df57608ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffffac30, 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(ffff8000149cbc08,ffff8000149cbc08,cf4fef6feec052fc) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda000,ffff8000149cbcb0,ffff8000149cbc70) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda000,ffff8000ffff8968) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff6358,fffffd803efda000,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000ffff8968,ffff8000149cc278,ffff8000149cc343) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000ffff8968,ffff8000149cc3b0,ffff8000149cc420) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff8000149cc490) at syscall+0x511 Xsyscall(6,72,1,72,7f7fffffaca8,12df57608ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffffac30, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000149cba20 rbx 0xffff8000149cbad0 rdx 0x2 rcx 0 rax 0 r8 0xffff8000149cb9e0 r9 0x1 r10 0 r11 0x100569a57de85de7 r12 0x3000000008 r13 0xffff8000149cba30 r14 0x100 r15 0x1 rip 0xffffffff81a73678 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149cba10 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (ifconfig) pid=462523 stat=onproc flags process=2 proc=0 pri=17, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff8710,0xffffffff822b78f0 process=0xffff8000ffff6358 user=0xffff8000149c7000, vmspace=0xfffffd803f014000 estcpu=1, cpticks=1, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *17091 462523 20302 0 7 0x2 ifconfig 20302 403109 90415 0 3 0x10008a pause sh 90415 363527 44229 0 3 0x82 wait syz-executor.1 86562 515596 0 0 3 0x14200 bored sosplice 35281 87743 44229 0 3 0x82 piperd syz-executor.0 44229 424749 47761 0 3 0x82 thrsleep syz-fuzzer 44229 347668 47761 0 3 0x4000082 thrsleep syz-fuzzer 44229 367422 47761 0 3 0x4000082 kqread syz-fuzzer 44229 427777 47761 0 3 0x4000082 thrsleep syz-fuzzer 44229 12897 47761 0 3 0x4000082 thrsleep syz-fuzzer 44229 11014 47761 0 3 0x4000082 thrsleep syz-fuzzer 44229 382021 47761 0 3 0x4000082 thrsleep syz-fuzzer 44229 8176 47761 0 3 0x4000082 thrsleep syz-fuzzer 47761 484247 26216 0 3 0x10008a pause ksh 26216 40745 34980 0 3 0x92 select sshd 88973 518996 1 0 3 0x100083 ttyin getty 34980 217704 1 0 3 0x80 select sshd 40625 352441 18915 73 2 0x100090 syslogd 18915 463469 1 0 3 0x100082 netio syslogd 72281 379837 1 77 3 0x100090 poll dhclient 74437 472658 1 0 3 0x80 poll dhclient 65714 88684 0 0 3 0x14200 pgzero zerothread 1319 185597 0 0 3 0x14200 aiodoned aiodoned 39446 123006 0 0 3 0x14200 syncer update 30734 133366 0 0 3 0x14200 cleaner cleaner 29464 176924 0 0 3 0x14200 reaper reaper 63257 138150 0 0 3 0x14200 pgdaemon pagedaemon 43911 144616 0 0 3 0x14200 bored crynlk 53882 438335 0 0 3 0x14200 bored crypto 68099 246954 0 0 3 0x40014200 acpi0 acpi0 27506 426124 0 0 3 0x14200 bored softnet 39962 18805 0 0 3 0x14200 bored systqmp 865 406236 0 0 3 0x14200 bored systq 5330 85502 0 0 3 0x40014200 bored softclock 32972 391436 0 0 3 0x40014200 idle0 61963 160338 0 0 3 0x14200 bored smr 1 408586 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 9452 6315K 6834K 78643K 11153 0 0 pcb 23 9K 9K 78643K 145 0 0 rtable 83 2K 3K 78643K 215 0 0 ifaddr 35 9K 11K 78643K 45 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 19 0 0 iov 0 0K 14K 78643K 34 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1203 75K 75K 78643K 1420 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 6 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 1K 1K 78643K 18 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 6 17K 25K 78643K 263 0 0 sigio 0 0K 0K 78643K 2 0 0 proc 43 46K 62K 78643K 309 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 22 0 0 in_multi 22 1K 2K 78643K 46 0 0 ether_multi 1 0K 0K 78643K 4 0 0 mrt 0 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 42 185K 185K 78643K 42 0 0 exec 0 0K 1K 78643K 204 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 86 20K 23K 78643K 1378 0 0 UVM aobj 9 2K 2K 78643K 11 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 13 0 0 NDP 6 0K 0K 78643K 12 0 0 temp 100 2699K 2826K 78643K 5972 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 6 0 2 1 0 1 1 0 8 0 inpcbpl 280 128 0 121 2 1 1 2 0 8 0 plimitpl 152 25 0 18 1 0 1 1 0 8 0 rtentry 112 45 0 12 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 6 0 6 1 1 0 1 0 8 0 tcpcb 544 52 0 48 1 0 1 1 0 8 0 nd6 48 6 0 3 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 188 0 44 12 0 12 12 0 8 1 art_table 32 189 0 44 2 0 2 2 0 8 0 art_node 16 44 0 14 1 0 1 1 0 8 0 sysvmsgpl 40 4 0 2 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 16 0 6 1 0 1 1 0 8 0 shmpl 112 9 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1795 0 383 46 0 46 46 0 8 0 ffsino 240 1795 0 383 84 0 84 84 0 8 0 nchpl 144 2324 0 694 61 0 61 61 0 8 0 uvmvnodes 72 1994 0 0 37 0 37 37 0 8 0 vnodes 200 1994 0 0 105 0 105 105 0 8 0 namei 1024 6136 0 6135 2 1 1 1 0 8 0 scxspl 192 13819 0 13819 8 7 1 6 0 8 1 sigapl 432 430 0 416 2 0 2 2 0 8 0 futexpl 56 3623 0 3623 1 0 1 1 0 8 1 knotepl 112 119 0 98 2 1 1 2 0 8 0 kqueuepl 104 47 0 45 1 0 1 1 0 8 0 pipepl 112 258 0 239 2 1 1 1 0 8 0 fdescpl 424 431 0 416 2 0 2 2 0 8 0 filepl 120 2269 0 2175 4 0 4 4 0 8 1 lockfpl 104 80 0 80 2 1 1 1 0 8 1 lockfspl 48 30 0 30 2 1 1 1 0 8 1 sessionpl 112 18 0 8 1 0 1 1 0 8 0 pgrppl 48 20 0 10 1 0 1 1 0 8 0 ucredpl 96 293 0 286 1 0 1 1 0 8 0 zombiepl 144 416 0 416 2 1 1 1 0 8 1 processpl 840 446 0 416 4 0 4 4 0 8 0 procpl 600 722 0 685 4 0 4 4 0 8 1 sosppl 128 6 0 6 1 0 1 1 0 8 1 sockpl 384 244 0 227 3 0 3 3 0 8 1 mcl64k 65536 8 0 8 1 1 0 1 0 8 0 mcl16k 16384 2 0 2 1 1 0 1 0 8 0 mcl12k 12288 4 0 4 2 1 1 1 0 8 1 mcl9k 9216 2 0 2 1 1 0 1 0 8 0 mcl8k 8192 2 0 2 1 1 0 1 0 8 0 mcl4k 4096 18 0 18 2 1 1 1 0 8 1 mcl2k 2048 57231 0 57189 14 8 6 11 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 93722 0 93657 11 2 9 9 0 8 1 bufpl 256 19955 0 16845 199 1 198 198 0 8 0 anonpl 16 56713 0 48087 62 2 60 60 0 62 16 amapchunkpl 152 2049 0 1910 16 6 10 16 0 158 4 amappl16 192 2179 0 1630 47 11 36 40 0 8 8 amappl15 184 120 0 120 1 0 1 1 0 8 1 amappl14 176 29 0 27 2 1 1 1 0 8 0 amappl13 168 7 0 7 2 2 0 1 0 8 0 amappl12 160 20 0 17 1 0 1 1 0 8 0 amappl11 152 48 0 33 1 0 1 1 0 8 0 amappl10 144 62 0 60 2 1 1 1 0 8 0 amappl9 136 558 0 554 1 0 1 1 0 8 0 amappl8 128 144 0 127 1 0 1 1 0 8 0 amappl7 120 34 0 29 1 0 1 1 0 8 0 amappl6 112 57 0 47 1 0 1 1 0 8 0 amappl5 104 129 0 118 1 0 1 1 0 8 0 amappl4 96 625 0 600 2 1 1 2 0 8 0 amappl3 88 119 0 114 1 0 1 1 0 8 0 amappl2 80 2732 0 2688 2 0 2 2 0 8 1 amappl1 72 16729 0 16291 24 14 10 19 0 8 0 amappl 72 976 0 934 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 10 0 2 1 0 1 1 0 8 0 uaddrrnd 24 431 0 416 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 431 0 416 1 0 1 1 0 8 0 vmmpekpl 168 7103 0 7087 1 0 1 1 0 8 0 vmmpepl 168 53333 0 51882 123 30 93 105 0 357 25 vmsppl 264 430 0 416 2 1 1 2 0 8 0 pdppl 4096 868 0 832 6 1 5 6 0 8 0 pvpl 32 233411 0 221773 204 10 194 200 0 265 82 pmappl 200 430 0 416 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 340 0 19 10 0 10 10 0 8 0