From: Trond Myklebust <trond.myklebust@primarydata.com>
To: Jeff Layton <jlayton@poochiereds.net>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Eric Dumazet <eric.dumazet@gmail.com>,
Anna Schumaker <anna.schumaker@netapp.com>,
Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
Linux Network Devel Mailing List <netdev@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Bruce James Fields <bfields@fieldses.org>
Subject: Re: [REGRESSION] NFS is creating a hidden port (left over from xs_bind() )
Date: Fri, 19 Jun 2015 16:30:18 -0400 [thread overview]
Message-ID: <1434745818.8838.1.camel@primarydata.com> (raw)
In-Reply-To: <20150619155226.7c5d6637@synchrony.poochiereds.net>
On Fri, 2015-06-19 at 15:52 -0400, Jeff Layton wrote:
> On Fri, 19 Jun 2015 13:39:08 -0400
> Trond Myklebust <trond.myklebust@primarydata.com> wrote:
>
> > On Fri, Jun 19, 2015 at 1:17 PM, Steven Rostedt <
> > rostedt@goodmis.org> wrote:
> > > On Fri, 19 Jun 2015 12:25:53 -0400
> > > Steven Rostedt <rostedt@goodmis.org> wrote:
> > >
> > >
> > > > I don't see that 55201 anywhere. But then again, I didn't look
> > > > for it
> > > > before the port disappeared. I could reboot and look for it
> > > > again. I
> > > > should have saved the full netstat -tapn as well :-/
> > >
> > > Of course I didn't find it anywhere, that's the port on my wife's
> > > box
> > > that port 947 was connected to.
> > >
> > > Now I even went over to my wife's box and ran
> > >
> > > # rpcinfo -p localhost
> > > program vers proto port service
> > > 100000 4 tcp 111 portmapper
> > > 100000 3 tcp 111 portmapper
> > > 100000 2 tcp 111 portmapper
> > > 100000 4 udp 111 portmapper
> > > 100000 3 udp 111 portmapper
> > > 100000 2 udp 111 portmapper
> > > 100024 1 udp 34243 status
> > > 100024 1 tcp 34498 status
> > >
> > > which doesn't show anything.
> > >
> > > but something is listening to that port...
> > >
> > > # netstat -ntap |grep 55201
> > > tcp 0 0 0.0.0.0:55201 0.0.0.0:*
> > > LISTEN
> >
> >
> > Hang on. This is on the client box while there is an active NFSv4
> > mount? Then that's probably the NFSv4 callback channel listening
> > for
> > delegation callbacks.
> >
> > Can you please try:
> >
> > echo "options nfs callback_tcpport=4048" > /etc/modprobe.d/nfs
> > -local.conf
> >
> > and then either reboot the client or unload and then reload the nfs
> > modules before reattempting the mount. If this is indeed the
> > callback
> > channel, then that will move your phantom listener to port 4048...
> >
>
> Right, it was a little unclear to me before, but it now seems clear
> that the callback socket that the server is opening to the client is
> the one squatting on the port.
>
> ...and that sort of makes sense, doesn't it? That rpc_clnt will stick
> around for the life of the client's lease, and the rpc_clnt binds to
> a
> particular port so that it can reconnect using the same one.
>
> Given that Stephen has done the legwork and figured out that
> reverting
> those commits fixes the issue, then I suspect that the real culprit
> is
> caf4ccd4e88cf2.
>
> The client is likely closing down the other end of the callback
> socket when it goes idle. Before that commit, we probably did an
> xs_close on it, but now we're doing a xs_tcp_shutdown and that leaves
> the port bound.
>
Agreed. I've been looking into whether or not there is a simple fix.
Reverting those patches is not an option, because the whole point was
to ensure that the socket is in the TCP_CLOSED state before we release
the socket.
Steven, how about something like the following patch?
8<-----------------------------------------------------------------
next prev parent reply other threads:[~2015-06-19 20:30 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-12 3:49 [REGRESSION] NFS is creating a hidden port (left over from xs_bind() ) Steven Rostedt
2015-06-12 14:10 ` Trond Myklebust
2015-06-12 14:40 ` Eric Dumazet
2015-06-12 14:57 ` Trond Myklebust
2015-06-12 15:43 ` Eric Dumazet
2015-06-12 15:34 ` Steven Rostedt
2015-06-12 15:50 ` Steven Rostedt
2015-06-12 15:53 ` Steven Rostedt
2015-06-18 3:08 ` Steven Rostedt
2015-06-18 19:24 ` Trond Myklebust
2015-06-18 19:49 ` Steven Rostedt
2015-06-18 22:50 ` Jeff Layton
2015-06-19 1:08 ` Steven Rostedt
2015-06-19 1:37 ` Jeff Layton
2015-06-19 3:21 ` Steven Rostedt
[not found] ` <20150619122553.43d2d86c@gandalf.local.home>
2015-06-19 17:17 ` Steven Rostedt
2015-06-19 17:39 ` Trond Myklebust
2015-06-19 19:52 ` Jeff Layton
2015-06-19 20:30 ` Trond Myklebust [this message]
2015-06-19 21:56 ` Steven Rostedt
2015-06-19 22:14 ` Steven Rostedt
2015-06-19 23:25 ` Trond Myklebust
2015-06-20 0:37 ` Steven Rostedt
2015-06-20 0:50 ` Steven Rostedt
2015-06-20 1:27 ` Steven Rostedt
2015-06-20 2:44 ` Trond Myklebust
2016-06-22 16:41 ` It's back! (Re: [REGRESSION] NFS is creating a hidden port (left over from xs_bind() )) Steven Rostedt
2015-06-19 21:50 ` [REGRESSION] NFS is creating a hidden port (left over from xs_bind() ) Steven Rostedt
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=1434745818.8838.1.camel@primarydata.com \
--to=trond.myklebust@primarydata.com \
--cc=akpm@linux-foundation.org \
--cc=anna.schumaker@netapp.com \
--cc=bfields@fieldses.org \
--cc=eric.dumazet@gmail.com \
--cc=jlayton@poochiereds.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rostedt@goodmis.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).