[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for-2.10 1/1] qemu-iotests/109: Fix lock race co
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH for-2.10 1/1] qemu-iotests/109: Fix lock race condition |
Date: |
Tue, 1 Aug 2017 16:53:37 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
On 08/01/2017 04:31 PM, Cleber Rosa wrote:
> A race condition is currently present between the clean up attempt of
> the QEMU process and the execution of qemu-img. The actual (bad)
> output is:
>
> -Warning: Image size mismatch!
> -Images are identical.
> +qemu-img: Could not open '<build_dir>/tests/qemu-iotests/scratch/t.raw':
> Failed to get "consistent read" lock
> +Is another process using the image?
>
> A KILL signal is sent to the QEMU process, but qemu-img may begin to
> run before the QEMU process is really gone. qemu-img will then
> attempt to open the TEST_IMG file before it can secure a lock on it.
>
> This attempts a more graceful shutdown, and waits for the QEMU process
> to exit.
>
> Signed-off-by: Cleber Rosa <address@hidden>
> ---
> tests/qemu-iotests/109 | 3 ++-
> tests/qemu-iotests/109.out | 56
> ++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 58 insertions(+), 1 deletion(-)
Reviewed-by: Eric Blake <address@hidden>
Probably missed -rc1, but still okay for -rc2
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature