From: Jason Baron <jbaron@akamai.com>
To: Trond Myklebust <trond.myklebust@primarydata.com>
Cc: Bruce Fields <bfields@fieldses.org>,
Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH 2/2] rpc: Add -EPERM processing for xs_udp_send_request()
Date: Thu, 18 Sep 2014 17:02:06 -0400 [thread overview]
Message-ID: <541B484E.90202@akamai.com> (raw)
In-Reply-To: <CAHQdGtQOoop=CShDx9dTXSjo47KzWoRqkM9PNx1Si-pFSXg-_w@mail.gmail.com>
On 09/18/2014 04:51 PM, Trond Myklebust wrote:
> On Thu, Sep 18, 2014 at 3:51 PM, Jason Baron <jbaron@akamai.com> wrote:
>> If an iptables drop rule is added for an nfs server, the client can end up in
>> a softlockup. Because of the way that xs_sendpages() is structured, the -EPERM
>> is ignored since the prior bits of the packet may have been successfully queued
>> and thus xs_sendpages() returns a non-zero value. Then, xs_udp_send_request()
>> thinks that because some bits were queued it should return -EAGAIN. We then try
>> the request and again and a softlockup occurs. The test sequence is simply:
>>
>> 1) open a file on the nfs server '/nfs/foo' (mounted using udp)
>> 2) iptables -A OUTPUT -d <nfs server ip> -j DROP
>> 3) write to /nfs/foo
>> 4) close /nfs/foo
>> 5) iptables -D OUTPUT -d <nfs server ip> -j DROP
>>
>> The softlockup occurs in step 4 above.
> For UDP, the expected and documented behaviour in the case above is as follows:
> - if the mount is soft, then return EIO on the first major timeout.
yeah - so this case is a softlockup in my testing :(
> - if the mount is hard, then retry indefinitely on timeout.
>
> Won't these 2 patches end up propagating an EPERM to the application?
> That would be a definite violation of both hard and soft semantics.
ok, yeah it does propogate the -EPERM up - I wasn't aware of the correct
semantics - thanks.
I can rework the patches such that they return -EIO instead for a soft mount,
and verify that we keep retrying for a hard one.
Thanks,
-Jason
next prev parent reply other threads:[~2014-09-18 21:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-18 19:51 [PATCH 0/2] rpc: resolve softlockup in presence of iptables drop rule Jason Baron
2014-09-18 19:51 ` [PATCH 1/2] rpc: return sent and err from xs_sendpages() Jason Baron
2014-09-18 20:48 ` Anna Schumaker
2014-09-18 19:51 ` [PATCH 2/2] rpc: Add -EPERM processing for xs_udp_send_request() Jason Baron
2014-09-18 20:51 ` Trond Myklebust
2014-09-18 21:02 ` Jason Baron [this message]
2014-09-18 21:20 ` Trond Myklebust
2014-09-19 1:54 ` Jason Baron
2014-09-19 19:41 ` Trond Myklebust
2014-09-19 21:16 ` Jason Baron
2014-09-22 17:55 ` Jason Baron
2014-09-22 19:49 ` Trond Myklebust
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=541B484E.90202@akamai.com \
--to=jbaron@akamai.com \
--cc=bfields@fieldses.org \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@primarydata.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