From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56080) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1kok-0003UC-0v for qemu-devel@nongnu.org; Mon, 30 Jun 2014 19:17:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X1kod-0006jT-PK for qemu-devel@nongnu.org; Mon, 30 Jun 2014 19:16:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26226) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1kod-0006jG-HD for qemu-devel@nongnu.org; Mon, 30 Jun 2014 19:16:51 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5UNGoSP002849 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 30 Jun 2014 19:16:50 -0400 Received: from [10.3.113.171] (ovpn-113-171.phx2.redhat.com [10.3.113.171]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s5UNGoUr024596 for ; Mon, 30 Jun 2014 19:16:50 -0400 Message-ID: <53B1EFE2.9040202@redhat.com> Date: Mon, 30 Jun 2014 17:16:50 -0600 From: Eric Blake MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ewI5IMvNbUV70So2kxRmULb9huGm1cR1x" Subject: [Qemu-devel] core dump with drive-mirror List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "qemu-devel@nongnu.org" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ewI5IMvNbUV70So2kxRmULb9huGm1cR1x Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I'm trying to track down a core dump with the QMP drive-mirror command. # in one terminal: cd /tmp rm -f base.img snap1.img snap2.img copy.img # 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 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 \ -machine accel=3Dkvm -name testvm1 -S \ -machine pc-i440fx-2.0,accel=3Dkvm,usb=3Doff -m 256 \ -realtime mlock=3Doff -smp 1,sockets=3D1,cores=3D1,threads=3D1 \ -uuid 5a74eeb4-09c5-4fc2-869d-0e04c13f9db0 -no-user-config \ -nodefaults -chardev socket,id=3Dcharmonitor,\ path=3D/var/lib/libvirt/qemu/testvm1.monitor,server,nowait \ -mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol -rtc base=3Dutc \= -no-shutdown -no-acpi -boot strict=3Don \ -device piix3-usb-uhci,id=3Dusb,bus=3Dpci.0,addr=3D0x1.0x2 \ -drive file=3D/tmp/snap2.img,if=3Dnone,id=3Ddrive-virtio-disk0,format=3D= qcow2 \ -device virtio-blk-pci,scsi=3Doff,bus=3Dpci.0,addr=3D0x3,\ drive=3Ddrive-virtio-disk0,id=3Dvirtio-disk0,bootindex=3D1 \ -vnc 127.0.0.1:0 -device cirrus-vga,id=3Dvideo0,bus=3Dpci.0,addr=3D0x2 \= -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x4 \ -msg timestamp=3Don # in next terminal: mkdir -p /var/lib/libvirt/qemu nc -u /var/lib/libvirt/qemu/testvm1.monitor {"execute":"qmp_capabilities"} {"execute":"cont"} {"execute":"drive-mirror","arguments":{"device":"drive-virtio-disk0", "target":"/tmp/copy.img","format":"raw", "mode":"existing","sync":"full"}= } at which point, I get a core dump with the following trace: #0 __memcpy_sse2_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-sse2-unaligned.S:41 #1 0x000055555563c9d9 in memcpy (__len=3D, __src=3D, __dest=3D) at /usr/include/bits/string3.h:51 #2 handle_aiocb_rw (aiocb=3D0x5555562064c0) at block/raw-posix.c:756 #3 0x000055555563d645 in aio_worker (arg=3D0x5555562064c0) at block/raw-posix.c:922 #4 0x000055555578774b in worker_thread (opaque=3D0x555556206800) at thread-pool.c:110 #5 0x00007ffff3f1ef33 in start_thread (arg=3D0x7fffe0cd3700) at pthread_create.c:309 #6 0x00007fffed636ded in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 and note that the file size of copy.img is no longer the same as what I was expecting: -rw-r--r--. 1 qemu qemu 197120 Jun 30 16:58 /tmp/base.img -rw-r--r--. 1 qemu qemu 262144 Jun 30 17:14 /tmp/copy.img -rw-r--r--. 1 qemu qemu 197120 Jun 30 16:58 /tmp/snap1.img -rw-r--r--. 1 root root 197120 Jun 30 16:58 /tmp/snap2.img --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --ewI5IMvNbUV70So2kxRmULb9huGm1cR1x Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTse/iAAoJEKeha0olJ0Nqqw4H/Rh5YtDSTDH/cAEpILinBm8h Q2hFCjS9TXJm0aC06LQPwoHxm+pX/BL/k48BhirKexchyacbziK8/di37VWX5mWU DbuBQYdeqsS6sUXs4gEMBtvH4DDLJgnnkj8/5fI+3o3TIcGwc5Uyg1zZFYpcGdQo NjutU52Wk+/WHqf7cV0+knFyOjkuSStVQbMPuuD9zbfPmgyBE/0301tkZPVRj5Ec GPJhayIJBCOtnZE0egG3cb8RLb2u3e8PvEzUbiBooHrMGx5+d6p0ob5cek8W70pb Tzjm20Nf36v/ijOfyC207S/xYzoENBr+aK9B1jPjuH31gB23EHBjd0RB4TRqI5Q= =mI8k -----END PGP SIGNATURE----- --ewI5IMvNbUV70So2kxRmULb9huGm1cR1x--