Cannot allocate memory, but host reports enough is available

Discussions related to using VirtualBox on Windows hosts.
pnmcosta
Posts: 8
Joined: 18. Jan 2011, 16:29
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: 1

Cannot allocate memory, but host reports enough is available

Post by pnmcosta »

Hi Everyone,

I've recently purchased and HP Envy 14, running Win7 x64 Home Premium, I have 6GB memory and running VMBox 4.0.2 b69518.

This is my problem, I've migrated a Windows 2008 R2 x64 vbox into the laptop but am not able to allocate more than 1024mb of memory even though the host reports that 4400MB is available! See attached.

I've done a migration of this same guest box before and have never encountered this problem, could it be an issue with the laptop itself?

What could I do to figure that out? I decided to post here for any help before I contact HP as am not sure how much of an help they would be in this case.

Many thanks in advance,
Pedro
Attachments
Capturar.PNG
Capturar.PNG (33.8 KiB) Viewed 13979 times
pnmcosta
Posts: 8
Joined: 18. Jan 2011, 16:29
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: 1

Re: Cannot allocate memory, but host reports enough is available

Post by pnmcosta »

found the issue on the logs:

00:00:05.871 Guest Log: BIOS: Booting from Hard Disk...
00:00:06.646 Display::handleDisplayResize(): uScreenId = 0, pvVRAM=0000000008b20000 w=1024 h=768 bpp=24 cbLine=0xC00, flags=0x1
00:00:11.842 RTC: period=0x200 (512) 64 Hz
00:00:11.967 Display::handleDisplayResize(): uScreenId = 0, pvVRAM=0000000008b20000 w=1024 h=768 bpp=0 cbLine=0x400, flags=0x1
00:00:11.987 Display::handleDisplayResize(): uScreenId = 0, pvVRAM=0000000008b20000 w=640 h=480 bpp=0 cbLine=0x140, flags=0x1
00:00:15.051 PGM: Failed to procure handy pages; rc=VERR_NO_MEMORY rcAlloc=VINF_SUCCESS rcSeed=VINF_SUCCESS cHandyPages=0x8
00:00:15.051 cAllPages=0x6554b cPrivatePages=0x61fe9 cSharedPages=0x0 cZeroPages=0x3539
00:00:15.051 GMM: Statistics:
00:00:15.051 Allocated pages: 5dbed
00:00:15.051 Maximum pages: 6119e
00:00:15.051 Ballooned pages: 0
00:00:15.053 PGM: Failed to procure handy pages; rc=VERR_NO_MEMORY rcAlloc=VINF_SUCCESS rcSeed=VINF_SUCCESS cHandyPages=0x7
00:00:15.053 cAllPages=0x6554b cPrivatePages=0x61fea cSharedPages=0x0 cZeroPages=0x3538
00:00:15.053 GMM: Statistics:
00:00:15.053 Allocated pages: 5dbed
00:00:15.053 Maximum pages: 6119e
00:00:15.053 Ballooned pages: 0
00:00:15.055 VM: Raising runtime error 'HostMemoryLow' (fFlags=0x2)
00:00:15.055 VM: Raising runtime error 'HostMemoryLow' (fFlags=0x2)
00:00:15.055 Changing the VM state from 'RUNNING' to 'SUSPENDING'.
00:00:15.261 AIOMgr: Endpoint for file 'C:\Users\Pedro Costa\VirtualBox VMs\DOT-DEV WIN08\DOT - Development.vdi' (flags 000c0781) created successfully
00:00:15.349 AIOMgr: Endpoint for file 'C:\Users\Pedro Costa\VirtualBox VMs\PMC - Shared Data.vmdk' (flags 000c0781) created successfully
00:00:15.558 Changing the VM state from 'SUSPENDING' to 'SUSPENDED'.
00:00:15.559 Console: VM runtime error: fatal=false, errorID=HostMemoryLow message="Unable to allocate and lock memory. The virtual machine will be paused. Please close applications to free up memory or close the VM"
00:00:15.561 VMR3Suspend:
00:00:15.561 RUNNING -> SUSPENDING, RUNNING_LS -> SUSPENDING_EXT_LS failed, because the VM state is actually SUSPENDED
pnmcosta
Posts: 8
Joined: 18. Jan 2011, 16:29
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: 1

