Received: from eggs.gnu.org ([208.118.235.92]:53850) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8GZR-00013C-VP for qemu-devel@nongnu.org; Thu, 15 Mar 2012 15:42:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S8GZP-000205-OR for qemu-devel@nongnu.org; Thu, 15 Mar 2012 15:42:45 -0400 Received: from indium.canonical.com ([91.189.90.7]:52147) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8GZP-000200-Ft for qemu-devel@nongnu.org; Thu, 15 Mar 2012 15:42:43 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1S8GZN-0005Hz-35 for ; Thu, 15 Mar 2012 19:42:41 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id F31242E891F for ; Thu, 15 Mar 2012 19:35:44 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Thu, 15 Mar 2012 19:29:47 -0000 From: Michael Tokarev <899961@bugs.launchpad.net> Sender: bounces@canonical.com References: <20111204161619.13512.72277.malonedeb@soybean.canonical.com> Message-Id: <20120315192947.12960.86368.malone@gac.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 I tried bisecting it today, again. I think you did mean 145e11e840500e04a4d0a624918bb17596be19e9 as the "M" point (the large merge), not b195043003d90ea4027ea01cc7a6c974ac915108 (which is the first commit in that merge) ;) Actually I did the same already, just didn't post to the bugreport. But anyway. The first bad commit inside the merge which shows the bad behavour is: commit 68d100e905453ebbeea8e915f4f18a2bd4339fe8 Author: Kevin Wolf Date: Thu Jun 30 17:42:09 2011 +0200 qcow2: Use coroutines Note: the issue happens only with qcow2 being in use so far, directly or indirectly with -snapshot. Also note that it only happens within kvm tree, ie: git checkout 68d100e905453ebbeea8e915f4f18a2bd4339fe8 git merge --no-commit 145e11e840500e04a4d0a624918bb17596be19e9^ # the pre= -merge point I tried to debug it further but without much success. I'm attaching an strace the above source (with a few debug fprintf(stderr)s added into qcow2 source around lock/unlock calls) running winXP guest from point where I hit "Reboot" button and up to the point where it stalls. Search for "qcow2: mutex_unlock" from the _end_ of the file. What I also observed is -- it looks like it merely loses an interrupt somewere, it is enough to Ctrl+Z/fg it or to attach/detach strace to the process for it to "unstuck" and continue executing. Attaching gdb also makes it unstuck as demonstrated initially. This qcow2 commit may actually be innocent: it just started using coroutines, and that's where the bug/problem might be, say, 64bit kernel gets confused by the process switching stack for example? I dunno. Note again that switching to alternative coroutine implementations makes the issue go away. Ie, it only happens with mkcontext&Co coroutine implementation, and the commit which git bisect found to be "guilty" is the one which makes usage of coroutines. ** Attachment added: "strace of the kvm process before it gets stuck" https://bugs.launchpad.net/qemu/+bug/899961/+attachment/2877301/+files/t= rc -- = 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 Status in =E2=80=9Cqemu-kvm=E2=80=9D package in Debian: Confirmed Bug description: Only applies to qemu-kvm 1.0, and 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-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 no CPU usage whatsoever. Killable only with -9. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/899961/+subscriptions