Cgroups memory limit are causing the virt/qemu to be terminated unexpectedly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libvirt (Ubuntu) |
Fix Released
|
High
|
Unassigned |
Bug Description
from syslog
Jan 21 11:36:26 x230 kernel: [ 1408.511611] kvm-spice invoked oom-killer: gfp_mask=0x50, order=0, oom_score_adj=0
Jan 21 11:36:26 x230 kernel: [ 1408.511615] kvm-spice cpuset=emulator mems_allowed=0
Jan 21 11:36:26 x230 kernel: [ 1408.511617] Pid: 3594, comm: kvm-spice Tainted: GF 3.8.0-1-generic #5-Ubuntu
Jan 21 11:36:26 x230 kernel: [ 1408.511618] Call Trace:
Jan 21 11:36:26 x230 kernel: [ 1408.511623] [<ffffffff810cf
Jan 21 11:36:26 x230 kernel: [ 1408.511627] [<ffffffff816bc
Jan 21 11:36:26 x230 kernel: [ 1408.511630] [<ffffffff81131
Jan 21 11:36:26 x230 kernel: [ 1408.511633] [<ffffffff81188
Jan 21 11:36:26 x230 kernel: [ 1408.511635] [<ffffffff81132
Jan 21 11:36:26 x230 kernel: [ 1408.511636] [<ffffffff81189
Jan 21 11:36:26 x230 kernel: [ 1408.511638] [<ffffffff81065
Jan 21 11:36:26 x230 kernel: [ 1408.511641] [<ffffffff8118b
Jan 21 11:36:26 x230 kernel: [ 1408.511643] [<ffffffff8118c
Jan 21 11:36:26 x230 kernel: [ 1408.511645] [<ffffffff8118c
Jan 21 11:36:26 x230 kernel: [ 1408.511647] [<ffffffff8118d
Jan 21 11:36:26 x230 kernel: [ 1408.511648] [<ffffffff8112f
Jan 21 11:36:26 x230 kernel: [ 1408.511650] [<ffffffff8112f
Jan 21 11:36:26 x230 kernel: [ 1408.511652] [<ffffffff8112f
Jan 21 11:36:26 x230 kernel: [ 1408.511655] [<ffffffff81233
Jan 21 11:36:26 x230 kernel: [ 1408.511657] [<ffffffff8112e
Jan 21 11:36:26 x230 kernel: [ 1408.511659] [<ffffffff81130
Jan 21 11:36:26 x230 kernel: [ 1408.511661] [<ffffffff81195
Jan 21 11:36:26 x230 kernel: [ 1408.511662] [<ffffffff81130
Jan 21 11:36:26 x230 kernel: [ 1408.511664] [<ffffffff8122c
Jan 21 11:36:26 x230 kernel: [ 1408.511667] [<ffffffff81081
Jan 21 11:36:26 x230 kernel: [ 1408.511669] [<ffffffff81081
Jan 21 11:36:26 x230 kernel: [ 1408.511670] [<ffffffff8122c
Jan 21 11:36:26 x230 kernel: [ 1408.511672] [<ffffffff81193
Jan 21 11:36:26 x230 kernel: [ 1408.511674] [<ffffffff81193
Jan 21 11:36:26 x230 kernel: [ 1408.511676] [<ffffffff810b7
Jan 21 11:36:26 x230 kernel: [ 1408.511678] [<ffffffff81194
Jan 21 11:36:26 x230 kernel: [ 1408.511680] [<ffffffff81194
Jan 21 11:36:26 x230 kernel: [ 1408.511683] [<ffffffff816cf
Jan 21 11:36:26 x230 kernel: [ 1408.511685] Task in /libvirt/
Jan 21 11:36:26 x230 kernel: [ 1408.511686] memory: usage 1341196kB, limit 1341196kB, failcnt 217479
Jan 21 11:36:26 x230 kernel: [ 1408.511687] memory+swap: usage 0kB, limit 9007199254740991kB, failcnt 0
Jan 21 11:36:26 x230 kernel: [ 1408.511688] kmem: usage 0kB, limit 9007199254740991kB, failcnt 0
Jan 21 11:36:26 x230 kernel: [ 1408.511689] Mem-Info:
Jan 21 11:36:26 x230 kernel: [ 1408.511690] Node 0 DMA per-cpu:
Jan 21 11:36:26 x230 kernel: [ 1408.511692] CPU 0: hi: 0, btch: 1 usd: 0
Jan 21 11:36:26 x230 kernel: [ 1408.511692] CPU 1: hi: 0, btch: 1 usd: 0
Jan 21 11:36:26 x230 kernel: [ 1408.511693] CPU 2: hi: 0, btch: 1 usd: 0
Jan 21 11:36:26 x230 kernel: [ 1408.511694] CPU 3: hi: 0, btch: 1 usd: 0
Jan 21 11:36:26 x230 kernel: [ 1408.511695] Node 0 DMA32 per-cpu:
Jan 21 11:36:26 x230 kernel: [ 1408.511696] CPU 0: hi: 186, btch: 31 usd: 157
Jan 21 11:36:26 x230 kernel: [ 1408.511697] CPU 1: hi: 186, btch: 31 usd: 168
Jan 21 11:36:26 x230 kernel: [ 1408.511697] CPU 2: hi: 186, btch: 31 usd: 2
Jan 21 11:36:26 x230 kernel: [ 1408.511698] CPU 3: hi: 186, btch: 31 usd: 29
Jan 21 11:36:26 x230 kernel: [ 1408.511699] Node 0 Normal per-cpu:
Jan 21 11:36:26 x230 kernel: [ 1408.511700] CPU 0: hi: 186, btch: 31 usd: 117
Jan 21 11:36:26 x230 kernel: [ 1408.511701] CPU 1: hi: 186, btch: 31 usd: 168
Jan 21 11:36:26 x230 kernel: [ 1408.511702] CPU 2: hi: 186, btch: 31 usd: 47
Jan 21 11:36:26 x230 kernel: [ 1408.511703] CPU 3: hi: 186, btch: 31 usd: 108
Jan 21 11:36:26 x230 kernel: [ 1408.511705] active_anon:849769 inactive_
Jan 21 11:36:26 x230 kernel: [ 1408.511705] active_file:58571 inactive_
Jan 21 11:36:26 x230 kernel: [ 1408.511705] unevictable:8075 dirty:43807 writeback:0 unstable:0
Jan 21 11:36:26 x230 kernel: [ 1408.511705] free:2603702 slab_reclaimabl
Jan 21 11:36:26 x230 kernel: [ 1408.511705] mapped:48755 shmem:85862 pagetables:9907 bounce:0
Jan 21 11:36:26 x230 kernel: [ 1408.511705] free_cma:0
Jan 21 11:36:26 x230 kernel: [ 1408.511707] Node 0 DMA free:15900kB min:64kB low:80kB high:96kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:15644kB managed:15900kB mlocked:0kB dirty:0kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimabl
Jan 21 11:36:26 x230 kernel: [ 1408.511710] lowmem_reserve[]: 0 3264 15839 15839
Jan 21 11:36:26 x230 kernel: [ 1408.511712] Node 0 DMA32 free:3316564kB min:13916kB low:17392kB high:20872kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:3343028kB managed:3291020kB mlocked:0kB dirty:0kB writeback:0kB mapped:8kB shmem:0kB slab_reclaimabl
Jan 21 11:36:26 x230 kernel: [ 1408.511714] lowmem_reserve[]: 0 0 12574 12574
Jan 21 11:36:26 x230 kernel: [ 1408.511716] Node 0 Normal free:7082344kB min:53600kB low:67000kB high:80400kB active_
Jan 21 11:36:26 x230 kernel: [ 1408.511719] lowmem_reserve[]: 0 0 0 0
Jan 21 11:36:26 x230 kernel: [ 1408.511720] Node 0 DMA: 1*4kB (U) 1*8kB (U) 1*16kB (U) 0*32kB 2*64kB (U) 1*128kB (U) 1*256kB (U) 0*512kB 1*1024kB (U) 1*2048kB (R) 3*4096kB (M) = 15900kB
Jan 21 11:36:26 x230 kernel: [ 1408.511727] Node 0 DMA32: 5*4kB (M) 8*8kB (UM) 4*16kB (M) 8*32kB (M) 7*64kB (M) 6*128kB (M) 7*256kB (UM) 5*512kB (UM) 5*1024kB (UM) 6*2048kB (UM) 804*4096kB (MR) = 3316564kB
Jan 21 11:36:26 x230 kernel: [ 1408.511734] Node 0 Normal: 116*4kB (UEM) 218*8kB (UEM) 162*16kB (UEM) 218*32kB (UEM) 90*64kB (UEM) 60*128kB (UE) 43*256kB (UE) 22*512kB (UE) 10*1024kB (UM) 6*2048kB (UE) 1712*4096kB (UMR) = 7082368kB
Jan 21 11:36:26 x230 kernel: [ 1408.511741] 366822 total pagecache pages
Jan 21 11:36:26 x230 kernel: [ 1408.511742] 7657 pages in swap cache
Jan 21 11:36:26 x230 kernel: [ 1408.511743] Swap cache stats: add 7658, delete 1, find 1/1
Jan 21 11:36:26 x230 kernel: [ 1408.511744] Free swap = 16463960kB
Jan 21 11:36:26 x230 kernel: [ 1408.511745] Total swap = 16494588kB
Jan 21 11:36:26 x230 kernel: [ 1408.533073] 4154864 pages RAM
Jan 21 11:36:26 x230 kernel: [ 1408.533078] 116655 pages reserved
Jan 21 11:36:26 x230 kernel: [ 1408.533081] 1397984 pages shared
Jan 21 11:36:26 x230 kernel: [ 1408.533085] 1220173 pages non-shared
Jan 21 11:36:26 x230 kernel: [ 1408.533088] [ pid ] uid tgid total_vm rss nr_ptes swapents oom_score_adj name
Jan 21 11:36:26 x230 kernel: [ 1408.533141] [ 3321] 117 3321 1005418 285951 834 7658 0 kvm-spice
Jan 21 11:36:26 x230 kernel: [ 1408.533145] Memory cgroup out of memory: Kill process 3608 (kvm-spice) score 66 or sacrifice child
Jan 21 11:36:26 x230 kernel: [ 1408.533152] Killed process 3608 (kvm-spice) total-vm:4021672kB, anon-rss:1136936kB, file-rss:6868kB
Related branches
Changed in libvirt (Ubuntu): | |
status: | Invalid → New |
Could you please tell us how you configured both the memory cgroup and the VM? The kvm-spice VM is taking about 1.14G of memory - which is not at all unexpected, unless you asked it to take up 512M :)
So the first question I'm trying to answer is just whether there is a misconfiguration (the VM was given too much memory or the memory cgroup not enough - either by you or by defaults), or whether there is a memory leak in libvirt or kvm-spice.