[Group.of.nepali.translators] [Bug 1708305] Re: Realtime feature mlockall: Cannot allocate memory
** Changed in: cloud-archive Status: Fix Committed => Fix Released ** Tags removed: sts-sru-needed ** Tags added: sts-sru-done -- You received this bug notification because you are a member of नेपाली भाषा समायोजकहरुको समूह, which is subscribed to Xenial. Matching subscriptions: Ubuntu 16.04 Bugs https://bugs.launchpad.net/bugs/1708305 Title: Realtime feature mlockall: Cannot allocate memory Status in Ubuntu Cloud Archive: Fix Released Status in Ubuntu Cloud Archive mitaka series: Fix Released Status in Ubuntu Cloud Archive ocata series: Fix Released Status in libvirt package in Ubuntu: Fix Released Status in libvirt source package in Xenial: Fix Released Status in libvirt source package in Zesty: Fix Released Status in libvirt source package in Artful: Fix Released Bug description: [Impact] * Guest definitions that uses locked memory + hugepages fail to spawn * Backport upstream fix to solve that issue [Environment] root@buneary:~# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.2 LTS Release: 16.04 Codename: xenial root@buneary:~# uname -r 4.10.0-29-generic Reproducible also with the 4.4 kernel. [Detailed Description] When a guest memory backing stanza is defined using the stanza + hugepages, as follows: (Full guest definition: http://paste.ubuntu.com/25229162/) The guest fails to start due to the following error: 2017-08-02 20:25:03.714+: starting up libvirt version: 1.3.1, package: 1ubuntu10.12 (Christian EhrhardtWed, 19 Jul 2017 08:28:14 +0200), qemu version: 2.5.0 (Debian 1:2.5+dfsg-5ubuntu10.14), hostname: buneary.seg LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin QEMU_AUDIO_DRV=none /usr/bin/kvm-spice -name reproducer2 -S -machine pc-i440fx-2.5,accel=kvm,usb=off -cpu host -m 124928 -realtime mlock=on -smp 32,sockets=16,cores=1,threads=2 -object memory-backend-file,id=ram-node0,prealloc=yes,mem-path=/dev/hugepages/libvirt/qemu,share=yes,size=64424509440,host-nodes=0,policy=bind -numa node,nodeid=0,cpus=0-15,memdev=ram-node0 -object memory-backend-file,id=ram-node1,prealloc=yes,mem-path=/dev/hugepages/libvirt/qemu,share=yes,size=66571993088,host-nodes=1,policy=bind -numa node,nodeid=1,cpus=16-31,memdev=ram-node1 -uuid 2460778d-979b-4024-9a13-0c3ca04b18ec -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-reproducer2/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/var/lib/uvtool/libvirt/images/test-ds.qcow,format=qcow2,if=none,id=drive-virtio-disk0,cache=none -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x3,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -vnc 127.0.0.1:0 -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 -msg timestamp=on Domain id=14 is tainted: host-cpu char device redirected to /dev/pts/1 (label charserial0) mlockall: Cannot allocate memory 2017-08-02T20:25:37.732772Z qemu-system-x86_64: locking memory failed 2017-08-02 20:25:37.811+: shutting down This seems to be due to the setrlimit for RLIMIT_MEMLOCK is too low for mlockall to work given the large amount of memory. There is a libvirt upstream patch that enforces the existence of the hard_limit stanza when using with in the memory backing settings. https://github.com/libvirt/libvirt/commit/c2e60ad0e5124482942164e5fec088157f5e716a Memory locking can only work properly if the memory locking limit for the QEMU process has been raised appropriately: the default one is extremely low, so there's no way the guest will fit in there. The commit https://github.com/libvirt/libvirt/commit/7e667664d28f90bf6916604a55ebad7e2d85305b is also required when using hugepages and the locked stanza. [Test Case] * Define a guest that uses the following stanzas (See for a full guest reference: http://paste.ubuntu.com/25288141/) 120 120 * virsh define guest.xml * virsh start guest.xml * Without the fix, the following error will be raised and the guest will not start. root@buneary:/home/ubuntu# virsh start reproducer2 error: Failed to start domain reproducer2 error: internal error: process exited while connecting to monitor: mlockall: Cannot allocate memory 2017-08-11T03:59:54.936275Z qemu-system-x86_64: locking memory failed * With the fix, the error shouldn't be displayed and the guest started [Suggested Fix] * https://github.com/libvirt/libvirt/commit/7e667664d28f90bf6916604a55ebad7e2d85305b
[Group.of.nepali.translators] [Bug 1708305] Re: Realtime feature mlockall: Cannot allocate memory
This bug was fixed in the package libvirt - 2.5.0-3ubuntu5.5~cloud0 --- libvirt (2.5.0-3ubuntu5.5~cloud0) xenial-ocata; urgency=medium . * New update for the Ubuntu Cloud Archive. . libvirt (2.5.0-3ubuntu5.5) zesty; urgency=medium . * d/p/bug-1708305-qemu-Fix-memory-locking-limit-calculation.patch: Remove memlock limit when using . (LP: #1708305). ** Changed in: cloud-archive/ocata Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of नेपाली भाषा समायोजकहरुको समूह, which is subscribed to Xenial. Matching subscriptions: Ubuntu 16.04 Bugs https://bugs.launchpad.net/bugs/1708305 Title: Realtime feature mlockall: Cannot allocate memory Status in Ubuntu Cloud Archive: Fix Committed Status in Ubuntu Cloud Archive mitaka series: Fix Released Status in Ubuntu Cloud Archive ocata series: Fix Released Status in libvirt package in Ubuntu: Fix Released Status in libvirt source package in Xenial: Fix Released Status in libvirt source package in Zesty: Fix Released Status in libvirt source package in Artful: Fix Released Bug description: [Impact] * Guest definitions that uses locked memory + hugepages fail to spawn * Backport upstream fix to solve that issue [Environment] root@buneary:~# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.2 LTS Release: 16.04 Codename: xenial root@buneary:~# uname -r 4.10.0-29-generic Reproducible also with the 4.4 kernel. [Detailed Description] When a guest memory backing stanza is defined using the stanza + hugepages, as follows: (Full guest definition: http://paste.ubuntu.com/25229162/) The guest fails to start due to the following error: 2017-08-02 20:25:03.714+: starting up libvirt version: 1.3.1, package: 1ubuntu10.12 (Christian EhrhardtWed, 19 Jul 2017 08:28:14 +0200), qemu version: 2.5.0 (Debian 1:2.5+dfsg-5ubuntu10.14), hostname: buneary.seg LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin QEMU_AUDIO_DRV=none /usr/bin/kvm-spice -name reproducer2 -S -machine pc-i440fx-2.5,accel=kvm,usb=off -cpu host -m 124928 -realtime mlock=on -smp 32,sockets=16,cores=1,threads=2 -object memory-backend-file,id=ram-node0,prealloc=yes,mem-path=/dev/hugepages/libvirt/qemu,share=yes,size=64424509440,host-nodes=0,policy=bind -numa node,nodeid=0,cpus=0-15,memdev=ram-node0 -object memory-backend-file,id=ram-node1,prealloc=yes,mem-path=/dev/hugepages/libvirt/qemu,share=yes,size=66571993088,host-nodes=1,policy=bind -numa node,nodeid=1,cpus=16-31,memdev=ram-node1 -uuid 2460778d-979b-4024-9a13-0c3ca04b18ec -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-reproducer2/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/var/lib/uvtool/libvirt/images/test-ds.qcow,format=qcow2,if=none,id=drive-virtio-disk0,cache=none -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x3,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -vnc 127.0.0.1:0 -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 -msg timestamp=on Domain id=14 is tainted: host-cpu char device redirected to /dev/pts/1 (label charserial0) mlockall: Cannot allocate memory 2017-08-02T20:25:37.732772Z qemu-system-x86_64: locking memory failed 2017-08-02 20:25:37.811+: shutting down This seems to be due to the setrlimit for RLIMIT_MEMLOCK is too low for mlockall to work given the large amount of memory. There is a libvirt upstream patch that enforces the existence of the hard_limit stanza when using with in the memory backing settings. https://github.com/libvirt/libvirt/commit/c2e60ad0e5124482942164e5fec088157f5e716a Memory locking can only work properly if the memory locking limit for the QEMU process has been raised appropriately: the default one is extremely low, so there's no way the guest will fit in there. The commit https://github.com/libvirt/libvirt/commit/7e667664d28f90bf6916604a55ebad7e2d85305b is also required when using hugepages and the locked stanza. [Test Case] * Define a guest that uses the following stanzas (See for a full guest reference: http://paste.ubuntu.com/25288141/) 120 120 * virsh define guest.xml * virsh start guest.xml * Without the fix, the following error will be raised and the guest will not start. root@buneary:/home/ubuntu# virsh start reproducer2 error: Failed to start domain reproducer2 error: internal error: process
[Group.of.nepali.translators] [Bug 1708305] Re: Realtime feature mlockall: Cannot allocate memory
This bug was fixed in the package libvirt - 1.3.1-1ubuntu10.14~cloud0 --- libvirt (1.3.1-1ubuntu10.14~cloud0) trusty-mitaka; urgency=medium . * New update for the Ubuntu Cloud Archive. . libvirt (1.3.1-1ubuntu10.14) xenial; urgency=medium . * d/p/bug-1708305-qemu-Fix-memory-locking-limit-calculation.patch: Remove memlock limit when using . (LP: #1708305). ** Changed in: cloud-archive/mitaka Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of नेपाली भाषा समायोजकहरुको समूह, which is subscribed to Xenial. Matching subscriptions: Ubuntu 16.04 Bugs https://bugs.launchpad.net/bugs/1708305 Title: Realtime feature mlockall: Cannot allocate memory Status in Ubuntu Cloud Archive: Fix Committed Status in Ubuntu Cloud Archive mitaka series: Fix Released Status in Ubuntu Cloud Archive ocata series: Fix Released Status in libvirt package in Ubuntu: Fix Released Status in libvirt source package in Xenial: Fix Released Status in libvirt source package in Zesty: Fix Released Status in libvirt source package in Artful: Fix Released Bug description: [Impact] * Guest definitions that uses locked memory + hugepages fail to spawn * Backport upstream fix to solve that issue [Environment] root@buneary:~# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.2 LTS Release: 16.04 Codename: xenial root@buneary:~# uname -r 4.10.0-29-generic Reproducible also with the 4.4 kernel. [Detailed Description] When a guest memory backing stanza is defined using the stanza + hugepages, as follows: (Full guest definition: http://paste.ubuntu.com/25229162/) The guest fails to start due to the following error: 2017-08-02 20:25:03.714+: starting up libvirt version: 1.3.1, package: 1ubuntu10.12 (Christian EhrhardtWed, 19 Jul 2017 08:28:14 +0200), qemu version: 2.5.0 (Debian 1:2.5+dfsg-5ubuntu10.14), hostname: buneary.seg LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin QEMU_AUDIO_DRV=none /usr/bin/kvm-spice -name reproducer2 -S -machine pc-i440fx-2.5,accel=kvm,usb=off -cpu host -m 124928 -realtime mlock=on -smp 32,sockets=16,cores=1,threads=2 -object memory-backend-file,id=ram-node0,prealloc=yes,mem-path=/dev/hugepages/libvirt/qemu,share=yes,size=64424509440,host-nodes=0,policy=bind -numa node,nodeid=0,cpus=0-15,memdev=ram-node0 -object memory-backend-file,id=ram-node1,prealloc=yes,mem-path=/dev/hugepages/libvirt/qemu,share=yes,size=66571993088,host-nodes=1,policy=bind -numa node,nodeid=1,cpus=16-31,memdev=ram-node1 -uuid 2460778d-979b-4024-9a13-0c3ca04b18ec -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-reproducer2/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/var/lib/uvtool/libvirt/images/test-ds.qcow,format=qcow2,if=none,id=drive-virtio-disk0,cache=none -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x3,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -vnc 127.0.0.1:0 -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 -msg timestamp=on Domain id=14 is tainted: host-cpu char device redirected to /dev/pts/1 (label charserial0) mlockall: Cannot allocate memory 2017-08-02T20:25:37.732772Z qemu-system-x86_64: locking memory failed 2017-08-02 20:25:37.811+: shutting down This seems to be due to the setrlimit for RLIMIT_MEMLOCK is too low for mlockall to work given the large amount of memory. There is a libvirt upstream patch that enforces the existence of the hard_limit stanza when using with in the memory backing settings. https://github.com/libvirt/libvirt/commit/c2e60ad0e5124482942164e5fec088157f5e716a Memory locking can only work properly if the memory locking limit for the QEMU process has been raised appropriately: the default one is extremely low, so there's no way the guest will fit in there. The commit https://github.com/libvirt/libvirt/commit/7e667664d28f90bf6916604a55ebad7e2d85305b is also required when using hugepages and the locked stanza. [Test Case] * Define a guest that uses the following stanzas (See for a full guest reference: http://paste.ubuntu.com/25288141/) 120 120 * virsh define guest.xml * virsh start guest.xml * Without the fix, the following error will be raised and the guest will not start. root@buneary:/home/ubuntu# virsh start reproducer2 error: Failed to start domain reproducer2 error: internal error:
[Group.of.nepali.translators] [Bug 1708305] Re: Realtime feature mlockall: Cannot allocate memory
This bug was fixed in the package libvirt - 1.3.1-1ubuntu10.14 --- libvirt (1.3.1-1ubuntu10.14) xenial; urgency=medium * d/p/bug-1708305-qemu-Fix-memory-locking-limit-calculation.patch: Remove memlock limit when using . (LP: #1708305). -- Jorge NiedbalskiThu, 10 Aug 2017 22:50:46 -0400 ** Changed in: libvirt (Ubuntu Xenial) Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of नेपाली भाषा समायोजकहरुको समूह, which is subscribed to Xenial. Matching subscriptions: Ubuntu 16.04 Bugs https://bugs.launchpad.net/bugs/1708305 Title: Realtime feature mlockall: Cannot allocate memory Status in Ubuntu Cloud Archive: Fix Committed Status in Ubuntu Cloud Archive mitaka series: In Progress Status in Ubuntu Cloud Archive ocata series: In Progress Status in libvirt package in Ubuntu: Fix Released Status in libvirt source package in Xenial: Fix Released Status in libvirt source package in Zesty: Fix Released Status in libvirt source package in Artful: Fix Released Bug description: [Impact] * Guest definitions that uses locked memory + hugepages fail to spawn * Backport upstream fix to solve that issue [Environment] root@buneary:~# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.2 LTS Release: 16.04 Codename: xenial root@buneary:~# uname -r 4.10.0-29-generic Reproducible also with the 4.4 kernel. [Detailed Description] When a guest memory backing stanza is defined using the stanza + hugepages, as follows: (Full guest definition: http://paste.ubuntu.com/25229162/) The guest fails to start due to the following error: 2017-08-02 20:25:03.714+: starting up libvirt version: 1.3.1, package: 1ubuntu10.12 (Christian Ehrhardt Wed, 19 Jul 2017 08:28:14 +0200), qemu version: 2.5.0 (Debian 1:2.5+dfsg-5ubuntu10.14), hostname: buneary.seg LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin QEMU_AUDIO_DRV=none /usr/bin/kvm-spice -name reproducer2 -S -machine pc-i440fx-2.5,accel=kvm,usb=off -cpu host -m 124928 -realtime mlock=on -smp 32,sockets=16,cores=1,threads=2 -object memory-backend-file,id=ram-node0,prealloc=yes,mem-path=/dev/hugepages/libvirt/qemu,share=yes,size=64424509440,host-nodes=0,policy=bind -numa node,nodeid=0,cpus=0-15,memdev=ram-node0 -object memory-backend-file,id=ram-node1,prealloc=yes,mem-path=/dev/hugepages/libvirt/qemu,share=yes,size=66571993088,host-nodes=1,policy=bind -numa node,nodeid=1,cpus=16-31,memdev=ram-node1 -uuid 2460778d-979b-4024-9a13-0c3ca04b18ec -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-reproducer2/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/var/lib/uvtool/libvirt/images/test-ds.qcow,format=qcow2,if=none,id=drive-virtio-disk0,cache=none -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x3,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -vnc 127.0.0.1:0 -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 -msg timestamp=on Domain id=14 is tainted: host-cpu char device redirected to /dev/pts/1 (label charserial0) mlockall: Cannot allocate memory 2017-08-02T20:25:37.732772Z qemu-system-x86_64: locking memory failed 2017-08-02 20:25:37.811+: shutting down This seems to be due to the setrlimit for RLIMIT_MEMLOCK is too low for mlockall to work given the large amount of memory. There is a libvirt upstream patch that enforces the existence of the hard_limit stanza when using with in the memory backing settings. https://github.com/libvirt/libvirt/commit/c2e60ad0e5124482942164e5fec088157f5e716a Memory locking can only work properly if the memory locking limit for the QEMU process has been raised appropriately: the default one is extremely low, so there's no way the guest will fit in there. The commit https://github.com/libvirt/libvirt/commit/7e667664d28f90bf6916604a55ebad7e2d85305b is also required when using hugepages and the locked stanza. [Test Case] * Define a guest that uses the following stanzas (See for a full guest reference: http://paste.ubuntu.com/25288141/) 120 120 * virsh define guest.xml * virsh start guest.xml * Without the fix, the following error will be raised and the guest will not start. root@buneary:/home/ubuntu# virsh start reproducer2 error: Failed to start domain reproducer2 error: internal error: process exited while connecting to monitor:
[Group.of.nepali.translators] [Bug 1708305] Re: Realtime feature mlockall: Cannot allocate memory
This bug was fixed in the package libvirt - 2.5.0-3ubuntu5.5 --- libvirt (2.5.0-3ubuntu5.5) zesty; urgency=medium * d/p/bug-1708305-qemu-Fix-memory-locking-limit-calculation.patch: Remove memlock limit when using . (LP: #1708305). -- Jorge NiedbalskiFri, 11 Aug 2017 00:34:01 -0400 ** Changed in: libvirt (Ubuntu Zesty) Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of नेपाली भाषा समायोजकहरुको समूह, which is subscribed to Xenial. Matching subscriptions: Ubuntu 16.04 Bugs https://bugs.launchpad.net/bugs/1708305 Title: Realtime feature mlockall: Cannot allocate memory Status in Ubuntu Cloud Archive: Fix Committed Status in Ubuntu Cloud Archive mitaka series: In Progress Status in Ubuntu Cloud Archive ocata series: In Progress Status in libvirt package in Ubuntu: Fix Released Status in libvirt source package in Xenial: Fix Committed Status in libvirt source package in Zesty: Fix Released Status in libvirt source package in Artful: Fix Released Bug description: [Impact] * Guest definitions that uses locked memory + hugepages fail to spawn * Backport upstream fix to solve that issue [Environment] root@buneary:~# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.2 LTS Release: 16.04 Codename: xenial root@buneary:~# uname -r 4.10.0-29-generic Reproducible also with the 4.4 kernel. [Detailed Description] When a guest memory backing stanza is defined using the stanza + hugepages, as follows: (Full guest definition: http://paste.ubuntu.com/25229162/) The guest fails to start due to the following error: 2017-08-02 20:25:03.714+: starting up libvirt version: 1.3.1, package: 1ubuntu10.12 (Christian Ehrhardt Wed, 19 Jul 2017 08:28:14 +0200), qemu version: 2.5.0 (Debian 1:2.5+dfsg-5ubuntu10.14), hostname: buneary.seg LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin QEMU_AUDIO_DRV=none /usr/bin/kvm-spice -name reproducer2 -S -machine pc-i440fx-2.5,accel=kvm,usb=off -cpu host -m 124928 -realtime mlock=on -smp 32,sockets=16,cores=1,threads=2 -object memory-backend-file,id=ram-node0,prealloc=yes,mem-path=/dev/hugepages/libvirt/qemu,share=yes,size=64424509440,host-nodes=0,policy=bind -numa node,nodeid=0,cpus=0-15,memdev=ram-node0 -object memory-backend-file,id=ram-node1,prealloc=yes,mem-path=/dev/hugepages/libvirt/qemu,share=yes,size=66571993088,host-nodes=1,policy=bind -numa node,nodeid=1,cpus=16-31,memdev=ram-node1 -uuid 2460778d-979b-4024-9a13-0c3ca04b18ec -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-reproducer2/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/var/lib/uvtool/libvirt/images/test-ds.qcow,format=qcow2,if=none,id=drive-virtio-disk0,cache=none -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x3,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -vnc 127.0.0.1:0 -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 -msg timestamp=on Domain id=14 is tainted: host-cpu char device redirected to /dev/pts/1 (label charserial0) mlockall: Cannot allocate memory 2017-08-02T20:25:37.732772Z qemu-system-x86_64: locking memory failed 2017-08-02 20:25:37.811+: shutting down This seems to be due to the setrlimit for RLIMIT_MEMLOCK is too low for mlockall to work given the large amount of memory. There is a libvirt upstream patch that enforces the existence of the hard_limit stanza when using with in the memory backing settings. https://github.com/libvirt/libvirt/commit/c2e60ad0e5124482942164e5fec088157f5e716a Memory locking can only work properly if the memory locking limit for the QEMU process has been raised appropriately: the default one is extremely low, so there's no way the guest will fit in there. The commit https://github.com/libvirt/libvirt/commit/7e667664d28f90bf6916604a55ebad7e2d85305b is also required when using hugepages and the locked stanza. [Test Case] * Define a guest that uses the following stanzas (See for a full guest reference: http://paste.ubuntu.com/25288141/) 120 120 * virsh define guest.xml * virsh start guest.xml * Without the fix, the following error will be raised and the guest will not start. root@buneary:/home/ubuntu# virsh start reproducer2 error: Failed to start domain reproducer2 error: internal error: process exited while connecting to monitor: mlockall:
[Group.of.nepali.translators] [Bug 1708305] Re: Realtime feature mlockall: Cannot allocate memory
** Also affects: cloud-archive Importance: Undecided Status: New ** Also affects: cloud-archive/mitaka Importance: Undecided Status: New ** Also affects: cloud-archive/ocata Importance: Undecided Status: New ** Changed in: cloud-archive Status: New => Fix Committed ** Changed in: cloud-archive Importance: Undecided => Medium ** Changed in: cloud-archive/mitaka Importance: Undecided => Medium ** Changed in: cloud-archive/ocata Importance: Undecided => Medium ** Changed in: cloud-archive/ocata Assignee: (unassigned) => Jorge Niedbalski (niedbalski) ** Changed in: cloud-archive/mitaka Assignee: (unassigned) => Jorge Niedbalski (niedbalski) ** Changed in: cloud-archive/mitaka Status: New => Triaged ** Changed in: cloud-archive/ocata Status: New => Triaged -- You received this bug notification because you are a member of नेपाली भाषा समायोजकहरुको समूह, which is subscribed to Xenial. Matching subscriptions: Ubuntu 16.04 Bugs https://bugs.launchpad.net/bugs/1708305 Title: Realtime feature mlockall: Cannot allocate memory Status in Ubuntu Cloud Archive: Fix Committed Status in Ubuntu Cloud Archive mitaka series: Triaged Status in Ubuntu Cloud Archive ocata series: Triaged Status in libvirt package in Ubuntu: Fix Released Status in libvirt source package in Xenial: In Progress Status in libvirt source package in Zesty: In Progress Status in libvirt source package in Artful: Fix Released Bug description: [Impact] * Guest definitions that uses locked memory + hugepages fail to spawn * Backport upstream fix to solve that issue [Environment] root@buneary:~# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.2 LTS Release: 16.04 Codename: xenial root@buneary:~# uname -r 4.10.0-29-generic Reproducible also with the 4.4 kernel. [Detailed Description] When a guest memory backing stanza is defined using the stanza + hugepages, as follows: (Full guest definition: http://paste.ubuntu.com/25229162/) The guest fails to start due to the following error: 2017-08-02 20:25:03.714+: starting up libvirt version: 1.3.1, package: 1ubuntu10.12 (Christian EhrhardtWed, 19 Jul 2017 08:28:14 +0200), qemu version: 2.5.0 (Debian 1:2.5+dfsg-5ubuntu10.14), hostname: buneary.seg LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin QEMU_AUDIO_DRV=none /usr/bin/kvm-spice -name reproducer2 -S -machine pc-i440fx-2.5,accel=kvm,usb=off -cpu host -m 124928 -realtime mlock=on -smp 32,sockets=16,cores=1,threads=2 -object memory-backend-file,id=ram-node0,prealloc=yes,mem-path=/dev/hugepages/libvirt/qemu,share=yes,size=64424509440,host-nodes=0,policy=bind -numa node,nodeid=0,cpus=0-15,memdev=ram-node0 -object memory-backend-file,id=ram-node1,prealloc=yes,mem-path=/dev/hugepages/libvirt/qemu,share=yes,size=66571993088,host-nodes=1,policy=bind -numa node,nodeid=1,cpus=16-31,memdev=ram-node1 -uuid 2460778d-979b-4024-9a13-0c3ca04b18ec -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-reproducer2/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/var/lib/uvtool/libvirt/images/test-ds.qcow,format=qcow2,if=none,id=drive-virtio-disk0,cache=none -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x3,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -vnc 127.0.0.1:0 -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 -msg timestamp=on Domain id=14 is tainted: host-cpu char device redirected to /dev/pts/1 (label charserial0) mlockall: Cannot allocate memory 2017-08-02T20:25:37.732772Z qemu-system-x86_64: locking memory failed 2017-08-02 20:25:37.811+: shutting down This seems to be due to the setrlimit for RLIMIT_MEMLOCK is too low for mlockall to work given the large amount of memory. There is a libvirt upstream patch that enforces the existence of the hard_limit stanza when using with in the memory backing settings. https://github.com/libvirt/libvirt/commit/c2e60ad0e5124482942164e5fec088157f5e716a Memory locking can only work properly if the memory locking limit for the QEMU process has been raised appropriately: the default one is extremely low, so there's no way the guest will fit in there. The commit https://github.com/libvirt/libvirt/commit/7e667664d28f90bf6916604a55ebad7e2d85305b is also required when using hugepages and the locked stanza. [Test Case] * Define a guest that uses the following stanzas (See for a full guest reference:
[Group.of.nepali.translators] [Bug 1708305] Re: Realtime feature mlockall: Cannot allocate memory
Hi Jorge, thanks for your prep work on this. Checking prereqs. #1 fixed in Dev? I read the "there is a patch" before as "there is a -new- patch", but checked now. This is in since version 3.2 which makes it fix released in Artful already. While I work on 3.6 we don't need it to go on with this as a fix in the dev version is a prereq. #2 Patch? I reviewed your changes and I'm ok with the patch, headers and backport. Also in general while I'm not so sure on unlimited in general I see why they can't set a better value int his case - and since this is as-upstream this is good. #3 SRU Queue? Last SRU just complete, I think we are good adding a new one to the queue. #4 Regressions Thanks for pre-testing on your side already, gives some extra confidence. I also checked via a (very basic) sniff test, full tests will have to be done on proposed but that we always do. Therefore ok for now to go on. #5 SRU Template You already provided half of it, it misses a few things like regression considerations. I can add those, but then nothing seems to block us from sponsoring this for SRU review IMO. ** Changed in: libvirt (Ubuntu Artful) Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of नेपाली भाषा समायोजकहरुको समूह, which is subscribed to Xenial. Matching subscriptions: Ubuntu 16.04 Bugs https://bugs.launchpad.net/bugs/1708305 Title: Realtime feature mlockall: Cannot allocate memory Status in libvirt package in Ubuntu: Fix Released Status in libvirt source package in Xenial: In Progress Status in libvirt source package in Zesty: In Progress Status in libvirt source package in Artful: Fix Released Bug description: [Environment] root@buneary:~# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.2 LTS Release: 16.04 Codename: xenial root@buneary:~# uname -r 4.10.0-29-generic Reproducible also with the 4.4 kernel. [Description] When a guest memory backing stanza is defined using the stanza + hugepages, as follows: (Full guest definition: http://paste.ubuntu.com/25229162/) The guest fails to start due to the following error: 2017-08-02 20:25:03.714+: starting up libvirt version: 1.3.1, package: 1ubuntu10.12 (Christian EhrhardtWed, 19 Jul 2017 08:28:14 +0200), qemu version: 2.5.0 (Debian 1:2.5+dfsg-5ubuntu10.14), hostname: buneary.seg LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin QEMU_AUDIO_DRV=none /usr/bin/kvm-spice -name reproducer2 -S -machine pc-i440fx-2.5,accel=kvm,usb=off -cpu host -m 124928 -realtime mlock=on -smp 32,sockets=16,cores=1,threads=2 -object memory-backend-file,id=ram-node0,prealloc=yes,mem-path=/dev/hugepages/libvirt/qemu,share=yes,size=64424509440,host-nodes=0,policy=bind -numa node,nodeid=0,cpus=0-15,memdev=ram-node0 -object memory-backend-file,id=ram-node1,prealloc=yes,mem-path=/dev/hugepages/libvirt/qemu,share=yes,size=66571993088,host-nodes=1,policy=bind -numa node,nodeid=1,cpus=16-31,memdev=ram-node1 -uuid 2460778d-979b-4024-9a13-0c3ca04b18ec -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-reproducer2/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/var/lib/uvtool/libvirt/images/test-ds.qcow,format=qcow2,if=none,id=drive-virtio-disk0,cache=none -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x3,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -vnc 127.0.0.1:0 -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 -msg timestamp=on Domain id=14 is tainted: host-cpu char device redirected to /dev/pts/1 (label charserial0) mlockall: Cannot allocate memory 2017-08-02T20:25:37.732772Z qemu-system-x86_64: locking memory failed 2017-08-02 20:25:37.811+: shutting down This seems to be due to the setrlimit for RLIMIT_MEMLOCK is too low for mlockall to work given the large amount of memory. There is a libvirt upstream patch that enforces the existence of the hard_limit stanza when using with in the memory backing settings. https://github.com/libvirt/libvirt/commit/c2e60ad0e5124482942164e5fec088157f5e716a Memory locking can only work properly if the memory locking limit for the QEMU process has been raised appropriately: the default one is extremely low, so there's no way the guest will fit in there. The commit https://github.com/libvirt/libvirt/commit/7e667664d28f90bf6916604a55ebad7e2d85305b is also required when using hugepages and the locked stanza. [Test Case] * Define a guest that uses the following stanzas (See
[Group.of.nepali.translators] [Bug 1708305] Re: Realtime feature mlockall: Cannot allocate memory
Hello Christian, Attached you can find a xenial SRU patch based on commit (https://github.com/libvirt/libvirt/commit/7e667664d28f90bf6916604a55ebad7e2d85305b). Here is the guest definition used on my testing (http://paste.ubuntu.com/25288141/) Without the patch, the error is reproduced. root@buneary:/home/ubuntu# virsh start reproducer2 error: Failed to start domain reproducer2 error: internal error: process exited while connecting to monitor: mlockall: Cannot allocate memory 2017-08-11T03:59:54.936275Z qemu-system-x86_64: locking memory failed With the patch the guest is initialized correctly. root@buneary:/var/lib/uvtool/libvirt/images# virsh start reproducer2 Domain reproducer2 started I ran the following systemtap probe (probe kernel.function("sys_setrlimit") { printf("locked: %d -> %s\n", pid(), sprintf("%s, %s", _rlimit_resource_str($resource), _struct_rlimit_u($rlim))) } ) And the output shows that the RLIMIT_MEMLOCK process limit is set to 9007199254740991 (VIR_DOMAIN_MEMORY_PARAM_UNLIMITED) root@buneary:/home/ubuntu# stap -g qemu_probe.stap -kv -g --suppress-time-limits Pass 1: parsed user script and 465 library scripts using 112796virt/48440res/6664shr/42136data kb, in 130usr/40sys/164real ms. Pass 2: analyzed script: 1 probe, 5 functions, 100 embeds, 0 globals using 164772virt/101848res/7988shr/94112data kb, in 660usr/120sys/776real ms. Pass 3: translated to C into "/tmp/stapVXuoMi/stap_30601_src.c" using 164772virt/102040res/8180shr/94112data kb, in 10usr/0sys/5real ms. Pass 4: compiled C into "stap_30601.ko" in 2160usr/540sys/3231real ms. Pass 5: starting run. locked: 31028 -> RLIMIT_MEMLOCK, [9007199254740991,9007199254740991] ** Changed in: libvirt (Ubuntu Artful) Status: Confirmed => Fix Released ** Changed in: libvirt (Ubuntu Artful) Status: Fix Released => Fix Committed ** Patch added: "fix-1708305-xenial.debdiff" https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1708305/+attachment/4930463/+files/fix-1708305-xenial.debdiff -- You received this bug notification because you are a member of नेपाली भाषा समायोजकहरुको समूह, which is subscribed to Xenial. Matching subscriptions: Ubuntu 16.04 Bugs https://bugs.launchpad.net/bugs/1708305 Title: Realtime feature mlockall: Cannot allocate memory Status in libvirt package in Ubuntu: Fix Committed Status in libvirt source package in Xenial: In Progress Status in libvirt source package in Zesty: In Progress Status in libvirt source package in Artful: Fix Committed Bug description: [Environment] root@buneary:~# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.2 LTS Release: 16.04 Codename: xenial root@buneary:~# uname -r 4.10.0-29-generic Reproducible also with the 4.4 kernel. [Description] When a guest memory backing stanza is defined using the stanza + hugepages, as follows: (Full guest definition: http://paste.ubuntu.com/25229162/) The guest fails to start due to the following error: 2017-08-02 20:25:03.714+: starting up libvirt version: 1.3.1, package: 1ubuntu10.12 (Christian EhrhardtWed, 19 Jul 2017 08:28:14 +0200), qemu version: 2.5.0 (Debian 1:2.5+dfsg-5ubuntu10.14), hostname: buneary.seg LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin QEMU_AUDIO_DRV=none /usr/bin/kvm-spice -name reproducer2 -S -machine pc-i440fx-2.5,accel=kvm,usb=off -cpu host -m 124928 -realtime mlock=on -smp 32,sockets=16,cores=1,threads=2 -object memory-backend-file,id=ram-node0,prealloc=yes,mem-path=/dev/hugepages/libvirt/qemu,share=yes,size=64424509440,host-nodes=0,policy=bind -numa node,nodeid=0,cpus=0-15,memdev=ram-node0 -object memory-backend-file,id=ram-node1,prealloc=yes,mem-path=/dev/hugepages/libvirt/qemu,share=yes,size=66571993088,host-nodes=1,policy=bind -numa node,nodeid=1,cpus=16-31,memdev=ram-node1 -uuid 2460778d-979b-4024-9a13-0c3ca04b18ec -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-reproducer2/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/var/lib/uvtool/libvirt/images/test-ds.qcow,format=qcow2,if=none,id=drive-virtio-disk0,cache=none -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x3,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -vnc 127.0.0.1:0 -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 -msg timestamp=on Domain id=14 is tainted: host-cpu char device redirected to /dev/pts/1 (label charserial0) mlockall: Cannot allocate memory 2017-08-02T20:25:37.732772Z qemu-system-x86_64: locking memory failed 2017-08-02
[Group.of.nepali.translators] [Bug 1708305] Re: Realtime feature mlockall: Cannot allocate memory
** Also affects: libvirt (Ubuntu Artful) Importance: Undecided Status: Confirmed ** Also affects: libvirt (Ubuntu Xenial) Importance: Undecided Status: New ** Also affects: libvirt (Ubuntu Zesty) Importance: Undecided Status: New -- You received this bug notification because you are a member of नेपाली भाषा समायोजकहरुको समूह, which is subscribed to Xenial. Matching subscriptions: Ubuntu 16.04 Bugs https://bugs.launchpad.net/bugs/1708305 Title: Realtime feature mlockall: Cannot allocate memory Status in libvirt package in Ubuntu: Confirmed Status in libvirt source package in Xenial: New Status in libvirt source package in Zesty: New Status in libvirt source package in Artful: Confirmed Bug description: [Environment] root@buneary:~# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.2 LTS Release: 16.04 Codename: xenial root@buneary:~# uname -r 4.10.0-29-generic Reproducible also with the 4.4 kernel. [Description] When a guest memory backing stanza is defined using the stanza + hugepages, as follows: (Full guest definition: http://paste.ubuntu.com/25229162/) The guest fails to start due to the following error: 2017-08-02 20:25:03.714+: starting up libvirt version: 1.3.1, package: 1ubuntu10.12 (Christian EhrhardtWed, 19 Jul 2017 08:28:14 +0200), qemu version: 2.5.0 (Debian 1:2.5+dfsg-5ubuntu10.14), hostname: buneary.seg LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin QEMU_AUDIO_DRV=none /usr/bin/kvm-spice -name reproducer2 -S -machine pc-i440fx-2.5,accel=kvm,usb=off -cpu host -m 124928 -realtime mlock=on -smp 32,sockets=16,cores=1,threads=2 -object memory-backend-file,id=ram-node0,prealloc=yes,mem-path=/dev/hugepages/libvirt/qemu,share=yes,size=64424509440,host-nodes=0,policy=bind -numa node,nodeid=0,cpus=0-15,memdev=ram-node0 -object memory-backend-file,id=ram-node1,prealloc=yes,mem-path=/dev/hugepages/libvirt/qemu,share=yes,size=66571993088,host-nodes=1,policy=bind -numa node,nodeid=1,cpus=16-31,memdev=ram-node1 -uuid 2460778d-979b-4024-9a13-0c3ca04b18ec -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-reproducer2/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/var/lib/uvtool/libvirt/images/test-ds.qcow,format=qcow2,if=none,id=drive-virtio-disk0,cache=none -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x3,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -vnc 127.0.0.1:0 -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 -msg timestamp=on Domain id=14 is tainted: host-cpu char device redirected to /dev/pts/1 (label charserial0) mlockall: Cannot allocate memory 2017-08-02T20:25:37.732772Z qemu-system-x86_64: locking memory failed 2017-08-02 20:25:37.811+: shutting down This seems to be due to the setrlimit for RLIMIT_MEMLOCK is too low for mlockall to work given the large amount of memory. There is a libvirt upstream patch that enforces the existence of the hard_limit stanza when using with in the memory backing settings. https://github.com/libvirt/libvirt/commit/c2e60ad0e5124482942164e5fec088157f5e716a Memory locking can only work properly if the memory locking limit for the QEMU process has been raised appropriately: the default one is extremely low, so there's no way the guest will fit in there. [Suggested Fix] * https://github.com/libvirt/libvirt/commit/c2e60ad0e5124482942164e5fec088157f5e716a To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1708305/+subscriptions ___ Mailing list: https://launchpad.net/~group.of.nepali.translators Post to : group.of.nepali.translators@lists.launchpad.net Unsubscribe : https://launchpad.net/~group.of.nepali.translators More help : https://help.launchpad.net/ListHelp