qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	"open list:Network Block Dev..." <qemu-block@nongnu.org>,
	Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 1/2] nbd: Drop connection if broken server is detected
Date: Fri, 11 Aug 2017 15:01:44 -0500	[thread overview]
Message-ID: <d48ab0e7-6ccf-8823-dab9-c5350f95b239@redhat.com> (raw)
In-Reply-To: <325cc2fd-277a-d0d2-53d9-8f46418a6a36@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 918 bytes --]

On 08/11/2017 02:41 PM, Eric Blake wrote:
>> Hmm, was it correct even before your patch? Is it safe to enter a coroutine
>> (which we've scheduled by nbd_recv_coroutines_enter_all()), which is
>> actually
>> yielded inside nbd_rwv (not our yield in nbd_co_receive_reply)?
> 
> I'm honestly not sure how to answer the question. In my testing, I was
> unable to catch a coroutine yielding inside of nbd_rwv();

Single stepping through nbd_rwv(), I see that I/O is performed by
sendmsg(), which either gets the message sent or, because of nonblocking
mode, fails with EAGAIN, which gets turned into QIO_CHANNEL_ERR_BLOCK
and indeed a call to qemu_channel_yield() within nbd_rwv() - but it's
timing sensitive, so I still haven't been able to provoke this scenario
using gdb.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]

  reply	other threads:[~2017-08-11 20:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-11  2:37 [Qemu-devel] [PATCH for-2.10 0/2] Fix NBD client after server error Eric Blake
2017-08-11  2:37 ` [Qemu-devel] [PATCH 1/2] nbd: Drop connection if broken server is detected Eric Blake
2017-08-11  7:48   ` Vladimir Sementsov-Ogievskiy
2017-08-11 14:15     ` Eric Blake
2017-08-11 14:53       ` Vladimir Sementsov-Ogievskiy
2017-08-11 19:41         ` Eric Blake
2017-08-11 20:01           ` Eric Blake [this message]
2017-08-11 22:12             ` Eric Blake
2017-08-11  2:37 ` [Qemu-devel] [PATCH 2/2] HACK: define NBD_SERVER_DEBUG to force malicious server Eric Blake
2017-08-11 16:07 ` [Qemu-devel] [PATCH for-2.10 0/2] Fix NBD client after server error Eric Blake

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=d48ab0e7-6ccf-8823-dab9-c5350f95b239@redhat.com \
    --to=eblake@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=vsementsov@virtuozzo.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).