[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 19/19] block: make accounting thread-safe
From: |
Alberto Garcia |
Subject: |
Re: [Qemu-devel] [PATCH 19/19] block: make accounting thread-safe |
Date: |
Thu, 24 May 2018 15:35:50 +0200 |
User-agent: |
Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) |
On Mon 05 Jun 2017 02:39:08 PM CEST, Paolo Bonzini wrote:
> @@ -102,6 +107,8 @@ static void block_account_one_io(BlockAcctStats *stats,
> BlockAcctCookie *cookie,
>
> assert(cookie->type < BLOCK_MAX_IOTYPE);
>
> + qemu_mutex_lock(&stats->lock);
QEMU crashes because this lock is not initialized if you do aio_read
directly from a BDS not attached to a BlockBackend (should that
operation be legal at all?)
$ qemu-system-x86_64 -monitor stdio \
-blockdev driver=qcow2,file.driver=file,file.filename=hd0.img,node-name=hd0
(qemu) qemu-io hd0 "aio_read 0 1M"
qemu-system-x86_64: util/qemu-thread-posix.c:64: qemu_mutex_lock_impl:
Assertion `mutex->initialized' failed.
Aborted
Berto
- Re: [Qemu-devel] [PATCH 19/19] block: make accounting thread-safe,
Alberto Garcia <=