Ticket #20914 (closed defect: fixed)
Issues related to Linux kernel 5.18
Reported by: | Larry Finger | Owned by: | |
---|---|---|---|
Component: | other | Version: | VirtualBox 6.1.32 |
Keywords: | Cc: | ||
Guest type: | Windows | Host type: | Linux |
Description
The problem applies to both VB 6.1.32 and 6.1.34.
My sources have been patched using [94502], [94501], and [94500] as well as the -ffreestanding changes to the link statements.
I have not been able to determine a pattern for the crashes. Sometimes they happen during boot, and other times after the VM is running. Sometimes it fails with a Bugcheck 3b as in the attached log file. Other time it is a Bugcheck 1e.
Attachments
Change History
Changed 13 months ago by Larry Finger
-
attachment
Windows 10 Clone-2022-04-24-20-55-56.log
added
comment:2 Changed 13 months ago by Larry Finger
Hi galitsyn,
When it is supported, I have more information that might help. I bisected the 5.18-rc1 kernel to find the change that caused this problem. Surprisingly, the bisection pointed to commit 6e8ec2552c7d ("random: use computational hash for entropy extraction"). I am very sure of the bisection as the kernel built from the commit that immediately precedes this one, cfb92440ee71 - a tag commit by Linus, runs correctly.
I do not think that the kernel changes are bad, just that they led to problems in the way the emulator access random numbers. If I learn more about this problem, I will report it here.
comment:3 Changed 13 months ago by Larry Finger
Vadim, as you are aware, this is a kernel regression.
For other people, see https://lore.kernel.org/lkml/Ym8uPcuQpq1xBS6d@zx2c4.com/T/#mea7aa731b5524a05ac3b3e8588c0c42235bb33d6 for more details.
This defect can be closed.
comment:4 Changed 13 months ago by frispete
Hi Larry,
nice to hear from you, but not so nice to find you in such a troublesome maze between the affected parties. You did the right thing and *way* more of what average maintainers usually do.
Jason claims, that this issue is a long standing security vulnerability of VB, when it comes to FPU/SIMD usage in hard IRQ contexts from within VB VMs. https://lore.kernel.org/lkml/YoTVIGiXUO2l8Czm@zx2c4.com/
While the result of his analysis is sound, the tone definitely isn't..
@Vadim: it would be nice, if this issue could be addressed rather soonish from the VB devs and this case better not be closed until than.
comment:5 Changed 12 months ago by galitsyn
Hi guys,
We have a fix for the issue. With the following test build VMs should not show the symptoms described above when host is running Linux 5.18.
If you would like to run kernel 5.18 inside guest, please consider to install the following Guest Additions separately:
Looking forward for your feedback. Thank you for reporting.
Changed 12 months ago by galitsyn
-
attachment
vbox-linux-5.18.patch
added
VirtualBox-6.1.34 patch for Linux kernel 5.18 support (should be applied on top of https://download.virtualbox.org/virtualbox/6.1.34/VirtualBox-6.1.34.tar.bz2)
comment:7 Changed 12 months ago by obiewan
Hi,
An attempt to run a VM on a 5.18 kernel on a Fedora Core 36 system (next kernel is a 5.19 with a bug that will not let the host boot). This configuration of host and guest has not changed in a long time.
Log and config file(s) attached as tar.gz file.
Regards,
George...
Changed 12 months ago by obiewan
-
attachment
fc37v.tar.gz
added
tar.gz file with dmesg.txt and 2 screen shots of error
comment:8 Changed 12 months ago by galitsyn
Hi obiewan,
The issue you are observing does not look related to kernel 5.18. From the VM config and and VBox.log I can see that you are trying to start VM which has 4GB RAM assigned, however host only has 1.2 GB available.
00:00:02.363489 Host RAM: 7796MB (7.6GB) total, 1216MB available
This combination does not suppose to work. Try to make the host to get more free memory.
comment:9 Changed 12 months ago by obiewan
Larry,
Thanks for responding.
The guest is also FC37 (Linux).
I guess I'm confused about how VB affects the host system. The host OS (FC37) is a demand paged system and so is the guest. As I understand it, the VM is not allowed to use over 4G. Does VB remove 4G from availability to any/all other processes? My understanding is that it does not.
In the demand paged systems, the free space changes from moment to moment.
What am I missing?
Best regards,
George...
comment:10 Changed 12 months ago by sergiomb
comment:11 Changed 12 months ago by AGMS
I don't know if it is relevant, but as mentioned in the forum ( https://forums.virtualbox.org/viewtopic.php?f=7&t=106071), kernel 5.17.12 works on some CPUs and fails on others.
- AMD X2 Athlon - works (circa 2008)
- Intel i5-750 - fails (circa 2009)
- Intel i7-4820K - fails (circa 2014)
- Intel i5-10500H - works (circa 2020)
comment:12 Changed 12 months ago by galitsyn
- Summary changed from Windows 10 VM crashes with Linux 5.18 kernel to Issues related to Linux 5.18 kernel
I renamed the ticket in generic way. Hopefully new reports will end up here.
comment:13 Changed 12 months ago by galitsyn
- Summary changed from Issues related to Linux 5.18 kernel to Issues related to Linux kernel 5.18
comment:14 Changed 12 months ago by fth0
FWIW, I've collected backports of the random patches here (pun intended ;)):
Linux kernels 5.17.12+ (Fedora 35, 36), 5.15.44+ (Arch Linux 5.15.45-1-lts), 5.10.119+ (Debian Bullseye 5.10.0-15)
comment:15 Changed 12 months ago by galitsyn
Hi guys,
There is an updated version of the patch. It covers wider range of kernels and also includes initial support for 5.19 (up to rc2 for now) kernel. I am also posting a link to corresponding test build and Additions iso. Please note:
- vbox-linux-5.19.patch provides only changes which are relevant to this ticket; if you build VBox from sources for a specific distribution, you will also need to apply this patch https://www.virtualbox.org/ticket/20904#comment:23.
- Additions need to be installed separately from provided iso.
https://www.virtualbox.org/download/testcase/VirtualBox-6.1.35-151864-Linux_amd64.run https://www.virtualbox.org/download/testcase/VBoxGuestAdditions_6.1.35-151864.iso
r151864 and newer from Latest 6.1.x test builds on https://www.virtualbox.org/wiki/Testbuilds should have the fix.
Changed 12 months ago by galitsyn
-
attachment
vbox-linux-5.19.patch
added
VirtualBox-6.1.34 patch for Linux kernels 5.18.x and 5.19-rc2 support (should be applied on top of https://download.virtualbox.org/virtualbox/6.1.34/VirtualBox-6.1.34.tar.bz2)
comment:16 Changed 12 months ago by FranceBB
Hi, I noticed that you're working around the issue in 6.1.35, however the same should be done for VirtualBox 6.1.97 r150532 'cause it's also affecting 6.1.97 as you can see from here: https://forums.virtualbox.org/viewtopic.php?f=7&t=106194 Development Snapshots are supposed to be the latest versions available, so it would make sense to have 'em not fall behind 6.1.35 on this issue.
Changed 12 months ago by FranceBB
-
attachment
Logs1_2.zip
added
VirtualBox VM 6.1.97 r150113 on Fedora 36
Changed 12 months ago by FranceBB
-
attachment
Logs3_4.zip
added
VirtualBox VM 6.1.97 r150532 on Fedora 36
Changed 12 months ago by FranceBB
-
attachment
Guru_Meditation.zip
added
VirtualBox VM 6.1.97 r150532 on Fedora 36 (Guru Meditation Windows 11 Guest)
comment:17 Changed 11 months ago by sercallegar
I have an issue that, in behavior, corresponds to the current description and that is extensively described in https://forum.manjaro.org/t/virtualbox-error-in-the-last-update/113744
The weird thing is that kernels in the 5.18 series appear to be the only ones *unaffected*, while all the previous kernels started being affected with the latest point releases.
With this premise, it realistic that what I am experiencing is indeed this bug and not a different one?
comment:18 Changed 11 months ago by galitsyn
Hi sercallegar,
I would suggest to try the last test build posted in this ticket. If the issue still persist, we can look at it closer. Initial patch was covering only kernels 5.18+. However, later we extended it to wider range of kernels.
comment:19 follow-up: ↓ 20 Changed 11 months ago by k1kwp
kernel-5.18.6-200.fc36.x86_64 does not work as well. seems like same issues to me. also https://www.virtualbox.org/download/testcase/VirtualBox-6.1.35-151864-Linux_amd64.run did not work at all on my system. could not start any vms.
comment:20 in reply to: ↑ 19 Changed 11 months ago by galitsyn
Replying to k1kwp:
kernel-5.18.6-200.fc36.x86_64 does not work as well. seems like same issues to me. also https://www.virtualbox.org/download/testcase/VirtualBox-6.1.35-151864-Linux_amd64.run did not work at all on my system. could not start any vms.
What was the issue with the test build exactly?
comment:21 Changed 11 months ago by sblk
Just to say that it worked for me with VirtualBox-6.1.35-152011-Linux_amd64.run on Fedora 36 with kernel 5.18.9-200.fc36.x86_64.
HTH
comment:22 Changed 11 months ago by FranceBB
@sblk yep but virtual box 6.1.97 still doesn't as the development snapshots are stuck on version r150532 (not compatible with kernel 5.18.x) while 6.1.35 is at r152011 which is compatible with kernel 5.18.x
Kernel 5.18.x came out on the 22nd of May 2022. A fix for virtual box 6.1.35 came out on the 24th of May 2022 and has been improved 'till its final version released on the 14th of June 2022.
Today is the 5th of July 2022 and we still don't have a working 6.1.97 build with the fix applied. The development snapshots are supposed to be the cutting edge of builds and yet they've fallen behind the test builds. Dunno why, but it is what it is. I just hope they're gonna update the development snapshots too 'cause right now I'm booting with kernel 5.17 and I won't update till there's gonna be a working 6.1.97 version.
comment:23 follow-up: ↓ 24 Changed 11 months ago by Matthew Jurgens
I have been seeing this problem on vbox 6.1.32 and 6.1.34 on a Fedora host kernel 5.17.12+ (Windows 10 guest). I have now downgraded to kernel 5.17.5
Apart from crashing I was also seeing clock issues where the Windows host would gain in the order of 400 seconds over a 12 hour period. This was with the correct version of guest additions installed.
The other thing I was also seeing was that I would get duplicated VRDE ports. I generally specify the VRDE port as 9000-9100 to let vbox manage the port but I was getting multiple VMs come up and all claim port 9000. Sometimes restarting the VM would change the port number to an unused port but not always.
At this point I have only been running a few hours on kernel 5.17.5 but the port and time issues appear to have gone away already
comment:24 in reply to: ↑ 23 Changed 11 months ago by Matthew Jurgens
Replying to Matthew Jurgens:
At this point I have only been running a few hours on kernel 5.17.5 but the port and time issues appear to have gone away already
3 days and still all the problems (crashing, time sync, VRDE port collision) are gone
comment:25 Changed 11 months ago by galitsyn
- Status changed from new to closed
- Resolution set to fixed
Issues related to 5.18 kernel (FPU API usage violation) should be fixed in VirtualBox 6.1.36. Please refer to https://www.virtualbox.org/wiki/Downloads page.
Please note that some comments in this ticket are not related to the original problem. If you still observing them with VBox 6.1.36, please submit a separate ticket.
Thank you all for the feedback.
comment:26 Changed 6 months ago by oladke
In VirtualBox 6.1.22 Where can I enable a Host-Only Network? the preferences only say NAT.
Log file for failing VM