Page 1 of 1

Guest keeps freezing reliably, need help debugging.

Posted: 18. May 2011, 21:23
by syn1kk
Configuration:
Host: Windows XP 32 bit, 4 cores, 3 GB memory, 1024 MB video card memory
Guest: Fedora 14 64 bit, Guest settings --> See attached screenshot

[attachment=0]winXP32Host_fedora64Guest.PNG[/attachment]


FYI, I always open gnome-system-monitor (aka the linux "task manager") first to make sure memory isn't running out. ("Running out of memory was the first guess I had".) The memory is not running out according to gnome-system-monitor.

========================================================================================

Describing the problem:
My guest VM keeps freezing up after anywhere from a couple of minutes to 1 hour of usage. The only programs I run are: firefox 4, eclipse 3.6 (with google gwt plugin), gnome-terminal, gnome-system-monitor. When I say freezing, I mean that suddenly Eclipse stops responding completely. Then I can go to gnome-terminal and when I press enter it doesn't create a new line or when I open a new tab it never gives me a blinking cursor. Then I go to gnome-system-monitor and it keeps scrolling the memory usage plot... but it stutters (pause then start, pause then start). Then I go to firefox and it stops responding completely.

At this point I think to myself "oh something broke in linux. I will just drop into command line mode and restart the desktop manager." but when I press ctrl-shift-F4... it doesn't go to command line mode! It just sits in the linux GUI desktop manager!

Given the fact that I can't go into linux command line mode... I am pretty confident this is a problem with my virtual machine or virtualbox. (When I use VMWare player in a similar configuration... no matter how screwed up my VM becomes I can always go into linux command line mode.)

========================================================================================

Need help:
I do not know how to debug what is going wrong.
Is something wrong with my configuration?
Any other ideas on how to debug or what is wrong?

Re: Guest keeps freezing reliably, need help debugging.

Posted: 19. May 2011, 23:23
by syn1kk
I just experienced my VM locking up again. Here's what happened. In the guest, I opened a new tab in firefox... then I lost all responsiveness to firefox. I was able to alt-tab to gnome-system-monitor. Which reported that my memory usage was about 1 GB.

Then I went to the host windows and opened up task manager. I saw that two of the cores were pegged at 100% utilization and my memory only had 130 MB left. What does the situation "100% CPU utilization and host having very little ram" mean? I don't really know and would really appreciate some insight from more experienced vbox users.

Re: Guest keeps freezing reliably, need help debugging.

Posted: 20. May 2011, 00:36
by Teox
I also have the same problem. My two linux guest (ubuntu 10.04 and kubuntu 11.04) often freeze and I have to close them (closing the window).
My host is a notebook with Win 7 64 and I'm using VirtualBox 4.0.6.

I can't identify anything which can cause this freezing, any programs or anything I do. I usually use my VM in Full screen mode.

Re: Guest keeps freezing reliably, need help debugging.

Posted: 20. May 2011, 14:33
by syn1kk
-- what ram does your host have?
-- how much do you allocate the guest?
-- At the time of the freeze, how much ram does the host have?

Re: Guest keeps freezing reliably, need help debugging.

Posted: 23. May 2011, 12:08
by Teox
My notebook is a HP DV6 2153EL with 4 GB RAM DDR3 (http://h10025.www1.hp.com/ewfrf/wc/docu ... =c02000952)

Host OS is Win7 64 bit, while guests are ubuntu or kubuntu (10.04 and 11.04).

I usually allocate a bit more than 1.5 GB RAM to VMs (1710 MB for Kubuntu for example) and at the time of freezing RAM usage of host and guest is normal (host is about at 55%).

If I don't remember wrong, this problem started with VirtualBox 4.0.

Have we to report a bug?

Re: Guest keeps freezing reliably, need help debugging.

Posted: 23. May 2011, 15:48
by syn1kk
-- At the time of the freeze, how much ram does the host have [measured in physical memory available MB as seen in Task Manager]?

Re: Guest keeps freezing reliably, need help debugging.

Posted: 23. May 2011, 16:07
by syn1kk
RE - "this started in version 4.x":
I don't know for sure. The main difference in 4.x and 3.x that i noticed was that you could allocate more than 1500 MB. Which imo is not a bug.

One theory of mine is that: letting the user allocate more than 1500 MB might allow the user to allocate too much memory. But I don't understand the problem enough to completely explain this theory.

Re: Guest keeps freezing reliably, need help debugging.

Posted: 23. May 2011, 16:12
by syn1kk
Here is one attempt to explain the theory that you can allocate too much memory to your VM.

Safe, example configuration:
- host has 4 GB memory
- host task manager reports 2.5 GB available +/- 300 MB
- user allocates less than 2.2 GB to guest (probably 1.5 to 2.0 GB to be safe)

Unsafe, example configuration:
If you allocate more than 2.2... your host will run out of memory. pushing you into using virtual memory (aka window's "page file", aka using the harddrive to store some of the processes in memory).

I think maybe you and me are doing something similar to the unsafe example configuration. I think the cause of the "guest freezing" can be explained by the following. When the guest has too much memory allocated to it... the guest starts running off of virtual memory. Virtual Memory is 100 to 1000 times slower and so the guest process did not actually freeze but is actually moving 100 to 1000 times slower because of the slow virtual memory. Agree/Disagree?

I would invite anyone else to help me understand the problem (i'm sure there are more experienced people here who have good experience to help explain what is happening).

Re: Guest keeps freezing reliably, need help debugging.

Posted: 23. May 2011, 16:20
by syn1kk
To summarize all of the above... I think "Thrashing" is occuring and the cause of the thrashing is that too much memory is allocated to the guest VM.

In my case, usually my guest freezes and I look at task manager and see that there is only 100 MB of available memory and high CPU utilization... so that tells me that supports my theory that thrashing is going on IMO. Agree/disagree?