Re: Cannot allocate memory, but host reports enough is available

Post by pnmcosta »

phew, I'm not the only one.

Searching for PGM: Failed to procure handy pages; I came across many issues, but are all for previous versions of VBox

I came across this post http://forums.virtualbox.org/viewtopic. ... et#p164107 which mentions using cacheset, but am not sure how to proceed correctly.

These are the values cacheset reports:
Capturar.PNG
Capturar.PNG (30.47 KiB) Viewed 13971 times
But when I try to clear the cache I get:
Capturar2.PNG
Capturar2.PNG (18.46 KiB) Viewed 13972 times
The max appears to be high, should I lower it? Should I decrease the min?

I'm trying to get at least 2.5gb of ram, not really sure how to proceed, what would be the recommend values for the cache min/max?

Any help would be greatly appreciated...

Cheers,
P.
pnmcosta
Posts: 8
Joined: 18. Jan 2011, 16:29
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: 1

Re: Cannot allocate memory, but host reports enough is available

Post by pnmcosta »

the more I look into this the weirder it gets,

this is what sysinternals process explorer reports, exactly at the time of the error occurs when booting the box:
Sem Título.png
Sem Título.png (63.31 KiB) Viewed 14009 times
as far as I understand, there's 3gb available, and I was trying to boot with 2gb memory!

with the box still paused at this point something interesting happened when I opened paint to save the prt scrn, the screen went black, got a dialog from windows about not enough mem, and after a while ATI's CCC crashed and the monitor resetted to a lower resolution, I had to reboot to get it back.

not sure if it matters but the guest had been running on hosts with nvidia?
hechacker1
Posts: 8
Joined: 6. Feb 2011, 04:30
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Gentoo, Ubuntu, Windows

Re: Cannot allocate memory, but host reports enough is available

Post by hechacker1 »

I have the same problem.

Win 7 x64 host. 12GB RAM. 8GB free with 1 guest running at 2GB. Latest Virtualbox w/ extensions.

Trying to allocate anything more than 2GB seems to cause the out of memory error.

Error ID:
HostMemoryLow


All my guests are 64bit with recommend settings for a Core i7.

I can have 1 guest running with 2GB all day. But I cannot start any other guests or I get that error.

EDIT:

With a 2GB guest already running, I was able to start a 512MB guest. Anything higher than that causes a low-memory error. So I guess I can use 2.5GB total.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Cannot allocate memory, but host reports enough is available

Post by Perryg »

You both need to post a complete guest log (as an attachment) before we can even try to figure out the problem.
hechacker1
Posts: 8
Joined: 6. Feb 2011, 04:30
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Gentoo, Ubuntu, Windows

Re: Cannot allocate memory, but host reports enough is available

Post by hechacker1 »

Here is a log from the second VM running. My other VM was allocating 2GB and doing ok. But this one would halt with the error unless I lowered it's RAM to 512MB or less.
Attachments
Maverick-2011-02-05-18-36-52.log
(85.05 KiB) Downloaded 121 times
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Cannot allocate memory, but host reports enough is available

Post by Perryg »

00:00:00.547 VirtualBox 4.0.2 r69518 win.amd64 (Jan 18 2011 17:03:32) release log
00:00:34.067 Guest Additions information report: Version 4.0.2 r35621 '4.0.2_OSE'
00:01:16.456 Guest Additions capability report: (0x4) seamless: no, hostWindowMapping: no, graphics: yes
00:01:33.011 PGM: Failed to procure handy pages; rc=VERR_NO_MEMORY rcAlloc=VINF_SUCCESS rcSeed=VINF_SUCCESS cHandyPages=0x8

Any reason why you are running the OSE guest additions with the normal VirtualBox build?
I believe that if you remove them and install the guest additions that come with your VirtualBox build it might fix your problem.
hechacker1
Posts: 8
Joined: 6. Feb 2011, 04:30
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Gentoo, Ubuntu, Windows

Re: Cannot allocate memory, but host reports enough is available

Post by hechacker1 »

