[Solved] Virtualbox host freeze while using Whonix

Discussions related to using VirtualBox on Linux hosts.

[Solved] Virtualbox host freeze while using Whonix

Postby computer_guy » 17. May 2021, 09:19

Hello,

I have recently posted a thread to the official whonix forum, redirecting me here.

I am running Kubuntu 21.04 host. AMD virtualization technology enabled in BIOS, secure boot disabled in UEFI mode.
Laptop make/model: Lenove Legion 5 15-ARH05, using a Samsung 980 Pro Evo ssd as primary one, upgraded to 16GB Ram. Removed hdd all together as not used. Everything else, default. I've tested over and over again that therre aren't hardware issues.

I do not notice this issue with any other VM, just Whonix which made me think it was whonix related and not virtualbox directly.

When having both the gateway and workstation started, it'll be anywhere from 5 minutes to an hour and my host will freeze/lock up. Mouse moves, but nothing else responsive. (Easily noticed as my host system clock counts the seconds as well, and it no longer countrs when this occurs).

I have tried storing the vm on internal ssd, external ssd and external hdd's, switching storage controller types which was needed when I dowgraded virtualbox to be on the whonix reccomended version, as of wrting that is 6.1.20. I have followed all the guides at whonix to fix this issue, even the ones they link to official virtualbox troubleshooting guides. Only thing I haven't done yet, is post here.

This issue I noticed started ocuring 2 months or so ago. I update software almost every other day through apt (virtualbox is added as a source), update whonix almost every week, so its been this way accross many different updates in the past 2 months.

I do have the log captured for both vm's saved, which were saved first thing after I booted back up from the hard shutdown I had to. Though it contains some sensitive information in the file path's i've seen, so maybe I can censore it before posing publicly, I just don't want to censor what may be required to understand whats going on.

Thank you for any help :)
Last edited by computer_guy on 17. May 2021, 11:12, edited 1 time in total.
computer_guy
 
Posts: 19
Joined: 28. Apr 2018, 03:03

Re: Virtualbox host crash while using Whonix

Postby mpack » 17. May 2021, 09:28

FYI, that looks like a host hang you are describing, not a crash. A crash is a sudden abort, the total opposite of a hang.

Even if VirtualBox was buggy, it shouldn't be possible to hang the host OS. Nothing VirtualBox can do should be able to stop other host processes from running.

I suspect you have a hardware problem of some kind, e.g. maybe bad ram, bad sectors etc. VirtualBox uses a lot of resources so is often the first to trip over something like that. You should run some disk and memory checks.

Before any further discussion, we'll need to see a VM log. Make sure the VM is fully shut down, then right click it in the manager UI. Select "Show Log" and save "VBox.log" (no other file) to a zip file. Attach the zip here.
mpack
Site Moderator
 
Posts: 33948
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Virtualbox host crash while using Whonix

Postby computer_guy » 17. May 2021, 09:46

I realized after you said it, I put crash in subject but in the body I mentioned host freezing. Sorry about that.

I went ahead an attahed 2 zip's, 1 log for each vm (gateway and workstation) as I'm not sure which one would reflect the issue, as both need to be running to use whonix.

As mentioned I have done test to ensure there are no hardware problems. This computer I bought in january this year, so fairly new.

There no issues with ram, or ssd. I've checked more than twice when testing for any issues.

Also, I would assume that virtualbox can cause issues like this if it contains bugs, afterall its installed in the host, running proesses on the host. What if virtualbox is using more resoures than specified/exceeding my system resources? I would think that could cause issues like a crash, host freezing, or proesses being killed.

Anyway, thank you for looking into it.
Attachments
Whonix-Workstation-2021-05-17-01-54-46.zip
(20.92 KiB) Downloaded 2 times
Whonix-Gateway-2021-05-17-01-54-31.zip
(20.82 KiB) Downloaded 2 times
computer_guy
 
Posts: 19
Joined: 28. Apr 2018, 03:03

Re: Virtualbox host crash while using Whonix

Postby mpack » 17. May 2021, 10:07

