From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Cygwin bash's built-in test command crashes on Windows 2008 Server 64bit under KVM Date: Thu, 22 Jan 2009 17:02:24 +0200 Message-ID: <49788A80.2070403@redhat.com> References: <40ddf2480901050654y268213d1jbf34f9d81d6faeb0@mail.gmail.com> <40ddf2480901050822q52a9c2b6x5d5d87d17dec4992@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Jamie Kirkpatrick Return-path: Received: from mx2.redhat.com ([66.187.237.31]:41814 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752895AbZAVPC3 (ORCPT ); Thu, 22 Jan 2009 10:02:29 -0500 In-Reply-To: <40ddf2480901050822q52a9c2b6x5d5d87d17dec4992@mail.gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: Jamie Kirkpatrick wrote: > All > > This is my first post to the list but this seems to be the only place > I can get this problem to be looked at by hopefully the correct > people: I've bounced it around in #kvm on freenode and we've all > agreed its a development issue / bug that needs looking at. > > Anyway, without further ado: my machine is a Core 2 Due Quad Core > based box running Debian Lenny and a 2.6.27 kernel as the host OS. I > am using KVM-82 right now and track all current releases of the KVM > code. > > The issue I have run into seems to be very specific to the hardware > setup I have and the fact that I'm running this version of Windows > under virtualization. I have been trying for some time to get Git to > work under this OS and for one reason or another I was trying the > cygwin based install. Problems started appearing as soon as I install > cygwin, and during the installation process even: various post-install > config scripts crash and I get the usual windows JIT debugger window > popping up etc. > > Upon further investigation I have tracked the problem down to a > problem with Cygwin bash's builtin "test" implementation ( the [] > syntax in shell scripting ). I can cause the crash by simply invoking > this syntax from a command line. This problem has been noted before > and has been posted about elsewhere: first on the cygwin list, and > then after on the Xen list. Everyone seems to agree that based on > more extensive testing from other people that this is being caused by > something in the virtualzation stack. > > Two messages of note are: > > http://sourceware.org/ml/cygwin/2008-01/msg00582.html > http://www.nabble.com/Xen-3.2.1---Win-2003-2008-Server-64-bit-guests:-cygwin-bash-builtin-%22test%22-crashes-td19001336.html > > I've spent a long time trying to track this down: I've tried various > versions of KVM and have tried playing around with windows lots as > well. No luck. I'm lost on this but it seems to me that this just > should not happen and if there is a bug in the way Xen and KVM treat > things then it needs fixing...hence the post. > > If someone wants to try and squash / identify this bug further I'm > availible as a tester: I am a c++ developer by day but I don't know > the KVM code or how you go about debugging it. If someone can prime > me in that direction perhaps I could look at it as well. > > Anyway, anything I can do to help and I will. > I tried to track this down. Apparently the guest clobbers gs during the exit routine. Since it happens in the guest, it's a little difficult to track down. It can be done using the guest debugger, in this way: - start bash in the debugger - stop the program - add a watchpoint to break when the value of gs:[0x30] changes - single-step the program until the watchpoint triggers However, my Windows debugging skills are pretty much nonexistent. Can you guide me through this? I'm using windbg. -- error compiling committee.c: too many arguments to function