On Wed, 04/18 15:58, Fam Zheng wrote: > On Wed, 04/18 15:42, David Lee wrote: > > On Thu, Apr 12, 2018 at 11:57 PM, David Lee <live4t...@gmail.com> wrote: > > >>> > > >>> We tested qemu-kvm-ev-2.9.0-16.el7_4.14.1 - where from the source RPM we > > >>> verified it does contain ef6dada8b44e1e7c4bec5c1115903af9af415b50 > > >>> > > >>> But the issue still exists. The convert got stuck if one of the old > > >>> active overlay > > >>> had been 'vol-resize'd with qemu monitor command to a larger size. > > >>> This looks > > >>> like a prerequisite but not sufficient condition to trigger this > > >>> badness. > > >> > > >> So it is a separate issue. Did you try upstream master as well? > > >> > > >> Fam > > > > > > Not yet. > > > > Stefan & FAM, > > > > Here are the steps to reproduce this issue reliably: > > > > # qemu-img create -f qcow2 test.qcow2 100m > > ... omitted > > # qemu-img create -F qcow2 -f qcow2 -b test.qcow2 overlay.qcow2 > > ... omitted > > # qemu-img resize overlay.qcow2 +20m > > Image resized. > > # qemu-img create -F qcow2 -f qcow2 -b overlay.qcow2 overlay2.qcow2 > > ... omitted > > # qemu-img convert overlay2.qcow2 -f qcow2 -O qcow2 combined.qcow2 > > [hang] > > > > > > # qemu-img --version > > qemu-img version 2.9.0(qemu-kvm-ev-2.9.0-16.el7_4.14.1) > > Thanks, I can reproduce this but not on master. I will take a look.
qemu-img hangs because the convert_iteration_sectors loop cannot make any progress when it reaches the end of the base image. It is a bug (implicitly?) fixed by Eric Blake (Cc'ed) 's BDRV_BLOCK_EOF patches on upstream, backporting them to the above downstream version fixes the problem for me: commit c61e684e44272f2acb2bef34cf2aa234582a73a9 Author: Eric Blake <ebl...@redhat.com> block: Exploit BDRV_BLOCK_EOF for larger zero blocks commit fb0d8654ffc3ea1494067327fc4c4da5d0872724 Author: Eric Blake <ebl...@redhat.com> block: Add BDRV_BLOCK_EOF to bdrv_get_block_status() Fam