qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH 0/5] blockjobs: Fix transactional race condition


From: John Snow
Subject: Re: [Qemu-block] [PATCH 0/5] blockjobs: Fix transactional race condition
Date: Mon, 8 Aug 2016 15:19:09 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

I should also clarify that this is ambiguously for either 2.7 or 2.8.

2.7: This fixes a real, observable problem with transactional completion that has the capacity to hang QEMU or segfault due to QLIST corruption.

2.8: Incremental backup is not earnestly a supported feature yet as persistence and migration are not yet integrated, so perhaps it's not a game-breaker that this feature breaks in some circumstances.


On 08/08/2016 03:09 PM, John Snow wrote:
There are a few problems with transactional job completion right now.

First, if jobs complete so quickly they complete before remaining jobs
get a chance to join the transaction, the completion mode can leave well
known state and the QLIST can get corrupted and the transactional jobs
can complete in batches or phases instead of all together.

Second, if two or more jobs defer to the main loop at roughly the same
time, it's possible for one job's cleanup to directly invoke the other
job's cleanup from within the same thread, leading to a situation that
will deadlock the entire transaction.

Thanks to Vladimir for pointing out these modes of failure.

________________________________________________________________________________

For convenience, this branch is available at:
https://github.com/jnsnow/qemu.git branch job-manual-start
https://github.com/jnsnow/qemu/tree/job-manual-start

This version is tagged job-manual-start-v1:
https://github.com/jnsnow/qemu/releases/tag/job-manual-start-v1

John Snow (4):
  blockjob: add block_job_start
  blockjob: refactor backup_start as backup_job_create
  blockjob: add .clean property
  iotests: add transactional failure race test

Vladimir Sementsov-Ogievskiy (1):
  blockjob: fix dead pointer in txn list

 block/backup.c             |  50 +++++++-----
 block/commit.c             |   2 +-
 block/mirror.c             |   2 +-
 block/stream.c             |   2 +-
 blockdev.c                 | 194 ++++++++++++++++++++++++++-------------------
 blockjob.c                 |  24 +++++-
 include/block/block_int.h  |  19 ++---
 include/block/blockjob.h   |  16 ++++
 tests/qemu-iotests/124     |  91 +++++++++++++++++++++
 tests/qemu-iotests/124.out |   4 +-
 tests/test-blockjob-txn.c  |   2 +-
 11 files changed, 284 insertions(+), 122 deletions(-)


--
—js



reply via email to

[Prev in Thread] Current Thread [Next in Thread]