Ubuntu host / Kali Guest: VM freezes any time it's left for a while

Discussions related to using VirtualBox on Linux hosts.
0xdf
Posts: 12
Joined: 19. Sep 2018, 14:36

Ubuntu host / Kali Guest: VM freezes any time it's left for a while

Post by 0xdf »

I have an Ubuntu 18.04 host, and I work every day out of a Kali Linux guest. About a week ago, it started that any time I'd come back to the computer after being gone for a while (hour or more?), after unlocking the host system, I'd see the guest just as I left it, and I could move the mouse around over it, but no clicks or key presses would interact with the system. Eventually, I would close the window to power down the host, and reboot it, and it would be fine. I've tried turning it off and saving state, but it remains stuck on re-open.

Yesterday, I rebuilt a new Kali VM, thinking that it might be something wrong with that VM, and this morning, the new one was stuck as well.

I would like help troubleshooting this. What logs should I be looking in? Is there something I should be doing from the host command line to try to interact with the guest and get it unstuck?

Computer Details
Host: Ubuntu 18.04 4.15.0-34-generic, 32 GB ram, Intel Core i7-7700
Guest Kali 4.18.0-kali1-amd64, 6 GB ram

Thanks in advance.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Ubuntu host / Kali Guest: VM freezes any time it's left for a while

Post by mpack »

Please post a VM log file. With the VM fully shut down, right click and "Show Log" in the GUI, save "VBox.log" (no other file) to a zip, and attach the zip here.
0xdf
Posts: 12
Joined: 19. Sep 2018, 14:36

Re: Ubuntu host / Kali Guest: VM freezes any time it's left for a while

Post by 0xdf »

Here's the log as requested.
Attachments
vboxlog.zip
(27.45 KiB) Downloaded 23 times
0xdf
Posts: 12
Joined: 19. Sep 2018, 14:36

Re: Ubuntu host / Kali Guest: VM freezes any time it's left for a while

Post by 0xdf »

I should add, I had just gone to make some lunch, come back to find things frozen (after 30 minutes?), and had just rebooted when I saw your note. So I powered down without even logging in, and got that log.
0xdf
Posts: 12
Joined: 19. Sep 2018, 14:36

Re: Ubuntu host / Kali Guest: VM freezes any time it's left for a while

Post by 0xdf »

If I'm deducing correctly, each log is for a specific boot, with the time being time since boot? Is that right?

Assuming yes, I'm looking at the VBox.log.1 now, which is a boot that involved a freeze. The first 00:01:04 shows boot up, and then there's a bunch of stuff at 01:13:28 that looks like this:

Code: Select all

01:13:27.281106 GUI: UIMachineLogic: Host-screen count changed
01:13:27.586351 GUI: UIDesktopWidgetWatchdog::sltHandleHostScreenResized: Screen 0 is formally resized to: 0x0 x 1600x900
01:13:27.587806 GUI: UIMachineLogic: Host-screen geometry changed
01:13:27.587847 GUI: UIDesktopWidgetWatchdog::sltHandleHostScreenWorkAreaResized: Screen 0 work area is formally resized to: 0x27 x 1600x873
01:13:27.594230 GUI: UIDesktopWidgetWatchdog::sltHandleHostScreenResized: Screen 1 is formally resized to: 1600x0 x 1920x1080
01:13:27.599971 GUI: UIMachineLogic: Host-screen geometry changed
01:13:27.600084 GUI: UIDesktopWidgetWatchdog::sltHandleHostScreenWorkAreaResized: Screen 1 work area is formally resized to: 1600x27 x 1920x1053
01:13:28.039778 GUI: UIDesktopWidgetWatchdog::sltHandleHostScreenAvailableGeometryCalculated: Screen 0 work area is actually resized to: 0x27 x 1600x873
My host system is running 3 monitors. Is it possible that it's something with how Ubuntu is going to sleep / locking?
Attachments
vboxlog1.zip
(28.77 KiB) Downloaded 15 times
0xdf
Posts: 12
Joined: 19. Sep 2018, 14:36

Re: Ubuntu host / Kali Guest: VM freezes any time it's left for a while

Post by 0xdf »

