panic: bad dir Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *292309 89473 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(ffff8000149fb898,ffff8000149fb898,307f888167f49ed6) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda640,ffff8000149fb940,ffff8000149fb900) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda640,ffff8000ffff2e28) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff6d30,fffffd803efda640,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000ffff2e28,ffff8000149fbf08,ffff8000149fbfd3) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000ffff2e28,ffff8000149fc040,ffff8000149fc0b0) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff8000149fc120) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffbdad8,54976908ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffbda60, 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(ffff8000149fb898,ffff8000149fb898,307f888167f49ed6) at ufs_dirbadentry VOP_LOOKUP(fffffd803efda640,ffff8000149fb940,ffff8000149fb900) at VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:90 unveil_find_cover(fffffd803efda640,ffff8000ffff2e28) at unveil_find_cover+0x139 sys/kern/kern_unveil.c:290 unveil_add_vnode(ffff8000ffff6d30,fffffd803efda640,0) at unveil_add_vnode+0x23c sys/kern/kern_unveil.c:471 unveil_add(ffff8000ffff2e28,ffff8000149fbf08,ffff8000149fbfd3) at unveil_add+0x273 sys/kern/kern_unveil.c:597 sys_unveil(ffff8000ffff2e28,ffff8000149fc040,ffff8000149fc0b0) at sys_unveil+0x405 sys/kern/vfs_syscalls.c:937 syscall(ffff8000149fc120) at syscall+0x511 Xsyscall(6,72,1,72,7f7ffffbdad8,54976908ac8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffbda60, count: -10 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000149fb6b0 rbx 0xffff8000149fb760 rdx 0x2 rcx 0 rax 0 r8 0xffff8000149fb670 r9 0x1 r10 0 r11 0x6be87490c705b4d9 r12 0x3000000008 r13 0xffff8000149fb6c0 r14 0x100 r15 0x1 rip 0xffffffff81a73678 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149fb6a0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (ifconfig) pid=292309 stat=onproc flags process=2 proc=0 pri=17, usrpri=75, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff24c8,0xffffffff822b78f0 process=0xffff8000ffff6d30 user=0xffff8000149f7000, vmspace=0xfffffd803f014e70 estcpu=25, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *89473 292309 53070 0 7 0x2 ifconfig 53070 205166 68651 0 3 0x10008a pause sh 68651 38031 566 0 3 0x82 wait syz-executor.0 69798 405655 1 0 3 0x100083 ttyin getty 26932 327408 0 0 3 0x14200 bored sosplice 75935 395290 566 0 3 0x82 piperd syz-executor.1 566 164506 61494 0 3 0x82 thrsleep syz-fuzzer 566 56564 61494 0 3 0x4000082 thrsleep syz-fuzzer 566 159996 61494 0 3 0x4000082 thrsleep syz-fuzzer 566 503017 61494 0 3 0x4000082 thrsleep syz-fuzzer 566 11779 61494 0 3 0x4000082 thrsleep syz-fuzzer 566 151383 61494 0 3 0x4000082 kqread syz-fuzzer 566 17755 61494 0 3 0x4000082 thrsleep syz-fuzzer 61494 203308 9050 0 3 0x10008a pause ksh 9050 319151 27415 0 3 0x92 select sshd 27415 395793 1 0 3 0x80 select sshd 12822 514138 14001 73 2 0x100090 syslogd 14001 407366 1 0 3 0x100082 netio syslogd 22427 54055 1 77 3 0x100090 poll dhclient 96321 113546 1 0 3 0x80 poll dhclient 44567 451763 0 0 3 0x14200 pgzero zerothread 70502 362686 0 0 3 0x14200 aiodoned aiodoned 81465 175953 0 0 3 0x14200 syncer update 51754 293629 0 0 3 0x14200 cleaner cleaner 65199 132278 0 0 3 0x14200 reaper reaper 468 269087 0 0 3 0x14200 pgdaemon pagedaemon 62241 131561 0 0 3 0x14200 bored crynlk 43333 344259 0 0 3 0x14200 bored crypto 81569 100160 0 0 3 0x40014200 acpi0 acpi0 95103 114053 0 0 3 0x14200 bored softnet 9631 391158 0 0 3 0x14200 bored systqmp 60230 415089 0 0 3 0x14200 bored systq 23951 282706 0 0 3 0x40014200 bored softclock 24708 346577 0 0 3 0x40014200 idle0 91007 209830 0 0 3 0x14200 bored smr 1 195713 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 9488 6334K 6773K 78643K 11427 0 0 pcb 23 9K 10K 78643K 255 0 0 rtable 86 3K 4K 78643K 260 0 0 ifaddr 50 11K 13K 78643K 88 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 29 0 0 iov 0 0K 16K 78643K 36 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1196 75K 75K 78643K 1528 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 8 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 56 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 6 17K 25K 78643K 382 0 0 sigio 0 0K 0K 78643K 14 0 0 proc 43 46K 62K 78643K 337 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 41 0 0 in_multi 22 1K 2K 78643K 47 0 0 ether_multi 1 0K 0K 78643K 2 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 207 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 20K 78643K 1659 0 0 UVM aobj 20 2K 2K 78643K 22 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 8 0 0 NDP 10 0K 0K 78643K 23 0 0 temp 138 2706K 2833K 78643K 6314 0 0 kqueue 0 0K 0K 78643K 4 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 188 0 181 1 0 1 1 0 8 0 plimitpl 152 35 0 28 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 7 0 7 1 1 0 1 0 8 0 tcpcb 544 64 0 60 1 0 1 1 0 8 0 nd6 48 6 0 3 1 0 1 1 0 8 0 ppxss 1128 7 0 7 2 2 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 187 0 44 12 0 12 12 0 8 1 art_table 32 188 0 44 2 0 2 2 0 8 0 art_node 16 44 0 14 1 0 1 1 0 8 0 sysvmsgpl 40 8 0 2 1 0 1 1 0 8 0 semapl 112 54 0 44 1 0 1 1 0 8 0 shmpl 112 20 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2008 0 599 46 0 46 46 0 8 0 ffsino 240 2008 0 599 84 0 84 84 0 8 0 nchpl 144 2734 0 1104 61 0 61 61 0 8 0 uvmvnodes 72 2265 0 0 42 0 42 42 0 8 0 vnodes 200 2265 0 0 120 0 120 120 0 8 0 namei 1024 7517 0 7516 2 1 1 1 0 8 0 scxspl 192 15690 0 15690 10 9 1 6 0 8 1 sigapl 432 550 0 536 2 0 2 2 0 8 0 futexpl 56 6010 0 6010 1 0 1 1 0 8 1 knotepl 112 174 0 153 1 0 1 1 0 8 0 kqueuepl 104 70 0 68 1 0 1 1 0 8 0 pipepl 112 306 0 287 2 1 1 1 0 8 0 fdescpl 424 551 0 536 2 0 2 2 0 8 0 filepl 120 3115 0 3021 4 0 4 4 0 8 0 lockfpl 104 139 0 139 2 1 1 1 0 8 1 lockfspl 48 45 0 45 2 1 1 1 0 8 1 sessionpl 112 19 0 9 1 0 1 1 0 8 0 pgrppl 48 21 0 11 1 0 1 1 0 8 0 ucredpl 96 462 0 455 1 0 1 1 0 8 0 zombiepl 144 536 0 536 2 1 1 1 0 8 1 processpl 840 566 0 536 4 0 4 4 0 8 0 procpl 600 1029 0 993 4 0 4 4 0 8 0 sosppl 128 7 0 7 2 1 1 1 0 8 1 sockpl 384 394 0 377 3 0 3 3 0 8 1 mcl64k 65536 9 0 9 1 1 0 1 0 8 0 mcl16k 16384 1 0 1 1 1 0 1 0 8 0 mcl12k 12288 5 0 5 2 1 1 1 0 8 1 mcl9k 9216 8 0 8 2 1 1 1 0 8 1 mcl8k 8192 9 0 9 1 1 0 1 0 8 0 mcl4k 4096 19 0 19 3 2 1 1 0 8 1 mcl2k 2048 58010 0 57969 13 7 6 11 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 95623 0 95567 11 3 8 9 0 8 2 bufpl 256 19634 0 16523 198 0 198 198 0 8 0 anonpl 16 61196 0 52576 74 13 61 61 0 62 16 amapchunkpl 152 2185 0 2071 7 2 5 6 0 158 0 amappl16 192 2706 0 2108 53 14 39 43 0 8 8 amappl15 184 1 0 1 1 0 1 1 0 8 1 amappl14 176 211 0 206 2 1 1 1 0 8 0 amappl13 168 8 0 8 2 2 0 1 0 8 0 amappl12 160 175 0 174 1 0 1 1 0 8 0 amappl11 152 40 0 26 1 0 1 1 0 8 0 amappl10 144 67 0 67 2 1 1 1 0 8 1 amappl9 136 555 0 552 1 0 1 1 0 8 0 amappl8 128 124 0 108 1 0 1 1 0 8 0 amappl7 120 32 0 26 1 0 1 1 0 8 0 amappl6 112 53 0 47 1 0 1 1 0 8 0 amappl5 104 299 0 286 1 0 1 1 0 8 0 amappl4 96 748 0 722 2 1 1 2 0 8 0 amappl3 88 128 0 123 1 0 1 1 0 8 0 amappl2 80 3763 0 3721 2 0 2 2 0 8 0 amappl1 72 19206 0 18767 23 13 10 19 0 8 0 amappl 72 1253 0 1219 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 21 0 2 1 0 1 1 0 8 0 uaddrrnd 24 551 0 536 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 551 0 536 1 0 1 1 0 8 0 vmmpekpl 168 7628 0 7608 2 0 2 2 0 8 0 vmmpepl 168 65556 0 64066 117 28 89 89 0 357 19 vmsppl 264 550 0 536 2 1 1 2 0 8 0 pdppl 4096 1108 0 1072 6 1 5 6 0 8 0 pvpl 32 208201 0 196580 174 18 156 156 0 265 43 pmappl 200 550 0 536 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 339 0 19 11 1 10 11 0 8 0