Ubuntu VB crashing

Discussions related to using VirtualBox on Windows hosts.
Post Reply
CactusWren
Posts: 28
Joined: 4. Dec 2021, 18:47

Ubuntu VB crashing

Post by CactusWren »

Some assorted issues here are making the installation unuseable:

1. current state failed to open
2. after opening a previous snapshot, crashes
3. the last time, it gave me the option of shutting down and

log is here, as it's too large to attach:

https://drive.google.com/file/d/1sRujQ6 ... sp=sharing

Note that my computer just got out of the shop, as it was hanging on boot, and the tech told me there were tons of "paging errors" (I think that was the term he used) with regards to the S: drive on which this VB machine is stored. Everything had seemed to be working fine yesterday when I got it back.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Ubuntu VB crashing

Post by scottgus1 »

Zipped logs always fit.

Start the VM from full normal shutdown, not save-state. Run until you see the problem happen, then shut down the VM from within the VM's OS if possible. If not possible, close the Virtualbox window for the VM with the Power Off option set.

Right-click the VM in the main Virtualbox window's VM list, choose Show Log. Save the far left tab's log, zip it, and post the zip file, using the forum's Upload Attachment tab.
CactusWren
Posts: 28
Joined: 4. Dec 2021, 18:47

Re: Ubuntu VB crashing

Post by CactusWren »

scottgus1 wrote:Zipped logs always fit.

Start the VM from full normal shutdown, not save-state. Run until you see the problem happen, then shut down the VM from within the VM's OS if possible. If not possible, close the Virtualbox window for the VM with the Power Off option set.

Right-click the VM in the main Virtualbox window's VM list, choose Show Log. Save the far left tab's log, zip it, and post the zip file, using the forum's Upload Attachment tab.
Okay, I did that.

Ubuntu wanted me to update so I started to run that. Meanwhile, I went to change the power settings so it wouldn't turn off the monitor and everything froze up. I wasn't able to unfreeze it, so I used the Power Off. Then it froze on "Stopping the virtual machine..." I ended up stopping the Task in Windows Task manager. It now says Aborted.

I have zipped and attached the resulting log. Let me know if there is a better way to do this--thanks.
Attachments
log_second_try.zip
(28.13 KiB) Downloaded 5 times
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Ubuntu VB crashing

Post by scottgus1 »

The VM is logging lots of these:
00:17:01.839940 PDMR3Suspend: after 389566 ms, 395 loops: 1 async tasks - ahci/0
But I don't know what they mean.
CactusWren wrote:Ubuntu wanted me to update so I started to run that.
Ubuntu is known to go to black-screen when there is not enough disk space available to start the desktop environment. This happens on real PCs too. The update may have filled up the VM's disk.

The usual method for fixing this is to either log into the VM text-only and delete stuff in the VM, or increase the disk size. The VM's snapshots complicate the disk size increase, see How to Resize a Drive. So deleting stuff is probably your best bet.

Web-search how to fix Ubuntu black-screen because of too little disk space, do what the web-search says to the VM, and please let us know what happened.
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 VB crashing

Post by mpack »

The OP created a 150GB drive and has a number of snapshots. I would be looking at host disk space availability.

Also, starving the host of CPU will not be helping. Reduce the vCPU allocation to no more than 4 cores. 2 cores is usually the sweet spot.

The OP has enabled 3D acceleration but only provided 79MB graphics RAM to handle 2K display sizes. I would recommend maxing out the display RAM parameter.
CactusWren
Posts: 28
Joined: 4. Dec 2021, 18:47

Re: Ubuntu VB crashing

Post by CactusWren »

mpack wrote:The OP created a 150GB drive and has a number of snapshots. I would be looking at host disk space availability.

Also, starving the host of CPU will not be helping. Reduce the vCPU allocation to no more than 4 cores. 2 cores is usually the sweet spot.

The OP has enabled 3D acceleration but only provided 79MB graphics RAM to handle 2K display sizes. I would recommend maxing out the display RAM parameter.
The drive has 1TB and only 300GB is used. The problem VB is using dynamic memory and the size is 150GB (only 11 or so used currently).

I switched off 3D Acceleration and increased Video Memory to max. Oddly, it seems the 3d Acceleration renabled itself, but I could be wrong.

I put the CPU to 2 Processors.

Playing around in the VBs this morning, I am still having issues. It seems to crop up a lot when trying to update.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Ubuntu VB crashing

Post by fth0 »