computer_guy wrote:Also, I would assume that virtualbox can cause issues like this if it contains bugs, afterall its installed in the host

If a host OS is so badly designed that it's possible for a buggy app to hang it, maybe you should be thinking about a new host OS!

Are you saying that these two VMs must run at the same time, on a single host?

I'm seeing a huge number of files opened. You're using a split2g VMDK variant? Why? -- and both VMs seem to be doing it at the same time. Oh ouch... both VMs are using split2g VMDK and using snapshots.

I don't know if your Ubuntu host minds having so many file handles opened at once, but it certainly bugs the hell out of me! That is so many points of failure - I would not consider this a stable config. I would clone both VMs, preserving the current state only. That should create new VMs based around single VDIs, I would expect it to be much more reliable with better performance too.

Finally, VirtualBox 6.1.22 came out a few days ago, it might be worth trying the upgrade.
mpack
Site Moderator
 
Posts: 33948
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Virtualbox host crash while using Whonix

Postby computer_guy » 17. May 2021, 10:49

I used the vmdk format as its what I'm used to, as before I was going between vmware and virtualbox. As of now, I don't use anything other than virtualbox, so I suppose VDI format could work. As for Split2G, I use because it's easier for me to backup my files when perform a full home directory backup using rsync, partly why I'm using snapshots. Each time I open the vm, even for like 1 second the vmdk's are modified and when during an incremental backup with rsync it copies everything over, when for a 100GB VM, it would then backup the full 100GB when only may a few 100mb's of data was actuallly changed. Not sure there is a better way to do this. Although I have been using it this way for some time, up until 2 months ago I haven't had issues.

and I am aware of virtualbox 6.1.22, its what I was on but the Whonix developers referred me to its topic of the reccomended virtualbox version of 6.1.20 as thats what the whonix images are built from.

Technically each vm will run individually, but the workstation vm won't receive an internet connection as its using some virtualbox feature to bridge the two for network connections, so the gateway connect to the internet (routing via TOR), and through its local ip, workstation can get online forcing all traffic through gateway over tor. So, I never use it for offline reasons so both will need to be running to perform my tasks.

I an trying to see if your method of switching to standard VDI's (Which is actually whonix default) works or not. It's just managing backup's that are the pain this way.
computer_guy
 
Posts: 19
Joined: 28. Apr 2018, 03:03

Re: Virtualbox host crash while using Whonix

Postby mpack » 17. May 2021, 11:07

I don't know about other filesystems, but NTFS replaced FAT over 20 years ago, eliminating the 4GB file size limit along with it. I don't see any reason why a modern (2021) backup strategy should still be limited by 20th century size considerations. E.g. while some of my general purpose USB thumb drives still use FAT, most of my external drives now use NTFS. I also have a NAS that uses EXT4 I believe. Anyway, file size just isn't a problem. Even my smart TVs and the like accept NTFS USB drives.
mpack
Site Moderator
 
Posts: 33948
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Virtualbox host freeze while using Whonix

Postby computer_guy » 17. May 2021, 11:18

I use ext4 which is much better than even NTFS, so no it doesn't have any such limitation like FAT/FAT32. There are some reasons I do it like for e.g if I'm copying over a 100GB vdi and lets say at 40GB copied my system crashes, drive disconnect...then I have to restart copying the whole file again, where is with the 2GB file's anywhere from the mark of 38GB-40GB would have been sucessfully copied. I believe rsync has a partial copying flag to be used where during next run you can append it so to resume the file where it left off, but I haven't tested it. Other reasons was if I have had a need to copy it to a FAT/FAT32 formatted drive, it would be ready. I'm still curious as to why BIOS/UEFI requires fat/fat32 file systems anymore, as writing a windows images seems to become a pain sometimes when one of it's individual files in the iso is a lil over 4 GB, last I checked over a year ago, it was at 4.1GB. Manually extracting the iso failed because of fat limiations, whereas RUFUS managed to write it, although I'm not sure how.
computer_guy
 
