qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Cody <jcody@redhat.com>
To: Fam Zheng <famz@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org,
	Kevin Wolf <kwolf@redhat.com>, Max Reitz <mreitz@redhat.com>,
	pbonzini@redhat.com, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 0/1] block: Workaround for the iotests errors
Date: Fri, 24 Nov 2017 01:12:34 -0500	[thread overview]
Message-ID: <20171124061234.GB14612@localhost.localdomain> (raw)
In-Reply-To: <20171123175747.2309-1-famz@redhat.com>

On Fri, Nov 24, 2017 at 01:57:46AM +0800, Fam Zheng wrote:
> Jeff's block job patch made the latent drain bug visible, and I find this
> patch, which by itself also makes some sense, can hide it again. :) With it
> applied we are at least back to the ground where patchew's iotests (make
> docker-test-block@fedora) can pass.
> 

Unfortunately, I am still seeing segfaults and aborts even with this patch.
For instance, on tests: 097 141 176.

k
> The real bug is that in the middle of bdrv_parent_drained_end(), bs's parent
> list changes. One drained_end call before the mirror_exit() already did one
> blk_root_drained_end(), a second drained_end on an updated parent node can do
> another same blk_root_drained_end(), making it unbalanced with
> blk_root_drained_begin(). This is shown by the following three backtraces as
> captured by rr with a crashed "qemu-img commit", essentially the same as in
> the failed iotest 020:
> 
> * Backtrace 1, where drain begins:
> 
> (rr) bt
> 
> * Backtrace 2, in the early phase of bdrv_parent_drained_end(), before
>   mirror_exit happend:
> 
> (rr) bt
> 
> * Backtrace 3, in a later phase of the same bdrv_parent_drained_end(), after
>   mirror_exit() which changed the node graph:
> 
> (rr) bt
> 
> IMO we should rethink bdrv_parent_drained_begin/end to avoid such complications
> and maybe in the long term get rid of the nested BDRV_POLL_WHILE() if possible.
> 
> It's late for me so I'm posting the patch anyway in case we could use it for
> -rc3.
> 
> Note this doesn't fix the hanging 056, which I haven't debugged yet.
> 
> Fam
> 
> Fam Zheng (1):
>   block: Don't poll for drain end
> 
>  block/io.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> -- 
> 2.14.3
> 

  parent reply	other threads:[~2017-11-24  6:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-23 17:57 [Qemu-devel] [PATCH 0/1] block: Workaround for the iotests errors Fam Zheng
2017-11-23 17:57 ` [Qemu-devel] [PATCH 1/1] block: Don't poll for drain end Fam Zheng
2017-11-24  6:12 ` Jeff Cody [this message]
2017-11-24  8:41   ` [Qemu-devel] [PATCH 0/1] block: Workaround for the iotests errors Fam Zheng
2017-11-24 16:39 ` Kevin Wolf
2017-11-28  2:53   ` Fam Zheng
2017-11-27 23:29 ` Kevin Wolf
2017-11-28  0:21   ` [Qemu-devel] [Qemu-block] " John Snow
2017-11-28  5:43   ` [Qemu-devel] " Jeff Cody
2017-11-28 11:42     ` Kevin Wolf
2017-11-28 12:28       ` [Qemu-devel] [Qemu-block] " Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171124061234.GB14612@localhost.localdomain \
    --to=jcody@redhat.com \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).