From: Liu Yuan <namei.unix@gmail.com>
To: Jeff Cody <jcody@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
sheepdog-ng@googlegroups.com,
Stefan Hajnoczi <stefanha@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] sheepdog: discard the payload if the header is invalid
Date: Tue, 1 Sep 2015 10:05:38 +0800 [thread overview]
Message-ID: <20150901020538.GB11585@ubuntu-trusty> (raw)
In-Reply-To: <20150901015100.GI31272@localhost.localdomain>
On Mon, Aug 31, 2015 at 09:51:00PM -0400, Jeff Cody wrote:
> On Tue, Sep 01, 2015 at 09:29:31AM +0800, Liu Yuan wrote:
> > From: Liu Yuan <liuyuan@cmss.chinamobile.com>
> >
> > We need to discard the payload if we get a invalid header due to whatever reason
> > to avoid data stream curruption.
>
> If the header is invalid / corrupted, how can rsp.data_length be
> trusted? Out of curiosity, is this an issue you are seeing occur "in
> the wild"?
This is the defensive patch. Header is invalid in the sense that only rsp.id is
invalid due to sheepdog driver bugs, for e.g., the request was misplaced after
being sent or duplicated requests sending to sheep daemon and get the duplicated
responses for the same request.
Actually in the late 2012 we had seen this problem but we didn't find the root
cause how this happened by looking at the code statically and the problem was
gone silently while we restructured the code.
But yesterday some centos6 users reported to me the problem of
'cannot find aio_req' and hang the guest disk. That QEMU's sheepdog driver was
rather old and would bump rsp.id mismatch problem as we did in the late 2012.
By looking at the code again, I found this error handling problem. However,
this patch is not aimed to solve the rsp.id mismatch problem (If it still exist)
but just a defensive one after this problem happens.
Thanks,
Yuan
next prev parent reply other threads:[~2015-09-01 2:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-01 1:29 [Qemu-devel] [PATCH] sheepdog: discard the payload if the header is invalid Liu Yuan
2015-09-01 1:51 ` Jeff Cody
2015-09-01 2:05 ` Liu Yuan [this message]
2015-09-01 10:23 ` Liu Yuan
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=20150901020538.GB11585@ubuntu-trusty \
--to=namei.unix@gmail.com \
--cc=jcody@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=sheepdog-ng@googlegroups.com \
--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).