Comment 13 for bug 1102290

Revision history for this message
Mike (mike32767) wrote :

I am still seeing this issue with libvirt 1.1.1-0ubuntu8, although it has only (just) happened once after several months of no problems.

VM (called london) has:

<domain type="kvm">
  ...
  <memory unit='KiB'>1024000</memory>
  <currentMemory unit='KiB'>1024000</currentMemory>
...
</domain>

and "virsh memtune london" gives:

hard_limit : 1992192
soft_limit : unlimited
swap_hard_limit: unlimited

There is no swap on the host and plenty of RAM available - from top:

    KiB Mem: 32896936 total, 23104716 used, 9792220 free, 10520 buffers
    KiB Swap: 0 total, 0 used, 0 free, 4305340 cached

      PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    22393 libvirt- 20 0 14.6g 7.9g 6812 S 1 25.2 3364:39 qemu-system-x86
     2691 libvirt- 20 0 9244m 4.0g 804 S 0 12.7 1316:37 qemu-system-x86
     9535 libvirt- 20 0 5666m 1.0g 1052 S 0 3.3 115:25.26 qemu-system-x86
    24739 libvirt- 20 0 2478m 1.0g 7176 S 0 3.1 68:16.96 qemu-system-x86
    31162 libvirt- 20 0 2478m 474m 9756 S 1 1.5 0:57.18 qemu-system-x86
     2216 root 20 0 944m 29m 3556 S 0 0.1 0:05.99 libvirtd

yet I get this:

Mar 18 06:55:41 fractal kernel: [2376404.957208] Task in /machine/london.libvirt-qemu killed as a result of limit of /machine/london.libvirt-qemu
Mar 18 06:55:41 fractal kernel: [2376404.957212] memory: usage 1992192kB, limit 1992192kB, failcnt 261
Mar 18 06:55:41 fractal kernel: [2376404.957215] memory+swap: usage 0kB, limit 9007199254740991kB, failcnt 0
Mar 18 06:55:41 fractal kernel: [2376404.957217] kmem: usage 0kB, limit 9007199254740991kB, failcnt 0
Mar 18 06:55:41 fractal kernel: [2376404.957219] Memory cgroup stats for /machine/london.libvirt-qemu: cache:104KB rss:1992088KB rss_huge:6144KB mapped_file:20KB inactive_anon:16KB active_anon:1991592KB inactive_file:76KB active_file:0KB unevictable:0KB
Mar 18 06:55:41 fractal kernel: [2376404.957241] [ pid ] uid tgid total_vm rss nr_ptes swapents oom_score_adj name
Mar 18 06:55:41 fractal kernel: [2376404.957365] [ 2618] 106 2618 1451707 259898 792 0 0 qemu-system-x86
Mar 18 06:55:41 fractal kernel: [2376404.957387] Memory cgroup out of memory: Kill process 30400 (qemu-system-x86) score 523 or sacrifice child

Furthermore I am unable to use the workaround suggested up the equivalent Redhat bug report (https://bugzilla.redhat.com/show_bug.cgi?id=891653) of increasing the cgroup limit with memtune:

# virsh memtune london
hard_limit : 1992192
soft_limit : unlimited
swap_hard_limit: unlimited

# virsh memtune london --hard-limit=4096000
error: Unable to change memory parameters
error: invalid argument: memory hard_limit tunable value must be lower than swap_hard_limit

# virsh memtune london --hard-limit=4096000 --swap-hard-limit 4096000
error: Unable to change memory parameters
error: unable to set memory swap_hard_limit tunable: Operation not permitted