From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35257) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9Z6v-00014a-PW for qemu-devel@nongnu.org; Sat, 01 Feb 2014 06:51:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W9Z6o-0000HS-Sj for qemu-devel@nongnu.org; Sat, 01 Feb 2014 06:51:45 -0500 Received: from smtp.mail.uni-mannheim.de ([134.155.96.80]:55995) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9Z6o-0000HE-M4 for qemu-devel@nongnu.org; Sat, 01 Feb 2014 06:51:38 -0500 Message-ID: <52ECDFBF.7060203@weilnetz.de> Date: Sat, 01 Feb 2014 12:51:27 +0100 From: Stefan Weil MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Native MinGW build crashes when partitioning hard disk in guest List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Legorol , qemu-devel@nongnu.org Am 01.02.2014 11:47, schrieb Legorol: > (I am reposting this as my first post seems to have fallen through the > cracks.) > > I am building the official Qemu 1.7.0 release from source natively under > MinGW for myself. I execute the i386 target. Qemu starts fine, but it > crashes when I try to partition a 2G hard disk under an MS-DOS 6.22 > guest. Details of the build and reproducing the crash are below. > > The problem also occurs for me with the 1.6.2 release. The problem does > not occur with these binaries from other people: > Eric Lassauge's Qemu-1.6.0-windows.zip > Prashant Satish's qemu-1.6.0-win32-sdl.tar.lzma > Stefan Weil's qemu-w32-setup-20131128, qemu-w32-setup-20140118.exe > > The problem does not occur when I add the --enable-debug flag to > configure! Whatever optimisation is removed as a result seems to avoid > the crash. > > How can I troubleshoot what the problem is? What should I change about > my build to solve the problem? > Hi, I assume that this is caused by a known problem with coroutines (which are used by QEMU's block operations) for Windows. Any file operation can cause that crash. See this discussion for details: http://lists.nongnu.org/archive/html/qemu-devel/2013-09/msg04197.html The problem is caused by buggy code produced by the MinGW compilers when optimisation is enabled. There exist several workarounds which fix the problem: * disable optimisation for coroutine-win32.c (that's what --enable-debug does) * disable the coroutine pool * modify the code of function qemu_coroutine_switch in coroutine-win32.c (that's what I use for my binaries) Try this patch: http://repo.or.cz/w/qemu/ar7.git/commitdiff/c777d5d62a729fd8b19847aaa0aad3d7a1f73f47 Regards Stefan