From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54858) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1sNG-00034N-Sx for qemu-devel@nongnu.org; Tue, 01 Jul 2014 03:21:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X1sN7-0003ud-1R for qemu-devel@nongnu.org; Tue, 01 Jul 2014 03:21:06 -0400 Received: from mail-we0-x22b.google.com ([2a00:1450:400c:c03::22b]:65222) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1sN6-0003uL-NE for qemu-devel@nongnu.org; Tue, 01 Jul 2014 03:20:56 -0400 Received: by mail-we0-f171.google.com with SMTP id q58so9245674wes.2 for ; Tue, 01 Jul 2014 00:20:55 -0700 (PDT) Date: Tue, 1 Jul 2014 09:20:52 +0200 From: Stefan Hajnoczi Message-ID: <20140701072052.GA24571@stefanha-thinkpad.redhat.com> References: <53B1EFE2.9040202@redhat.com> <53B1F560.8070705@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EeQfGwPcQSOJBaQU" Content-Disposition: inline In-Reply-To: <53B1F560.8070705@redhat.com> Subject: Re: [Qemu-devel] core dump with drive-mirror List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: "qemu-devel@nongnu.org" --EeQfGwPcQSOJBaQU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 30, 2014 at 05:40:16PM -0600, Eric Blake wrote: > On 06/30/2014 05:16 PM, Eric Blake wrote: > > I'm trying to track down a core dump with the QMP drive-mirror command. >=20 > Looks like the bug is related to a base image that is not a multiple of > a cluster size. >=20 > >=20 > > # in one terminal: > > cd /tmp > > rm -f base.img snap1.img snap2.img copy.img > >=20 > > # base.img <- snap1.img <- snap2.img; intentionally populating base.img > > # with a qcow2 header, but treating it as raw data > > qemu-img create -f qcow2 base.img 10M >=20 > If, right here, I inject: >=20 > truncate --size 262144 base.img >=20 > > qemu-img create -f qcow2 -b base.img -o backing_fmt=3Draw snap1.img > > qemu-img create -f qcow2 -b snap1.img -o backing_fmt=3Dqcow2 snap2.img > > cp base.img copy.img > > # Yes, this command line is derived from libvirt... > > LC_ALL=3DC PATH=3D/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin \ > > QEMU_AUDIO_DRV=3Dnone gdb --args /usr/bin/qemu-system-x86_64 \ >=20 > ...then everything else succeeds. So it seems the problem is that qemu > is doing a lousy job of handling a backing file and/or destination file > that is not fully rounded out to a proper size. Thanks for reporting this. It's something we need to fix during the QEMU 2.1 hard freeze that is starting today. Stefan --EeQfGwPcQSOJBaQU Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJTsmFUAAoJEJykq7OBq3PIduEIAMgTXlXRWEd+cU5ShM9adFHt dgSaTJAdR7BVlTjNznkYRtSDjIbaVntNG0LhPvOSt0Lj8/7hDq8vg9hvHj17d2xY FiYdKJ1d50dEZu6GuBFKt7lgQILDrX/kKHCBH1fk0R+QxyYEi0GfSiG7FxUF4cVy v8QfsFk0lLeQtgYVJAZIU3c/TjhMjsAHILo2j59mhSPxu2tNf3l5MH64oPhAMEYD xxQc+O5ljK/832l9GW8hRCIEWu1WgNwouc5TNZjMH3p13NgjKOsJdBjNeiv1AqIp Q8/ogRSFTQirC/c8g0vtEotkQhiUw1CGMSLMxER93sk1qXqZCx7oRQSVsj9Lc7o= =o9hC -----END PGP SIGNATURE----- --EeQfGwPcQSOJBaQU--