From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: Eric Blake <eblake@redhat.com>, qemu-block@nongnu.org
Cc: kwolf@redhat.com, den@openvz.org, qemu-devel@nongnu.org,
mreitz@redhat.com
Subject: Re: [PATCH 1/3] block/nbd: allow drain during reconnect attempt
Date: Fri, 24 Jul 2020 14:50:15 +0300 [thread overview]
Message-ID: <9727dce8-41a0-256e-df0f-b11bd8219cc4@virtuozzo.com> (raw)
In-Reply-To: <7211b25e-94b8-de52-a2da-66f480af9a2a@redhat.com>
23.07.2020 21:47, Eric Blake wrote:
> On 7/20/20 4:00 AM, Vladimir Sementsov-Ogievskiy wrote:
>> It should be to reenter qio_channel_yield() on io/channel read/write
>> path, so it's safe to reduce in_flight and allow attaching new aio
>> context. And no problem to allow drain itself: connection attempt is
>> not a guest request. Moreover, if remote server is down, we can hang
>> in negotiation, blocking drain section and provoking a dead lock.
>>
>> How to reproduce the dead lock:
>>
>
> I tried to reproduce this; but in the several minutes it has taken me to write this email, it still has not hung. Still, your stack trace is fairly good evidence of the problem, where adding a temporary sleep or running it under gdb with a breakpoint can probably make reproduction easier.
I've tried to make a reproduce, adding temporary BDRV_POLL_WHILE, but I failed.
One time, it reproduced for me after 4000 iterations, but other times a lot earlier.
It may help to start several qemu-io loop in parallel.
Also, iotest 83 for -nbd hangs sometimes for me as well.
--
Best regards,
Vladimir
next prev parent reply other threads:[~2020-07-24 11:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-20 9:00 [PATCH for-5.1? 0/3] Fix nbd reconnect dead-locks Vladimir Sementsov-Ogievskiy
2020-07-20 9:00 ` [PATCH 1/3] block/nbd: allow drain during reconnect attempt Vladimir Sementsov-Ogievskiy
2020-07-20 9:02 ` Vladimir Sementsov-Ogievskiy
2020-07-23 18:47 ` Eric Blake
2020-07-24 10:04 ` Vladimir Sementsov-Ogievskiy
2020-07-24 11:50 ` Vladimir Sementsov-Ogievskiy [this message]
2020-07-24 9:49 ` Vladimir Sementsov-Ogievskiy
2020-07-24 10:21 ` Vladimir Sementsov-Ogievskiy
2020-07-20 9:00 ` [PATCH 2/3] block/nbd: on shutdown terminate connection attempt Vladimir Sementsov-Ogievskiy
2020-07-23 18:52 ` Eric Blake
2020-07-20 9:00 ` [PATCH 3/3] block/nbd: nbd_co_reconnect_loop(): don't sleep if drained Vladimir Sementsov-Ogievskiy
2020-07-23 18:55 ` Eric Blake
2020-07-27 18:42 ` Vladimir Sementsov-Ogievskiy
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=9727dce8-41a0-256e-df0f-b11bd8219cc4@virtuozzo.com \
--to=vsementsov@virtuozzo.com \
--cc=den@openvz.org \
--cc=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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).