log_second_try.txt wrote:
00:10:32.272552 I/O cache: Error while writing entry at offset 19455279104 (1310720 bytes) to medium "ahci-0-0" (rc=VERR_NO_MEMORY)
00:10:32.272674 VM: Raising runtime error 'BLKCACHE_IOERR' (fFlags=0x6)
00:10:32.272905 Changing the VM state from 'RUNNING' to 'SUSPENDING'
00:10:32.273043 PDMR3Suspend: after     0 ms, 1 loops: 1 async tasks - ahci/0
The first reported error is an out of memory error inside the I/O Cache, probably within the RunTime Memory Cache, which is used for internal structures like I/O Contexts. For the background reason I can only guess: My first suspect would be the stack of 6 virtual disk images (5 snapshots). You could try if reducing the number of snapshots makes a difference.
CactusWren
Posts: 28
Joined: 4. Dec 2021, 18:47

Re: Ubuntu VB crashing

Post by CactusWren »

Thanks, I had been using things and was able to apt-get and add some programs and having no problem for a few hours, then today, it crashed again. My screens both went completely black for a minute, with flashes of my Host windows here and there, then the VB just disappeared and (Aborted). I attached another log.

I deleted a few snapshots and will continue to test.

Some additional information: When I took my computer in, my tech guy said the drive on which the images were stored was weird and had hundreds of "paging errors." But at the time he gave it to me, he said everything looked fine as far as he could tell.
Attachments
log_third_try.zip
(24.14 KiB) Downloaded 1 time
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Ubuntu VB crashing

Post by fth0 »

log_third_try.txt wrote:
00:00:03.248518 Host RAM: 16191MB (15.8GB) total, 6075MB (5.9GB) available
00:00:03.444662   RamSize           <integer> = 0x0000000200000000 (8 589 934 592, 8 192 MB, 8.0 GB)
00:02:41.573779 PGM: Failed to procure handy pages; rc=VERR_NO_PAGE_MEMORY rcAlloc=VINF_SUCCESS rcSeed=VINF_SUCCESS cHandyPages=0x1e
00:02:41.573783      cAllPages=0x208647 cPrivatePages=0x1245be cSharedPages=0x0 cZeroPages=0xe4064
This time you're providing memory to the VM that you haven't available on your host.
CactusWren
Posts: 28
Joined: 4. Dec 2021, 18:47

Re: Ubuntu VB crashing

Post by CactusWren »

fth0 wrote:
log_third_try.txt wrote:
00:00:03.248518 Host RAM: 16191MB (15.8GB) total, 6075MB (5.9GB) available
00:00:03.444662   RamSize           <integer> = 0x0000000200000000 (8 589 934 592, 8 192 MB, 8.0 GB)
00:02:41.573779 PGM: Failed to procure handy pages; rc=VERR_NO_PAGE_MEMORY rcAlloc=VINF_SUCCESS rcSeed=VINF_SUCCESS cHandyPages=0x1e
00:02:41.573783      cAllPages=0x208647 cPrivatePages=0x1245be cSharedPages=0x0 cZeroPages=0xe4064
This time you're providing memory to the VM that you haven't available on your host.
Wow, good catch... I wonder what could be causing this. I am mostly only running Chrome in my host when I am using the VB. I have heard that Chrome often hogs available RAM. I moved the RAM down to 4GB for now.
CactusWren
Posts: 28
Joined: 4. Dec 2021, 18:47

Re: Ubuntu VB crashing

Post by CactusWren »

I have adjusted my VB settings and am running it with Chrome and all non-essential apps closed in my host, but I am still having some difficulties. Today, it took a long time to type in Chrome (in the VB), and eventually the Guest froze up completely and ignored a shutdown signal. I had to power it off. I guess things aren't optimized yet. Would appreciate some guidance on how to get this thing working.

The Host is i5 9th generation with 16 GB RAM.

When I try to do the same operations in the Host, without using VB, things are much snappier and Task Manager shows much less CPU use. I am hoping to get things close to that state while in the VB if possible.

For reference, what I am doing in the VB is using Cypress and Chrome to test websites running on apache.

NOTE: I opened gnome-system-monitor and notice that my Swap usage looks to be very high--100% or 99.5%. Is this a problem?
Attachments
after_freeze.rar
(15.8 KiB) Downloaded 1 time
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Ubuntu VB crashing

Post by fth0 »

CactusWren wrote:Swap usage looks to be very high--100% or 99.5%. Is this a problem?
Yes, you're perhaps in a situation called "Thrashing" then. In a well-equipped system, the swap space is not needed for the running applications, but only for the OS to page out rarely needed memory contents, to enlarge the available free memory to use for disk cache and buffers. For example, on one of my Linux hosts with 32 GB RAM the swap space is rarely used more than 5%.
Post Reply