The reason is that I used the Gnome 3.0 iso. It looks like it comes pre-installed with the additions:

http://gnome3.org/tryit.htm

I'm trying a Win 7 x64 guest now, with 4.0.2 additions.

I'm not getting out of memory errors yet, but with 2800MB allocated to the VM, and when I run Prime95 in the VM to use all the RAM, I am getting "hardware failure."

I'm pretty sure prime95 is a good application, which leads me to believe there is some memory corruption going on. I know my own PC has good working memory by memtest and continued stable use.

I'll report back once I do more tests. I would do a memtest86 test, but it crashes the host (bug report already filed).
hechacker1
Posts: 8
Joined: 6. Feb 2011, 04:30
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Gentoo, Ubuntu, Windows

Re: Cannot allocate memory, but host reports enough is available

Post by hechacker1 »

Ok, after shutting down the Win 7 x64 guest, and adjusting its RAM allocation to 6GB, now it won't even boot past the "Loading Windows" boot animation.

Attached is the log from that.

I'm currently running Prime95 on the host, using 10GB of RAM while I use my machine, and it's stable.
Attachments
Windows 7-2011-02-07-19-22-19.log
(84.42 KiB) Downloaded 112 times
squall leonhart
Posts: 312
Joined: 21. Apr 2010, 10:39
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows XP, 8, 10, Android x86

Re: Cannot allocate memory, but host reports enough is available

Post by squall leonhart »

Virtualbox still has issues with allocating non-contiguous memory.

you can 12, 24GB's, but if the vm cannot allocate a contiguous *GB of memory, it will fail.

Otherwise, Vbox is failing at memory use and is relying on "Free" memory count, rather than "Available"
hechacker1 wrote:The reason is that I used the Gnome 3.0 iso. It looks like it comes pre-installed with the additions:

http://gnome3.org/tryit.htm

I'm trying a Win 7 x64 guest now, with 4.0.2 additions.

I'm not getting out of memory errors yet, but with 2800MB allocated to the VM, and when I run Prime95 in the VM to use all the RAM, I am getting "hardware failure."

I'm pretty sure prime95 is a good application, which leads me to believe there is some memory corruption going on. I know my own PC has good working memory by memtest and continued stable use.

I'll report back once I do more tests. I would do a memtest86 test, but it crashes the host (bug report already filed).
try http://www.virtualbox.org/download/test ... tiArch.exe
hechacker1
Posts: 8
Joined: 6. Feb 2011, 04:30
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Gentoo, Ubuntu, Windows

Re: Cannot allocate memory, but host reports enough is available

Post by hechacker1 »

Tried it, but still getting host memory low errors with RAM allocation at 6GB.

If what you say is true (that I need free contiguous RAM), then any amount of RAM allocated could trigger the error, if my host RAM is fragmented.

I'm hoping for the next version to fix this bug.
Attachments
Windows 7-2011-02-08-13-47-28.log
(90.91 KiB) Downloaded 113 times
squall leonhart
Posts: 312
Joined: 21. Apr 2010, 10:39
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows XP, 8, 10, Android x86

Re: Cannot allocate memory, but host reports enough is available

Post by squall leonhart »

hechacker1 wrote:Tried it, but still getting host memory low errors with RAM allocation at 6GB.

If what you say is true (that I need free contiguous RAM), then any amount of RAM allocated could trigger the error, if my host RAM is fragmented.

I'm hoping for the next version to fix this bug.
just don't hang yourself from a clothesline with hope :(
pnmcosta
Posts: 8
Joined: 18. Jan 2011, 16:29
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: 1

Re: Cannot allocate memory, but host reports enough is available

Post by pnmcosta »

Hi Guys,

I've solved my problem, ObjectDock was the memory hog!

HP Envy comes with a custom style for win7 using ObjectDock, disabling it and reverting back to standard theme solved my problem!

Maybe that could be your problem? have you got any custom theming, etc running?

Cheers,
P.
squall leonhart
Posts: 312
Joined: 21. Apr 2010, 10:39
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows XP, 8, 10, Android x86

Re: Cannot allocate memory, but host reports enough is available

Post by squall leonhart »

no.
Post Reply