From: "J. Bruce Fields" <bfields@fieldses.org>
To: Jeff Layton <jlayton@poochiereds.net>
Cc: Gil Amsalem <gil.amsalem@primarydata.com>,
Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>,
linux-nfs@vger.kernel.org
Subject: Re: [PATCH] Reduce the probability to get port collision when asking for secure port. port collision = same port allocated to 2 different clients trying to connect to the same address.
Date: Thu, 14 Jan 2016 15:00:59 -0500 [thread overview]
Message-ID: <20160114200059.GA4484@fieldses.org> (raw)
In-Reply-To: <20160113210008.080b2a4c@synchrony.poochiereds.net>
On Wed, Jan 13, 2016 at 09:00:08PM -0500, Jeff Layton wrote:
> On Wed, 13 Jan 2016 11:34:25 -0500
> "J. Bruce Fields" <bfields@fieldses.org> wrote:
>
> > On Wed, Jan 13, 2016 at 10:59:25AM +0200, Gil Amsalem wrote:
> > > Hi,
> > >
> > > I don't know how, but I faced this issue where the *bindsocket* method
> > > bounded port 1 for two different threads.
> > > Not sure how could it happen.
> > > After my change, I got random ports of course, and the problem was solved.
> >
> > Huh. OK, well I'd like to see how to reproduce the problem and
> > understand what was going on. Maybe I'm just missing something obvious
> > but I didn't think it should be possible for two bind()s to the same
> > port to succeed simultaneously.
> >
>
> It is possible if you set SO_REUSEPORT on the socket. Does pynfs do
> that? Might be interesting to strace the program and see if it sets
> that option on the socket to confirm...
This is just socket.bind() with no special options so it'd be pretty
weird if it was doing an SO_REUSEPORT. Not a bad idea to check that
with an strace if the problem shows up again, though.
Anyway, dropping the patch for now.
--b.
next prev parent reply other threads:[~2016-01-14 20:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-08 7:27 pynfs patch Tigran Mkrtchyan
2015-12-08 7:27 ` [PATCH] Reduce the probability to get port collision when asking for secure port. port collision = same port allocated to 2 different clients trying to connect to the same address Tigran Mkrtchyan
2016-01-12 22:06 ` J. Bruce Fields
[not found] ` <CAOE_DS_M61BJV7UgyBOf7nZStj43xfUbzeSzoS_=gMM6ZDyg=w@mail.gmail.com>
2016-01-13 16:34 ` J. Bruce Fields
2016-01-14 2:00 ` Jeff Layton
2016-01-14 20:00 ` J. Bruce Fields [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-05-19 15:30 [PATCH 1/2] reduce code duplication Tigran Mkrtchyan
2016-05-19 15:30 ` [PATCH] Reduce the probability to get port collision when asking for secure port. port collision = same port allocated to 2 different clients trying to connect to the same address Tigran Mkrtchyan
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=20160114200059.GA4484@fieldses.org \
--to=bfields@fieldses.org \
--cc=gil.amsalem@primarydata.com \
--cc=jlayton@poochiereds.net \
--cc=linux-nfs@vger.kernel.org \
--cc=tigran.mkrtchyan@desy.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.