Freezing Debian or Ubuntu almost any version after a while. Choosing minimal acceleration solves it

Discussions about using Linux guests in VirtualBox.
Tzahi
Posts: 6
Joined: 8. Feb 2017, 21:25

Freezing Debian or Ubuntu almost any version after a while. Choosing minimal acceleration solves it

Post by Tzahi »

I have put some logs and info in ticket 16396
but, other than getting help by changing kvm/default acceleration to minimal there does not seem to be any help addressing the actual problem.

Without the kvm, sound doesn't sound well after a while because the timing is off and also the machine takes too much cpu when it gets to high load.

Is there a way to get this fixed?

Thanks.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Freezing Debian or Ubuntu almost any version after a while. Choosing minimal acceleration solves

Post by Perryg »

Since your CPU only has 2 cores and you have assigned them both to the guest I wonder if that is causing this issue. Enable the paravirtulazition to default and change to 1 processor and see what happens.
Tzahi
Posts: 6
Joined: 8. Feb 2017, 21:25

Re: Freezing Debian or Ubuntu almost any version after a while. Choosing minimal acceleration solves

Post by Tzahi »

Thanks. So far so good, 2 days straight without freezes. I will continue to monitor this for another week.
What does this mean? Is it a design flaw or is it fixable? I need 2 cores on production.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Freezing Debian or Ubuntu almost any version after a while. Choosing minimal acceleration solves

Post by Perryg »

This explains it in detail.
CPU Cores versus threads
Tzahi
Posts: 6
Joined: 8. Feb 2017, 21:25

Re: Freezing Debian or Ubuntu almost any version after a while. Choosing minimal acceleration solves

Post by Tzahi »

I see. Important to note that it never freezes when acceleration is on minimal.

If I understand what you are saying is that if the Host is overburdened (though i do not think that was the case in most of the freezes I had), then Virtualbox will not be able to negotiate with the guest paravirtualization interfaces in time and this is the reason it freezes. I would also note this freeze also occurs on windows host machine.

I am not sure this is the reason but, even if this is the case, i would try to fix it that it would be slower for a while and not freeze the guest. Maybe fix something in the guest editions...

Moreover, the UI never says, don't use 2 cores and puts them on the green. Seems to me, that at least a warning... Maybe 1 green, 1 yellow, 1 red.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Freezing Debian or Ubuntu almost any version after a while. Choosing minimal acceleration solves

Post by Perryg »

Not sure anything can be fixed, not easily that is. You have in essence two separate computers ( one virtual ) fighting over resources and what looks like a hang or freeze to you may proceed after what ever the task is that was started finishes. This can take a while depending on what it is that started the situation. That said now you have enough information to pass along to the DEVs if you like and see if there is anything that they can do. bugtracker
Tzahi
Posts: 6
Joined: 8. Feb 2017, 21:25

Re: Freezing Debian or Ubuntu almost any version after a while. Choosing minimal acceleration solves

Post by Tzahi »

Well I did send a bug a while ago:
With the guest kernel logs attached (not easy to get mind you, since only a kernel to network dump allows to get it).
https://www.virtualbox.org/ticket/16396

Not that any dev guys, tried to address it.

If I buy an enterprise license, do you think they'll get involved?

Thanks.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Freezing Debian or Ubuntu almost any version after a while. Choosing minimal acceleration solves

Post by Perryg »

If I buy an enterprise license, do you think they'll get involved?
Maybe but it is really expensive and no guarantee. Not a lot of people are experiencing this issue so if they can not reproduce it locally it may be difficult to fix. They are working on various aspects all the time and one of them could address your issue but they do not reply to each and every ticket directly explaining what they are doing due to time constraints. Plus as I pointed out it might not even be the KVM section causing the actual issue and you should point this out to them in the ticket. Setting the guest to use a single processor does allow it to work longer and maybe even without failing.
arQon
Posts: 228
Joined: 1. Jan 2017, 09:16
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu 16.04 x64, W7

Re: Freezing Debian or Ubuntu almost any version after a while. Choosing minimal acceleration solves

