Received: from eggs.gnu.org ([140.186.70.92]:59130) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXGb8-0005Dl-B2 for qemu-devel@nongnu.org; Sun, 04 Dec 2011 13:15:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RXGb6-00055O-5K for qemu-devel@nongnu.org; Sun, 04 Dec 2011 13:15:34 -0500 Received: from indium.canonical.com ([91.189.90.7]:52459) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXGb6-00055E-1F for qemu-devel@nongnu.org; Sun, 04 Dec 2011 13:15:32 -0500 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1RXGb5-0008J8-BI for ; Sun, 04 Dec 2011 18:15:31 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 51C622E8060 for ; Sun, 4 Dec 2011 18:15:31 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Sun, 04 Dec 2011 18:09:35 -0000 From: Michael Tokarev <899961@bugs.launchpad.net> Sender: bounces@canonical.com References: <20111204161619.13512.72277.malonedeb@soybean.canonical.com> Message-Id: <20111204180936.12764.84406.malone@soybean.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 899961] Re: qemu/kvm locks up when run 32bit userspace with 64bit kernel Reply-To: Bug 899961 <899961@bugs.launchpad.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org And some more info. Debugging with gdb shows this: (gdb) info threads Id Target Id Frame = 2 Thread 0xf6d4eb70 (LWP 28697) "qemu-system-x86" 0xf7711425 in __kern= el_vsyscall () * 1 Thread 0xf6f50700 (LWP 28694) "qemu-system-x86" 0xf7711425 in __kern= el_vsyscall () (gdb) bt #0 0xf7711425 in __kernel_vsyscall () #1 0xf76d620a in __pthread_cond_wait (cond=3D0x840fa60, mutex=3D0x89e82f0) at pthread_cond_wait.c:153 #2 0x080e8bb5 in qemu_cond_wait (cond=3D0x840fa60, mutex=3D0x89e82f0) at /build/kvm/git/qemu-thread-posix.c:113 #3 0x08050c2e in run_on_cpu (env=3D0x9466460, = func=3D0x8083ad0 , data=3D0x9466460) at /build/kvm/git/cpus.c:715 #4 0x08083b63 in kvm_cpu_synchronize_state (env=3D0x9466460) at /build/kvm/git/kvm-all.c:927 #5 0x0804faaa in cpu_synchronize_state (env=3D0x9466460) at /build/kvm/git/kvm.h:173 #6 0x0804fc3a in cpu_synchronize_all_states () at /build/kvm/git/cpus.c:94 #7 0x080647ec in main_loop () at /build/kvm/git/vl.c:1421 #8 0x0806974d in main (argc=3D17, argv=3D0xff996e04, envp=3D0xff996e4c) at /build/kvm/git/vl.c:3395 (gdb) frame 2 #2 0x080e8bb5 in qemu_cond_wait (cond=3D0x840fa60, mutex=3D0x89e82f0) at /build/kvm/git/qemu-thread-posix.c:113 113 err =3D pthread_cond_wait(&cond->cond, &mutex->lock); (gdb) = (gdb) thread 2 [Switching to thread 2 (Thread 0xf6d4eb70 (LWP 28697))] #0 0xf7711425 in __kernel_vsyscall () (gdb) bt #0 0xf7711425 in __kernel_vsyscall () #1 0xf727ac89 in ioctl () at ../sysdeps/unix/syscall-template.S:82 #2 0x08084004 in kvm_vcpu_ioctl (env=3D0x9466460, type=3D44672) at /build/kvm/git/kvm-all.c:1090 #3 0x08083cd8 in kvm_cpu_exec (env=3D0x9466460) at /build/kvm/git/kvm-all.= c:976 #4 0x08050f44 in qemu_kvm_cpu_thread_fn (arg=3D0x9466460) at /build/kvm/git/cpus.c:806 #5 0xf76d1c39 in start_thread (arg=3D0xf6d4eb70) at pthread_create.c:304 #6 0xf728296e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130 Backtrace stopped: Not enough registers or memory available to unwind furth= er which is not entirely interesting, but: when exiting gdb (I attached it to a running process), the whole thing unfreezes and continue its work as usual, if no lockup ever occured -- ie, it is enough to attach gdb to a locked up process and quit gdb - enough to unfreeze it. Also, when running under gdb, the lockup does not occur - I can reboot the guest at will any times, it all goes fine. Once gdb is detached, reboot immediately results in a lockup again - which - again - can be "cured" by attaching and detaching gdb to the process. And one more correction for the original report. When locked up, it does NOT use 100% CPU - CPU is 100% _idle_. -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/899961 Title: qemu/kvm locks up when run 32bit userspace with 64bit kernel Status in QEMU: New Bug description: Applies to both qemu and qemu-kvm 1.0, but only when kernel is 64bit and userspace is 32bit, on x86. Did not happen with previous released versions, such as 0.15. Not all guests triggers this issue - so far, only (32bit) windows 7 guest shows it, but does that quite reliable: first boot of an old guest with new qemu (or qemu-kvm), windows finds a new CPU and suggests rebooting - hit "Reboot" and in a few seconds it will be locked up (including the monitor), with 100% CPU usage. Killable with -9. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/899961/+subscriptions