Summary: | Current console input freezes in hyperv gen 2 VM after randon amount of time | ||
---|---|---|---|
Product: | Base System | Reporter: | scorpionmage |
Component: | misc | Assignee: | freebsd-virtualization (Nobody) <virtualization> |
Status: | New --- | ||
Severity: | Affects Some People | CC: | hselasky, info, markus.egger, me, michael.adm, sdolha |
Priority: | --- | ||
Version: | CURRENT | ||
Hardware: | amd64 | ||
OS: | Any |
Description
scorpionmage
2019-05-24 05:20:33 UTC
I have noticed this too in my hyper-V FreeBSD-head vm. Me, too. - Windows Server 2016 Hypervisor w/ current updates - FreeBSD 12.0p6 x64 in Gen2 VM Me too, same diagnostics, in Hyper-V on Windows 10 (build 1803), with FreeBSD image downloaded and installed from scratch, without any configurations. I’m also seeing this in Windows 10 with 12.1-BETA3. Three times just today. Nothing suspicious is logged. Me, too. - Windows Server 2019 Hypervisor w/ current updates - FreeBSD 13.0 CURRENT x64 GENERIC in Gen2 VM Maybe this bug is related to this bug? : If you try on the hypervisor (in powershell) for gen1 vm: PS > Disable-VMConsoleSupport -VMName "test-FreeBSD-gen1" Disable-VMConsoleSupport : Failed to remove device "Microsoft:Hyper-V:Synthetic Mouse": Invalid operation (0x80041016). for gen2 vm: PS > Disable-VMConsoleSupport -VMName "test-FreeBSD-gen2" Disable-VMConsoleSupport : Failed to remove device "Synthetic Mouse": General failure. (0x80041001). How many CPU's are there? --HPS The CPU is usually eight, but the same behavior with four and twelve cpu's (In reply to Hans Petter Selasky from comment #7) Yes, it seems the number of CPU's makes sense in this bug. All VM's with CPU's more than one lost keyboard input, one VM with one CPU did not lose keyboard input in same hipervisor during the day already (maybe this is a coincidence, or is this really a problem but not a solution) Maybe this also relates to this bug: when using the clipboard when copying one character in the hypervisor and Ctrl-V in the VM, we have two identical messages in the console at the same time (verbose logs is on - boot_verbose="YES" -> /boot/loader.conf) hvkbd0: Unsupported unicode hvkbd0: Unsupported unicode (In reply to Michael from comment #9) I’m using 2 CPUs and regularly seeing this. I’ll test tomorrow with only 1 CPU. (In reply to Juan Ramón Molina Menor from comment #11) I can reproduce the issue by using 2 or 4 CPUs, but not with only one. I have not found yet a reliable way to trigger it… Last time I was debugging something in this area, I found that the UART registers, which appear emulated, have some races. For example if I was reading the UART registers right before posting a doorbell on the mlx4en driver, the hypervisor would reboot the image :-( + if (mlx4_crash != 0) { + while (1) { + inb(0x3f8+5); + } + } + __raw_writel((__force u32)val, + &priv->mfunc.comm->slave_write); I was not able to get to the bottom of this due to lack of interest from the hypervisor developers. This race happens only with N number of CPUs. You may play around with inb() in the network driver code and see if you can provoke a similar action. --HPS These console input freezes occur even without a single network interface in general Faced an interesting moment. I install from the iso-image from 2019-12-05. FreeBSD-13.0-CURRENT-amd64-20191205-r355406-disc1.iso When loading an already working system at the time of the countdown of 10 seconds of the boot selection option, press Enter and get a completely freezing system. If we do not touch anything (a countdown of 10 seconds occurs), the system boots and works. Made a complete system update. make buildworld && make buildkernel KERNCONF=GENERIC make installkernel KERNCONF=GENERIC make installworld mergemaster -Ui reboot ...the same - at the time of the countdown of 10 seconds of the boot selection option, press Enter and get a completely freezing system. If we do not touch anything (a countdown of 10 seconds occurs), the system boots and works. ok. mount -t msdosfs /dev/da0p1 /mnt cp /boot/loader.efi /mnt/EFI/freebsd reboot at the time of the countdown of 10 seconds of the boot selection option, press Enter and system boots normal, as it shuld. Could these spontaneous keyboard disappearances in running multiprocessor virtual machines be due to this? https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240734 |