The previous failure has a similar thing. Boot logs for 43 seconds, then the Host-screen count changes:

Code: Select all

00:00:43.038427 GUI: UIMediumEnumerator: Medium-enumeration finished!
01:34:33.755916 ERROR [COM]: aRC=NS_ERROR_INVALID_ARG (0x80070057) aIID={50ce4b51-0ff7-46b7-a138-3c6e5ac946b4} aComponent={GuestDnDTargetWrap} aText={No or not supported format(s) specified}, preserve=false aResultDetail=0
02:29:25.133921 GUI: UIMachineLogic: Host-screen count changed
02:29:25.422883 GUI: UIDesktopWidgetWatchdog::sltHandleHostScreenResized: Screen 0 is formally resized to: 0x0 x 1600x900
02:29:25.425842 GUI: UIMachineLogic: Host-screen geometry changed
02:29:25.425905 GUI: UIDesktopWidgetWatchdog::sltHandleHostScreenWorkAreaResized: Screen 0 work area is formally resized to: 0x27 x 1600x873
02:29:25.427164 GUI: UIDesktopWidgetWatchdog::sltHandleHostScreenResized: Screen 1 is formally resized to: 1600x0 x 1920x1080
02:29:25.428243 GUI: UIMachineLogic: Host-screen geometry changed
02:29:25.428295 GUI: UIDesktopWidgetWatchdog::sltHandleHostScreenWorkAreaResized: Screen 1 work area is formally resized to: 1600x27 x 1920x1053
02:29:25.913625 GUI: UIDesktopWidgetWatchdog::sltHandleHostScreenAvailableGeometryCalculated: Screen 0 work area is actually resized to: 0x27 x 1600x873
02:29:25.913699 GUI: UIMachineLogic: Host-screen available-area changed
02:29:25.919874 GUI: UIDesktopWidgetWatchdog::sltHandleHostScreenAvailableGeometryCalculated: Screen 1 work area is actually resized to: 1600x27 x 1920x1053
02:29:25.919918 GUI: UIMachineLogic: Host-screen available-area changed
02:29:26.005039 GUI: UIMachineView::sltPerformGuestResize: Sending guest size-hint to screen 0 as 1600x801 if necessary
02:29:26.005145 VMMDev: SetVideoModeHint: Got a video mode hint (1600x801x32)@(0x0),(1;0) at 0
Lots of that until I tell it to shutdown at 03:23:14.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Ubuntu host / Kali Guest: VM freezes any time it's left for a while

Post by socratis »

0xdf wrote:If I'm deducing correctly, each log is for a specific boot, with the time being time since boot? Is that right?
No, the time in each log is relative to the VM start up time. VBox.log is from the last complete VM run, VBox.log.1 is from the previous run, etc. So you can't analyze it like that.
00:00:00.306645 Guest OS type: 'Linux_64'
You said your guest is Kali, no? Change the template to Debian_64 then. Kali is Debian based.
00:00:28.672583 GUI: UIMediumEnumerator: Medium-enumeration finished!
00:01:56.066306 OHCI: Software reset
00:01:56.165976 TM: Switching TSC mode from 'RealTscOffset' to 'VirtTscEmulated'
00:01:56.169423 ACPI: Entering S5 power state (power down)
00:01:56.169563 Changing the VM state from 'RUNNING' to 'POWERING_OFF'
To me it looks like after about 2 hr, the VM shuts down normally. So, I don't see anything funny in there. Maybe this isn't the proper log/situation? Here's what you need to do for the correct log:
  • Start your VM.
  • Go for lunch/coffee/beer, return to find the VM frozen.
  • If you can't close the VM normally, force-shut it down, close the window.
  • Get that VBox.log, ZIP it and post it.
  • If you can get the relative times that would be a great help.
When posting a random log, from a random run, with random settings, that doesn't help identify the problem. We'd like to see "The Log" where/when the problem occurs.
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.
0xdf
Posts: 12
Joined: 19. Sep 2018, 14:36

Re: Ubuntu host / Kali Guest: VM freezes any time it's left for a while

Post by 0xdf »

