Received: from [140.186.70.92] (port=49111 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oapxv-0006kL-2N for qemu-devel@nongnu.org; Mon, 19 Jul 2010 09:01:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oapxt-0007vI-36 for qemu-devel@nongnu.org; Mon, 19 Jul 2010 09:01:02 -0400 Received: from adelie.canonical.com ([91.189.90.139]:36514) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oapxs-0007v9-P3 for qemu-devel@nongnu.org; Mon, 19 Jul 2010 09:01:00 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1Oapxq-00089q-KC for ; Mon, 19 Jul 2010 14:00:58 +0100 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 7840B2E81A9 for ; Mon, 19 Jul 2010 14:00:57 +0100 (BST) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Mon, 19 Jul 2010 12:54:33 -0000 From: Guido Winkelmann <607204@bugs.launchpad.net> Sender: bounces@canonical.com References: <20100719123800.18641.46171.malonedeb@potassium.ubuntu.com> Message-Id: <20100719125433.18106.89180.malone@wampee.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 607204] Re: New qemu instances often cannot be started if host system is under load Reply-To: Bug 607204 <607204@bugs.launchpad.net> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Forgot to mention: The bug is still present in the latest git-version as of this writing. -- = New qemu instances often cannot be started if host system is under load https://bugs.launchpad.net/bugs/607204 You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. Status in QEMU: New Bug description: I've got a problem where I cannot start any new VMs with qemu-kvm if the ho= st machine is under high CPU load. The problem is not 100% reproducible (it= works sometimes), but under load conditions, it happens most of the time -= roughly 95%. I'm usually using libvirt to start and stop KVM VMs. When using virsh to st= art a new VM under those conditions, the output looks like this: virsh # start testserver-a error: Failed to start domain testserver-a error: monitor socket did not show up.: Connection refused (There is a very long wait after the command has been sent until the error = message shows up.) This is (an example of) the command line that libvirtd uses to start up qem= u: ----- snip ----- LC_ALL=3DC PATH=3D/sbin:/usr/sbin:/bin:/usr/bin HOME=3D/root USER=3Droot LO= GNAME=3Droot QEMU_AUDIO_DRV=3Dnone /usr/bin/qemu-kvm -S -M pc-0.12 -enable-= kvm -m 256 -smp 1,sockets=3D1,cores=3D1,threads=3D1 -name testserver-a -uui= d 7cbb3665-4d58-86b8-ce8f-20541995a99c -nodefaults -chardev socket,id=3Dmon= itor,path=3D/usr/local/var/lib/libvirt/qemu/testserver-a.monitor,server,now= ait -mon chardev=3Dmonitor,mode=3Dreadline -rtc base=3Dutc -no-acpi -boot c= -device lsi,id=3Dscsi0,bus=3Dpci.0,addr=3D0x7 -drive file=3D/data/testserv= er-a-system.img,if=3Dnone,id=3Ddrive-scsi0-0-1,boot=3Don -device scsi-disk,= bus=3Dscsi0.0,scsi-id=3D1,drive=3Ddrive-scsi0-0-1,id=3Dscsi0-0-1 -drive fil= e=3D/data/testserver-a-data1.img,if=3Dnone,id=3Ddrive-virtio-disk1 -device = virtio-blk-pci,bus=3Dpci.0,addr=3D0x4,drive=3Ddrive-virtio-disk1,id=3Dvirti= o-disk1 -drive file=3D/data/testserver-a-data2.img,if=3Dnone,id=3Ddrive-vir= tio-disk2 -device virtio-blk-pci,bus=3Dpci.0,addr=3D0x5,drive=3Ddrive-virti= o-disk2,id=3Dvirtio-disk2 -drive file=3D/data/gentoo-install-amd64-minimal-= 20100408.iso,if=3Dnone,media=3Dcdrom,id=3Ddrive-ide0-0-0,readonly=3Don -dev= ice ide-drive,bus=3Dide.0,unit=3D0,drive=3Ddrive-ide0-0-0,id=3Dide0-0-0 -dr= ive file=3D/data/testserver-a_configfloppy.img,if=3Dnone,id=3Ddrive-fdc0-0-= 0 -global isa-fdc.driveA=3Ddrive-fdc0-0-0 -device e1000,vlan=3D0,id=3Dnet0,= mac=3D52:54:00:84:6d:69,bus=3Dpci.0,addr=3D0x6 -net tap,fd=3D24,vlan=3D0,na= me=3Dhostnet0 -usb -vnc 127.0.0.1:1,password -k de -vga cirrus -device virt= io-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x3 ----- snip ----- Copy-pasting this to a commandline on the host to start qemu manually leads= to a non-functional qemu process that "just sits there" with nothing happe= ning. The monitor socket /usr/local/var/lib/libvirt/qemu/testserver-a.monit= or will, indeed, not show up. I've tried starting qemu with the same commandline but without the paramete= rs for redirecting the monitor to a socket, without the fd parameter for th= e network interface and without the vnc parameter. This resulted in a black= window with the title "QEMU (testserver-a) [Stopped]". I could not access = the monitor console in graphical mode either. When I press Ctrl-Alt-2 in gr= aphical mode to access the monitor console, qemu will sometimes (but not al= ways) crash with a segfault about 2 seconds after. Some experimentation I've done suggests that this problem only happens if t= he high cpu load is caused by another qemu process, not if it is caused by = something else running on the machine. The bug appears much less often if I leave off the -nodefaults parameter. The bug will still appear if I start qemu as qemu-system-x86_64 instead of = qemu-kvm and replace the -enable-kvm parameter with -no-kvm. The host machine I'm running this on has got 16 cores in total. It looks li= ke it is sufficient for this bug to surface if at least one of these cores = is brought to near 100% use by a qemu process. The version of qemu I'm using is qemu-kvm 0.12.4, built from source. Libvir= t is version 0.8.1, built from source as well. The host OS is Fedora 12. Th= e Kernel version is 2.6.32.12-115.fc12.x86_64. Attached is an strace of attempting to start qemu which I hope will help so= meone with a better understanding of qemu's internals see what's actually g= oing on there.