From: Steve Dickson <SteveD@redhat.com>
To: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Cc: Chuck Lever <chuck.lever@oracle.com>, linux-nfs@vger.kernel.org
Subject: Re: [PATCH nfs-utils v2] statd: Don't unregister statd service on failing to execute callout
Date: Wed, 16 Mar 2016 14:20:58 -0400 [thread overview]
Message-ID: <56E9A40A.5040405@RedHat.com> (raw)
In-Reply-To: <1455582968-4474-1-git-send-email-makita.toshiaki@lab.ntt.co.jp>
On 02/15/2016 07:36 PM, Toshiaki Makita wrote:
> statd calls atexit(statd_unregister) to unregister statd service on exit,
> which actually has a side-effect that ha_callout() unregisters statd
> service even when the child callout process exits on execl() failure.
>
> Certain clustering software's deployment script adds -H option with its
> specified file non-existent, when it is configured not to use callout.
> In other words, -H seems to be used no matter if callout is needed or not,
> but when callout is unnecessary, the specified callout program is not
> deployed.
> This causes statd not to work once a lock is requested by its NFS client,
> as execl() in ha_callout() results in ENOENT and exit() of the child
> process calls exit-handler statd_unregister(). Eventually, the NFS client
> gets stuck with messages "lockd: cannot monitor xxx" on the NFS server.
>
> Also, execl() could fail for other reasons like ENFILE or EIO as well.
>
> A forked child must not unregister the statd RPC server, so use
> _exit(), which does not call any exit-handlers, instead of exit().
>
> Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
> Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
Committed....
steved.
> ---
> v2:
> - Simplified changelog.
>
> support/include/ha-callout.h | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/support/include/ha-callout.h b/support/include/ha-callout.h
> index 1164336..a454bdb 100644
> --- a/support/include/ha-callout.h
> +++ b/support/include/ha-callout.h
> @@ -47,7 +47,7 @@ ha_callout(char *event, char *arg1, char *arg2, int arg3)
> arg3 < 0 ? NULL : buf,
> NULL);
> perror("execl");
> - exit(2);
> + _exit(2);
> case -1: perror("fork");
> break;
> default: pid = waitpid(pid, &ret, 0);
>
prev parent reply other threads:[~2016-03-16 18:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-16 0:36 [PATCH nfs-utils v2] statd: Don't unregister statd service on failing to execute callout Toshiaki Makita
2016-03-03 0:20 ` Toshiaki Makita
2016-03-03 0:27 ` Steve Dickson
2016-03-03 1:01 ` Toshiaki Makita
2016-03-16 18:20 ` Steve Dickson [this message]
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=56E9A40A.5040405@RedHat.com \
--to=steved@redhat.com \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=makita.toshiaki@lab.ntt.co.jp \
/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).