Ubuntu VM hangs/freeze after login (xpra)

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Rogster
Posts: 5
Joined: 8. Jan 2020, 15:05

Ubuntu VM hangs/freeze after login (xpra)

Post by Rogster »

[SOLUTION]
xpra - caused the freeze, removed it and all went back to normal.

Host = Windows 10. Virtualization enabled in bios, hyper-v disabled in features.
Guest = Ubuntu 18.04 64bit desktop.

I install fresh 18.04 desktop Ubuntu, I download openssh, allow root via ssh, setup forwarding and do everything via putty. But I want to keep desktop alive, because I want to have comfortable Sublime editor and GUI folders to navigate around different projects. I also install Guest Additions, but it doesn't affect the problem, I get it with or without Guest Additions. I tried with and without extension pack. Past 3 days I googled and tried all solutions that I found, with no success. I tried moving to lightdm from gdm3, I tried to change all kinds of options in hardware configuration and their settings. I also tried to reset all overclock to stock to make sure this is not caused by potential memory errors?.. So coming to the problem, Ubuntu freezes right after I enter my login password, desktop gui loads and I cannot click anything anymore and my keyboard is not responsive. ctrl alt f1 f2 f3 not responding, send shutdown signal no response, but power off does power it off. reboot and shutdown from ssh works perfectly fine.
I kept setting up new VM many times and symptoms are little bit different, sometimes it hangs at the login password stage, not letting me enter the password, sometimes it lets me enter password and hangs right after it loads the desktop gui. When it hangs, I can still access VM with ssh without any problems. I tried using VMware and I ended up with exactly the same result.

Everything works fine until I install my dependencies for Mujoco-py. I started VM, reproduced problem, shut it down and saved log, attached it. Below is what I install to reproduce the problem.
These are Mujoco-py requirements prior to installation.


I install anaconda Anaconda3-2019.10-Linux-x86_64.sh
I create virtual environment with anaconda, I activate it. Then..

Code: Select all

