New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VMs gets not enough memory at startup #392

Closed
marmarek opened this Issue Mar 8, 2015 · 5 comments

Comments

Projects
None yet
2 participants
@marmarek
Member

marmarek commented Mar 8, 2015

Reported by joanna on 25 Dec 2011 19:14 UTC
... and gui agent doesn't startup:

user# cat /var/log/qubes/gui_agent.log
fork cmd: Cannot allocate memory
Waiting on /var/run/xf86-qubes-socket socket...
user# free -m
total used free shared buffers cached
Mem: 132 93 39 0 5 38
-/+ buffers/cache: 50 82
Swap: 1023 6 1017

Migrated-From: https://wiki.qubes-os.org/ticket/392

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Comment by joanna on 25 Dec 2011 19:17 UTC
The VM wasn't able to read meminfo writer key at boot:

Starting system logger: [ OK ]
Starting system message bus: [ OK ]
Starting HAL daemon: [ OK ]
Starting cups: [ OK ]
Executing Qubes Core scripts for AppVM:xenstore-read: couldn't read path qubes-service/meminfo-writer
[ OK ]
Executing Qubes Core scripts:[ 12.716178] EXT4-fs (xvdb): mounted filesystem with ordered data mode. Opts: (null)
[ OK ]
[ 12.728749] u2mfn_mmap: entering, private= (null)
[ 12.728771] u2mfn_mmap: calling remap return 0
[ 12.728786] u2mfn_release, priv= (null)
Executing Qubes Core scripts NetVM:[ OK ]
Starting Qubes GUI agent:[ OK ]
[ 13.054268] u2mfn_mmap: entering, private= (null)
[ 13.054304] u2mfn_mmap: calling remap return 0
[ 13.054338] u2mfn_release, priv= (null)
[ 13.078260] qubes_gui:816 map pfn expected mapping type write-back for 8b000-8c000, got uncached-minus
xenstore-read: couldn't read path qubes-service/qubes-firewall
xenstore-read: couldn't read path qubes-service/qubes-netwatcher

... but the meminfo writer was started anyway (perhaps too later?)...

user# ps ax | grep meminfo
692 ? S 0:01 /usr/lib/qubes/meminfo-writer 30000 100000
939 hvc0 S+ 0:00 grep --color=auto meminfo
user#

Member

marmarek commented Mar 8, 2015

Comment by joanna on 25 Dec 2011 19:17 UTC
The VM wasn't able to read meminfo writer key at boot:

Starting system logger: [ OK ]
Starting system message bus: [ OK ]
Starting HAL daemon: [ OK ]
Starting cups: [ OK ]
Executing Qubes Core scripts for AppVM:xenstore-read: couldn't read path qubes-service/meminfo-writer
[ OK ]
Executing Qubes Core scripts:[ 12.716178] EXT4-fs (xvdb): mounted filesystem with ordered data mode. Opts: (null)
[ OK ]
[ 12.728749] u2mfn_mmap: entering, private= (null)
[ 12.728771] u2mfn_mmap: calling remap return 0
[ 12.728786] u2mfn_release, priv= (null)
Executing Qubes Core scripts NetVM:[ OK ]
Starting Qubes GUI agent:[ OK ]
[ 13.054268] u2mfn_mmap: entering, private= (null)
[ 13.054304] u2mfn_mmap: calling remap return 0
[ 13.054338] u2mfn_release, priv= (null)
[ 13.078260] qubes_gui:816 map pfn expected mapping type write-back for 8b000-8c000, got uncached-minus
xenstore-read: couldn't read path qubes-service/qubes-firewall
xenstore-read: couldn't read path qubes-service/qubes-netwatcher

... but the meminfo writer was started anyway (perhaps too later?)...

user# ps ax | grep meminfo
692 ? S 0:01 /usr/lib/qubes/meminfo-writer 30000 100000
939 hvc0 S+ 0:00 grep --color=auto meminfo
user#

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Comment by joanna on 25 Dec 2011 19:49 UTC
It seems like this memory allocation problem is also responsible for the following error that sometimes occur when one attempts to start a new VM, while having some other running consuming too much memory:

[xen](root@dom0)# qvm-start --console work
--> Cleaning volatile image: /var/lib/qubes/appvms/work/volatile.img...
--> Loading the VM (type = AppVM)...
xc: error: panic: xc_dom_boot.c:79: launch_vm: SETVCPUCONTEXT failed (rc=-1): Internal error
libxl: error: libxl_dom.c:212:libxl__build_pv xc_dom_boot_image failed: Invalid argument
cannot (re-)build domain: -3
ERROR: Failed to load VM config

I wasn't able to start this work VM until I closed all the other VMs (with variable mem) and then qvm-start succeed immediately.

Member

marmarek commented Mar 8, 2015

Comment by joanna on 25 Dec 2011 19:49 UTC
It seems like this memory allocation problem is also responsible for the following error that sometimes occur when one attempts to start a new VM, while having some other running consuming too much memory:

[xen](root@dom0)# qvm-start --console work
--> Cleaning volatile image: /var/lib/qubes/appvms/work/volatile.img...
--> Loading the VM (type = AppVM)...
xc: error: panic: xc_dom_boot.c:79: launch_vm: SETVCPUCONTEXT failed (rc=-1): Internal error
libxl: error: libxl_dom.c:212:libxl__build_pv xc_dom_boot_image failed: Invalid argument
cannot (re-)build domain: -3
ERROR: Failed to load VM config

I wasn't able to start this work VM until I closed all the other VMs (with variable mem) and then qvm-start succeed immediately.

@marmarek marmarek added P: critical and removed P: major labels Mar 8, 2015

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Comment by joanna on 26 Dec 2011 09:21 UTC
So, the idea is to use qvm-run to start meminfo-writer, so that the VM doesn't give up memory at the very early start, and only after it starts Xorg.

Member

marmarek commented Mar 8, 2015

Comment by joanna on 26 Dec 2011 09:21 UTC
So, the idea is to use qvm-run to start meminfo-writer, so that the VM doesn't give up memory at the very early start, and only after it starts Xorg.

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Modified by marmarek on 26 Dec 2011 22:40 UTC

Member

marmarek commented Mar 8, 2015

Modified by marmarek on 26 Dec 2011 22:40 UTC

@marmarek marmarek assigned marmarek and unassigned rootkovska Mar 8, 2015

@marmarek

This comment has been minimized.

Show comment
Hide comment

@marmarek marmarek closed this Mar 8, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment