[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] qcow2, lazy_refcounts and killing qemu
From: |
Greg Kurz |
Subject: |
Re: [Qemu-devel] qcow2, lazy_refcounts and killing qemu |
Date: |
Mon, 1 Sep 2014 14:41:02 +0200 |
On Sat, 30 Aug 2014 15:53:13 +0100
"Richard W.M. Jones" <address@hidden> wrote:
> I found out a few days ago that if you:
>
> (1) Open a qcow2 file that has lazy_refcounts = on and a backing file, and
>
> (2) Write lots of stuff, and
>
> (3) Kill qemu with SIGTERM [which I believed, maybe incorrectly, is a
> "nice" way to kill qemu]
>
> .. then you can end up with a corrupt qcow2 file. In particular the
> qcow2 file sometimes forgot that it had a backing file, but I suspect
> this was just a symptom and in fact the qcow2 file header wasn't being
> written to disk correctly.
>
Hi Rich,
Someone in IBM hit a very similar issue with PowerKVM a few monthes ago.
The symptom was a corrupted filesystem in a qcow2 file. The steps
involved to kill the QEMU process while the guest OS is shutting down.
Unfortunately, no easy reproducer could be found and investigations
halted...
> Is it correct that sending SIGTERM to qemu should kill it cleanly, or
> is that no longer the case, or is lazy_refcounts a special case, or
> have I found a bug?
>
QEMU catches SIGTERM and calls bdrv_close(), so I would favor it is
a bug or an undocumented limitation (hence a documentation bug :)
> I can reproduce this easily, although of course the reproducer will
> involve libguestfs.
>
> Rich.
>
Can you share this reproducer ?
Cheers.
--
Greg
- Re: [Qemu-devel] qcow2, lazy_refcounts and killing qemu,
Greg Kurz <=