Re: Help debugging Vultr boot delay...?

From: Eugene Grosbein <eugen_at_grosbein.net>
Date: Wed, 24 Aug 2022 05:34:50 UTC
24.08.2022 11:27, Mason Loring Bliss wrote:

> Hi all. I noticed a couple oddities with Vultr's FreeBSD support recently.
> The first was that when you asked for a 13.1 VM (with the alternative being
> 12.3) you'd actually get a 13.0 image. They've addressed this now, so it's
> no longer a concern.
> 
> The second issue is still there and while I've brought it to their
> attention, it'd probably be useful if they had some expert help. What I'm
> observing with new VMs, both their images and via FreeBSD's own install
> media, is a pause of one and three quarters minutes (around 105 seconds)
> between:
> 
>     ugen0.2: <QEMU QEMU USB Tablet> at usbus0
> 
> and the next line, which appears to be:
> 
>     hdacc0: <Generic (0x1af40022) HDA CODEC> at cad 0 on hdac0
> 
> FreeBSD believes it's on Hyper-V 10.0.14393 [SP0] but the same VM booted
> into GNU/Linux probes KVM, so I've got to ask about that.
> 
> Given fairly limited access to the VM - pretty much, a KVM console and
> whatever I can manage to be saved to disk - is there any useful way I can
> get more data about what's going on during the visible pause? This appears
> with the FreeBSD 13.1 install (disc1) ISO and with 13.0 as supplied by
> Vultr, but I can boot other ISOs with something custom to explore, as
> needed.
> 
> Thanks in advance if anyone has clues or ideas. I'll report back when I
> know more, regardless.

I have my own small VM at vultr.com. If I run "ping X.X.X.X" against it from outside,
then "shutdown -r now" from inside the VM, I get exactly 20 probes lost (20 seconds)
after it stops responding and starts responding again after reboot.

So, my instance has not such problem. I created it in times of 13.0-RELEASE
but I booted in off FreeBSD official ISO image for 64 bits, destroyed pre-installed GPT partitioning
and installed 13.0 system using MBR+ZFS-on-slice. Since then, it was upgraded to 13.1-STABLE/amd64.

Also I have in /boot/loader.conf:

beastie_disable="YES"
autoboot_delay="3"
kern.vty=sc
hw.memtest.tests=0
aesni_load="YES"
dumpdev="/dev/label/swap"

zfs_load="YES"
vfs.root.mountfrom="zfs:z"
vfs.zfs.arc_max="100M"
vfs.zfs.vdev.cache.size="32M"
vfs.zfs.prefetch_disable="1"
vfs.zfs.vdev.trim_on_init="0"
vfs.zfs.compressed_arc_enabled="1"
vfs.zfs.abd_scatter_enabled="0"

My kernel is GENERIC plus three options: KDB, KDB_UNATTENDED and KDB_TRACE
usbconfig shows me:

ugen0.1: <Intel UHCI root HUB> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
ugen0.2: <QEMU QEMU USB Tablet> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA)

Please post output of "pciconf -lvvv".