apt-get update -q \
    && DEBIAN_FRONTEND=noninteractive apt-get install -y \
    curl \
    git \
    libgl1-mesa-dev \
    libgl1-mesa-glx \
    libglew-dev \
    libosmesa6-dev \
    software-properties-common \
    net-tools \
    unzip \
    vim \
    virtualenv \
    wget \
    xpra \
    xserver-xorg-dev \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/*
--
edited due to 1 day rule to post urls***

curl -o /usr/local/bin/patchelf ####s3-us-west-2.amazonaws#com/openai-sci-artifacts/manual-builds/patchelf_0.9_amd64.elf \
    && chmod +x /usr/local/bin/patchelf
--
Install these too

imagehash>=3.4
ipdb
Pillow>=4.0.0
pycparser>=2.17.0
pytest>=3.0.5
pytest-instafail==0.3.0
sphinx
sphinx_rtd_theme
numpydoc
glfw>=1.4.0
numpy>=1.11
Cython>=0.27.2
imageio>=2.1.2
cffi>=1.10
fasteners~=0.15
Please help me solve this, I understand that this is probably due to one of the dependencies. Maybe logs contain some clues.
Attachments
dotvm-2020-01-08-17-06-43.7z
(27.93 KiB) Downloaded 10 times
Last edited by Rogster on 8. Jan 2020, 22:02, edited 1 time in total.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Ubuntu VM hangs/freeze after login

Post by scottgus1 »

Your Virtualbox, Extension Pack and Guest Additions versions all match, good.

You have all four physical host cores in the guest:
00:00:04.245918   NumCPUs <integer> = 0x0000000000000004 (4)
00:00:04.874007 CPUM: Physical host cores: 4
Sometimes having all host cores in the guest can cause instability. Roll that back to 2 guest cores & re-install the guest OS.

You have 3D accleration turned on:
00:00:04.246092 [/Devices/vga/0/Config/] (level 4)
00:00:04.246093   3DEnabled  <integer> = 0x0000000000000001 (1)
00:00:04.246098   VRamSize    <integer> = 0x0000000008000000 (134 217 728, 128 MB)
Crank the video ram up to the max 256 MB, might have something to do with it if 3D is on.

The log didn't seem to show any obvious glitches while the guest was running.

One suggestion, not pertinent to the problem, but can cause trouble if you dabble in snapshots or try to move the guest: After installing Guest Additions, remove the GAs CD from the guest CD drive.
Rogster
Posts: 5
Joined: 8. Jan 2020, 15:05

Re: Ubuntu VM hangs/freeze after login

Post by Rogster »

scottgus1 wrote:Your Virtualbox, Extension Pack and Guest Additions versions all match, good.

You have all four physical host cores in the guest:
00:00:04.245918   NumCPUs <integer> = 0x0000000000000004 (4)
00:00:04.874007 CPUM: Physical host cores: 4
Sometimes having all host cores in the guest can cause instability. Roll that back to 2 guest cores & re-install the guest OS.

You have 3D accleration turned on:
00:00:04.246092 [/Devices/vga/0/Config/] (level 4)
00:00:04.246093   3DEnabled  <integer> = 0x0000000000000001 (1)
00:00:04.246098   VRamSize    <integer> = 0x0000000008000000 (134 217 728, 128 MB)
Crank the video ram up to the max 256 MB, might have something to do with it if 3D is on.

The log didn't seem to show any obvious glitches while the guest was running.

One suggestion, not pertinent to the problem, but can cause trouble if you dabble in snapshots or try to move the guest: After installing Guest Additions, remove the GAs CD from the guest CD drive.
Thanks, I tried to switch off 3D and run it on 1 core. Also tried same without snapshots and tried removing CD. It shows 8 cores, I put 4 because 4 is on green line. I tried RAM from 3gb to 28gb. And for the video memory, in Virtualbox I have it limited at 128 which I tried, in VMware I could do 3gb, tried 3gb and still no changes. Hangs after login.

Right now I am installing dependencies 1 by 1 to see which one might affect it. Will update.
Rogster
Posts: 5
Joined: 8. Jan 2020, 15:05

Re: Ubuntu VM hangs/freeze after login

Post by Rogster »

Divided all dependencies into 3, then narrowed it down to one

This one

Code: Select all

    apt-get install -y \
    xpra \
As soon as it is installed and rebooted, Ubuntu gui freezes after login.

Googled this "The version provided by Ubuntu in their repos is fundamentally broken and dangerous to use"

So I guess I just need to find a stable version of xpra and problem will be fixed.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Ubuntu VM hangs/freeze after login

Post by scottgus1 »

I'm fairly certain the Windows folks like myself wouldn't know how to fix this. If your guest remains stable until this package is installed, then it probably isn't a problem with your Virtualbox.

Googling Xpra shows it's some form of individual-window remote software: in a sense, remote individual windows instead of a remote desktop. If this is an accurate assessment, are you trying to remote windows into the guest, or remote the guest's windows out of the guest?
Rogster
Posts: 5
Joined: 8. Jan 2020, 15:05

Re: Ubuntu VM hangs/freeze after login

Post by Rogster »

scottgus1 wrote:I'm fairly certain the Windows folks like myself wouldn't know how to fix this. If your guest remains stable until this package is installed, then it probably isn't a problem with your Virtualbox.

Googling Xpra shows it's some form of individual-window remote software: in a sense, remote individual windows instead of a remote desktop. If this is an accurate assessment, are you trying to remote windows into the guest, or remote the guest's windows out of the guest?
Yea its not a problem with virtualbox, I read that ubuntu has very outdated xpra package in its reps. Will try pip one now, will see what happens.

No it crashes Ubuntu gui as soon as you login if xpra is installed.
Rogster
Posts: 5
Joined: 8. Jan 2020, 15:05

Re: Ubuntu VM hangs/freeze after login

Post by Rogster »

Update, tried different xpra versions without success.

Instead installed

Code: Select all

apt-get install -y xvfb
And also was missing in the end, but not related to freeze.

Code: Select all

apt install build-essential
mujoco_py imported successfully.


What a great experience with Virtualbox. Snapshots are just amazing.
fth0
Volunteer
Posts: 5677
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Ubuntu VM hangs/freeze after login

Post by fth0 »

Rogster wrote:Update, tried different xpra versions without success.
I use X2Go instead of xpra. Maybe also worth a try for you.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Ubuntu VM hangs/freeze after login (xpra)

Post by scottgus1 »

Rogster wrote:Snapshots are just amazing.
They sure can be, yes, but be careful with them. If your data is the kind you'd cry enough tears to green the Sahara if when you lose the guest, then don't use snapshots on that guest. They make a guest more delicate and if some error, PC or pebcak, gets in the way, your data can be lost with no recovery possible. Alternatively, be sure the data is backed up and restorable, then snapshot away!
Post Reply