Post by arQon »

Strangely, I seem to have also run across this, or at least something very similar: a 4core/8thread (xeon) W7 host that's been running an ubuntu guest (currently 14.04) for literally years with 4 "processors" assigned to it, has started to lock up not only the VM but the vbox gui as well, as of the 3.13.109 kernel. (When starting X, which is rather odd, but that's how it is). Unfortunately, even VT's don't work in that state, so I have the same problem with investigating it as the OP.
Tried vbox 5.1.12 and 5.1.14.
The host has basically nothing else running on it (aside from assorted services, obviously). One thing that's interesting is that the VM in question is using 100% of one core at that point, and the other 7 are all idle.

Switching from default (KVM) to minimal parav has (so far) seemed to make everything work again, but dropping from 4 cores to 2 was also successful (again, so far - i've only been poking at this for about an hour).

One _successful_ boot with the 108 kernel showed a "virtualbox kernel module is not running" notification popup - also a brand-new experience - and, unsurprisingly, a failure to mount shared folders / go fullscreen properly / etc. The GAs are installed, rebuilt correctly for both kernel versions, etc etc.

It "feels" like a race condition, but I don't have any good ways to debug it. Hopefully inspiration will strike at some point. :)
arQon
Posts: 228
Joined: 1. Jan 2017, 09:16
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu 16.04 x64, W7

Re: Freezing Debian or Ubuntu almost any version after a while. Choosing minimal acceleration solves

Post by arQon »

OK - it's entirely possible that this lockup weirdness has simply vanished as mysteriously as it appeared, but explicitly adding vboxguest and vboxsf to /etc/modules resulted in the VM starting successfully for the first time ever with the 109 kernel, KVM parav, and 4 cores allocated to it.
I'll experiment more later, but I need the VM functioning right now so it'll be a while.
arQon
Posts: 228
Joined: 1. Jan 2017, 09:16
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu 16.04 x64, W7

Re: Freezing Debian or Ubuntu almost any version after a while. Choosing minimal acceleration solves

Post by arQon »

Updating to 3.13.110 today immediately ran into the same lockup when starting X / desktop, so the /etc/modules hack looks like a bust. Again, parav's other than KVM boot successfully, as does dropping the VM to 3 CPUs. After doing that and rebuilding the GAs the VM boots successfully with KVM and 4 CPUs, but I suspect that's just getting lucky with the race/whatever rather than something that caused a real fix.
arQon
Posts: 228
Joined: 1. Jan 2017, 09:16
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu 16.04 x64, W7

Re: Freezing Debian or Ubuntu almost any version after a while. Choosing minimal acceleration solves

Post by arQon »

I changed the VM to 3 CPUs shortly after that last post, because when the VM hangs the VBox GUI on the host does too, and it was getting annoying. After a kernel update in the guest today, it hung again on reboot while still at 3 CPUs. So, I think that puts the last nail in the "overloaded host / etc" idea.

As usual, changing the parav to minimal resolves it. I think I'm going to just stick with that from now on until I see a "VMM: fixed KVM lockup bug in linux guests" entry in the release notes.

If any of the devs have a potential fix they want tested at some point, I'd be happy to help out.
arQon
Posts: 228
Joined: 1. Jan 2017, 09:16
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu 16.04 x64, W7

Re: Freezing Debian or Ubuntu almost any version after a while. Choosing minimal acceleration solves

Post by arQon »

I managed to get the same lockup even at "Minimal" the other day (still on 5.1.14) so it looks like KVM is simply more prone to it rather than actually to blame.
The VM is set back to KVM now and the host updated to 5.1.22, so we'll see what happens next time there's a kernel update.
Tzahi
Posts: 6
Joined: 8. Feb 2017, 21:25

Re: Freezing Debian or Ubuntu almost any version after a while. Choosing minimal acceleration solves

Post by Tzahi »

I can tell you I got crashes with Default and 1 cpu on my mac. Very rare though. Never got one with acceleration disabled.
It seems it is a load/timing issue.
Post Reply