Received: from eggs.gnu.org ([2001:4830:134:3::10]:42349) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bWq50-0002k7-4y for qemu-devel@nongnu.org; Mon, 08 Aug 2016 15:19:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bWq4y-0007mI-0V for qemu-devel@nongnu.org; Mon, 08 Aug 2016 15:19:17 -0400 References: <1470683381-16680-1-git-send-email-jsnow@redhat.com> From: John Snow Message-ID: Date: Mon, 8 Aug 2016 15:19:09 -0400 MIME-Version: 1.0 In-Reply-To: <1470683381-16680-1-git-send-email-jsnow@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 0/5] blockjobs: Fix transactional race condition List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-block@nongnu.org Cc: kwolf@redhat.com, jcody@redhat.com, vsementsov@virtuozzo.com, famz@redhat.com, qemu-devel@nongnu.org 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=20 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=20 persistence and migration are not yet integrated, so perhaps it's not a=20 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 wel= l > 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(-) > --=20 =97js