No, the time in each log is relative to the VM start up time. VBox.log is from the last complete VM run, VBox.log.1 is from the previous run, etc. So you can't analyze it like that.
Sorry if I was unclear. That's what I meant. So the first log I posted didn't have the frustrating behavior. I was just following the instructions given.
To me it looks like after about 2 hr, the VM shuts down normally.
Did you mean after two minutes? If so, that's the log with nothing in it.

But the second one I posted is the example of the behavior - an example where the box was frozen. Please check out that one vboxlog1.zip.
You said your guest is Kali, no? Change the template to Debian_64 then. Kali is Debian based.
Ok, will do, thanks for the heads up.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Ubuntu host / Kali Guest: VM freezes any time it's left for a while

Post by socratis »

0xdf wrote:Did you mean after two minutes?
Please remind me to go to the eye doctor and then to the math tutor. Oops :o

Will check the log.1 then. Do you know how much time did you leave it alone running? Approximately?
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.
0xdf
Posts: 12
Joined: 19. Sep 2018, 14:36

Re: Ubuntu host / Kali Guest: VM freezes any time it's left for a while

Post by 0xdf »

I'd guess 15 minutes? The screen savor was on on my host when I got back.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Ubuntu host / Kali Guest: VM freezes any time it's left for a while

Post by socratis »

Besides the screen-saver, are you maybe having your host to go to low energy mode, or even sleeping?
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.
0xdf
Posts: 12
Joined: 19. Sep 2018, 14:36

Re: Ubuntu host / Kali Guest: VM freezes any time it's left for a while

Post by 0xdf »

I don't have the machine set to suspend, but the screens turn off.

In the Ubuntu power, settings:
"Blank Screen" was set to 5 minutes.
"Automatic Suspend" was set to off.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Ubuntu host / Kali Guest: VM freezes any time it's left for a while

Post by socratis »

01:13:27.281106 GUI: UIMachineLogic: Host-screen count changed
01:13:27.586351 GUI: UIDesktopWidgetWatchdog::sltHandleHostScreenResized: Screen 0 is formally resized to: 0x0 x 1600x900
01:13:27.587806 GUI: UIMachineLogic: Host-screen geometry changed
That's when it seems to wake up after a long period of inactivity.
01:27:39.649334 Changing the VM state from 'RUNNING' to 'SUSPENDING'
That's the beginning of the shutting down/forcing close the VM window. Game over.

Now, in between, the only thing that I see is a series of GUI related messages. They don't seem to show anything problematic.

But, I think that you might be onto something with the 3 monitor setup. Can you go single monitor, wait 5' for the screen saver to kick in and see if it happens again? Assuming that is that this behavior happens when the screen saver kicks in.

Oh, and one other thing. Can you SSH in the VM when this happens?
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.
0xdf
Posts: 12
Joined: 19. Sep 2018, 14:36

Re: Ubuntu host / Kali Guest: VM freezes any time it's left for a while

Post by 0xdf »

It's not that reliable that it happens every time the screensave kicks in. I haven't had ssh open on the VM (it's vpning into hostile networks). But I could turn it on to just listen on the local interface. I'll try that, and then try ssh next time it happens.

I don't think I played with it for 14 minutes before killing it. But it's possible I was working on other things on the host.

I have tried to run commands on it using vboxmanage, but I've not really gotten that to work when it's not frozen...
0xdf
Posts: 12
Joined: 19. Sep 2018, 14:36

Re: Ubuntu host / Kali Guest: VM freezes any time it's left for a while

Post by 0xdf »

Ok. So I just did a restore back to previous snapshot. I watched the logs as I acted. The first 13 seconds are the machine booting.

Then, around 26 seconds, I did a windowskey-l to lock my host os. All three screens go to lock screen for a second, and then just dark (all searching for signal), and then to black but i can see the mouse pointer on one of them.

I count to 30.

Then, I log back in, and refresh the logs. There's logs at 30 when I lock, but no new logs since logging back in. The VM image is scrambled.

I unmaximize the guest window, and remaximize it, and the actual guest windows was resized to a very small window, and was frozen.

I am able to ssh into the box whenever it is stuck.

Log file attached.
Attachments
vboxlog.zip
(27.82 KiB) Downloaded 14 times
Post Reply