Guru Meditation crash on Windows 10 VM restart only

Discussions related to using VirtualBox on Windows hosts.
Post Reply
vbpaul
Posts: 5
Joined: 27. Sep 2019, 15:27

Guru Meditation crash on Windows 10 VM restart only

Post by vbpaul »

I'm running a Windows 10 Host, with a Windows 10 Pro (64-bit) virtual machine. Everything works perfectly, but in 90% of cases (but not always!) when I try to restart the VM (via the Windows "Restart" command), I get a "Guru Mediation" crash early into the boot process. Normal shutdown/bootup is always fine, it is only in the case of a "Restart" that this case happens.

This is supposed to be a standalone system, so I would like to automate restarts.

I looked through the logs (attached), and I can see a "VERR_PGM_HANDLER_NOT_FOUND" error, but I couldn't find any reference to this error.
Attachments
Logs.zip
(161.32 KiB) Downloaded 31 times
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Guru Meditation crash on Windows 10 VM restart only

Post by mpack »

I had no difficulty finding past references. Perhaps you need to use a different search engine.

I would try the top hit.

https://www.google.com/search?as_q=&as_ ... by+licence
vbpaul
Posts: 5
Joined: 27. Sep 2019, 15:27

Re: Guru Meditation crash on Windows 10 VM restart only

Post by vbpaul »

Yes, I've read through many of those, but I haven't been able to find a concrete cause or solution. I am now suspecting it may be a RAM issue as I have read that PGM means "PaGed Memory manager"
vbpaul
Posts: 5
Joined: 27. Sep 2019, 15:27

Re: Guru Meditation crash on Windows 10 VM restart only

Post by vbpaul »

Update; I installed more RAM (16GB total), and allocated 8GB to the VM. This is double what it was, and the issue still persists.

I believe I have isolated the issue. The Guru Meditation crash on restart happens if the VM was turned off via a "save state", and then restored. It does not seem to happen on a fresh boot if a save state did not take place.

The reason why I wanted to do the save state is so that I could pause the VM to do a backup. I guess I will have to do a full shutdown, backup, restart now. The issue with that is that it is difficult to write a batch file that will shut down the machine, as the command to do so (acpipowerbutton) does not wait until the machine is fully shut down.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Guru Meditation crash on Windows 10 VM restart only

Post by socratis »

vbpaul wrote:I looked through the logs (attached), and I can see a "VERR_PGM_HANDLER_NOT_FOUND" error, but I couldn't find any reference to this error.
A quick search for "VERR_PGM_HANDLER_NOT_FOUND site:forums.virtualbox.org" showed: where your problem (Restore from Saved State) seems to be the main theme...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Guru Meditation crash on Windows 10 VM restart only

Post by mpack »

vbpaul wrote:I guess I will have to do a full shutdown, backup, restart now.
Hmm. Saved state crashes typically only happen if you changed your host, or changed your VirtualBox version, or changed your VM recipe, and then try to restore a now incompatible saved state.

This shouldn't arise if all you do is save state, close, backup, restart - and do full shutdowns otherwise.
vbpaul
Posts: 5
Joined: 27. Sep 2019, 15:27

Re: Guru Meditation crash on Windows 10 VM restart only

Post by vbpaul »

It doesn't happen if I do a full SHUTDOWN, but it happens when I try to do a restart from within the VM.

My original plan was to do a savestate, backup, start VM. That works. However I need to automate reboots of the VM because some of the databases that I'm running seem to need it to happen once in a while. When I tried to do this, I would get the Guru Meditation.

My best guess is that the Guru Meditation happens only after I had done a savestate, but this is not 100% confrimed. I did a few tests and was able to reboot properly (from the VM) after a start, but it could perhaps be a factor of something running after a while.

My solution now is to do an ACPIPOWERBUTTON call from a batch script to shutdown the VM completely, do the backup and then restart. In this way, I get the backup and reboot in one shot. It was a bit tricky to get the batch file working (I have to wait until the VM is fully shut down, which the vboxmanage command does not do with the acpipowerbutton call), but I got it sorted.
Last edited by socratis on 2. Oct 2019, 21:54, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Guru Meditation crash on Windows 10 VM restart only

Post by scottgus1 »

FWIW a saved-state backup is not as good as a full-shutdown backup. When the guest is save-stated, the guest OS gets paused in a state where it thinks it is still running. Then if you have to restore the backup to other hardware (or possibly the same hardware if something has changed, even the Virtualbox version can be enough of a change) you will have to scrap the saved state, then your OS is turning on after a power-loss while running. Data corruption and loss can occur. (Databases are dirty, memory-stored caches didn't flush, etc.)

If the OS is fully shut down while backing up, then it can be restored rather more reliably.

Here's what I came up with for automatic shutdown and backup, using a Windows host batch loop with this:

Code: Select all

"C:\Program Files\Oracle\VirtualBox\vboxmanage" controlvm <vmname> acpipowerbutton
set /a statecount = 0
:waitforshutdown
"C:\Program Files\Oracle\VirtualBox\vboxmanage" showvminfo <vmname> > status.txt
find /i /n "State:           powered off" status.txt > nul
if "%Errorlevel%"=="0" goto shutdowngood
find /i /n "State:           saved" status.txt > nul
if "%Errorlevel%"=="0" goto shutdowngood
TIMEOUT /T 10 /NOBREAK
set /a statecount += 1
if %statecount%==180 goto guestlockedup
goto waitforshutdown

:guestlockedup
"C:\Program Files\Oracle\VirtualBox\vboxmanage" controlvm <vmname> poweroff
TIMEOUT /T 10 /NOBREAK

:shutdowngood
{continue with backup}
....
This batch segment checks if the guest is shut down (or saved), then proceed with the backup. If the guest locks up, the above code will not find the correct text in "showvminfo". A counter loop can accrue a particular amount of desired time, (in the above example, 10 seconds per loop timeout x 180 loops = 1800 seconds or a half hour delay). Then it will issue the command to kill the guest mercilessly.

I also had a heartbeat script running in the guest to write a text file in a host shared folder every 30 seconds. The full host backup script I had would also monitor for the appearance of this file, delete it, and reset the kill counter and/or resend the acpipowerbutton command or some other commands like keyboard scan codes to get the guest OS's attention. The assumption being that if the guest heartbeat script was still able to run then the guest OS was still alive and should not be killed yet.

What did you come up with?
caspertone
Posts: 54
Joined: 2. Apr 2014, 10:27

Re: Guru Meditation crash on Windows 10 VM restart only

Post by caspertone »

Something smalls bad...

See viewtopic.php?f=6&t=94381&p=461945#p461945
See viewtopic.php?f=2&t=95107&p=460050#p460050
See https://www.virtualbox.org/ticket/19007

Time to join all threads and take closer the possibility of the bug?
Post Reply