Posts: 19
Joined: 28. Apr 2018, 03:03

Re: Virtualbox host freeze while using Whonix

Postby mpack » 17. May 2021, 11:48

computer_guy wrote:and lets say at 40GB copied my system crashes, drive disconnect...

I've never had that happen unless the drive is faulty, and then it wouldn't matter how much you copied onto it, you're going to junk the drive anyway.

Incidentally, returning to the VDI vs VMDK discussion, VirtualBox has a function to convert one container format to another, so it's not as if you can't convert it to VMDK in the future if you ever wanted to.

computer_guy wrote:I'm still curious as to why BIOS/UEFI requires fat/fat32 file systems anymore

If BIOS means MBR, then that doesn't know or care about FAT nor any other filesystem. GPT (i.e. UEFI) has a system (a.k.a. boot manager) partition that is conventionally formatted using FAT, because hardware mfrs needed a format that every OS supports that isn't encumbered by patents. Being simple doesn't hurt either. The whole system partition is only 400MB or less, so file and partition size limits aren't a consideration. I don't know if FAT is actually mandatory (e.g. I believe MacOS maybe uses something else), but I don't know of any alternative file system that would have fitted the bill better.
mpack
Site Moderator
 
Posts: 33948
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Virtualbox host freeze while using Whonix

Postby computer_guy » 17. May 2021, 12:20

mpack wrote:
computer_guy wrote:and lets say at 40GB copied my system crashes, drive disconnect...

I've never had that happen unless the drive is faulty, and then it wouldn't matter how much you copied onto it, you're going to junk the drive anyway.

I've had this issue once, where my cat pulled the plug during a copy operation lol but I had used the --partial flag of rsync, one of the few times I did and when I plugged it back in I ran same copy command adding --append-verify which saw that partially ccopied file, verified it and then resumed it. Everything was fine afterwards, but I imagine certain cases where the end result of the file may be courrped if it ends unexpectedly, thats why I used the verify part for rsync. (--append would do it was well, but faster since it skips verification of it).

mpack wrote:Incidentally, returning to the VDI vs VMDK discussion, VirtualBox has a function to convert one container format to another, so it's not as if you can't convert it to VMDK in the future if you ever wanted to.

I'm aware of this, I remember once I had to convert from vmdk to vdi to perform something that wasn't able to directly from vmdk format, then convert back to vmdk afterwards, I forget exactly what I was doing at this point, it was either upping the storage capacity of the storage, or converting to/from a fixed size.

I have just re-imported the ova from whonix using default settings, with the option to import as vdi checked. So my directory now contains a single vdi, not split (for both vm's). I haven't started the vm yet, I will get to this a bit later as I have work. I will post back to inform whether or not performance/stability is any better.
computer_guy
 
Posts: 19
Joined: 28. Apr 2018, 03:03

Re: Virtualbox host freeze while using Whonix

Postby computer_guy » 18. May 2021, 00:32

I had just setup both vm's and tested them about 20 minutes in, do lots of downloads, browser tabs open... and it didn't freeze host this time, managed to get all my work done in it. So either it would have still froze host if I worked in it for much longer, or its solved. As of now I will consider it fixed. Basically just using a single vdi, no snapshots for both vm's, didn't think this would have been the issue.

My windows 10 vm, is 128GB storage, vmdk Split2G and snapshots with 8GB ram and 6 virtual processors with shared folder, so if anything I would have expected this one to cause issues but never did. I plan to convert this to a single vdi soon however, because as you said, there is really no point of Split2G with the use of modern technology, and I don't need vmdk as I dont use vmware anymore, not sure if there are other use caess for it, but not for me anyway.

Thank you for your help :)
computer_guy
 
Posts: 19
Joined: 28. Apr 2018, 03:03

Re: Virtualbox host freeze while using Whonix

Postby mpack » 18. May 2021, 09:00

Thanks for reporting back.
mpack
Site Moderator
 
Posts: 33948
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP


Return to VirtualBox on Linux Hosts

Who is online

Users browsing this forum: No registered users and 53 guests