Netdev List
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: netdev@vger.kernel.org
Subject: Fw: [Bug 45571] New: The kernel disallows to reuse sockets which have TIME_WAIT pending connections
Date: Sat, 11 Aug 2012 11:09:02 -0700	[thread overview]
Message-ID: <20120811110902.640d1042@nehalam.linuxnetplumber.net> (raw)



Begin forwarded message:

Date: Sat,  4 Aug 2012 11:13:11 +0000 (UTC)
From: bugzilla-daemon@bugzilla.kernel.org
To: shemminger@linux-foundation.org
Subject: [Bug 45571] New: The kernel disallows to reuse sockets which have TIME_WAIT pending connections


https://bugzilla.kernel.org/show_bug.cgi?id=45571

           Summary: The kernel disallows to reuse sockets which have
                    TIME_WAIT pending connections
           Product: Networking
           Version: 2.5
          Platform: All
        OS/Version: Linux
              Tree: Mainline
            Status: NEW
          Severity: high
          Priority: P1
         Component: IPV4
        AssignedTo: shemminger@linux-foundation.org
        ReportedBy: t.artem@mailcity.com
        Regression: No


This is a follow up of the following bug report:
http://bugs.winehq.org/show_bug.cgi?id=26031

It's not Wine's problem, as it can be easily reproduced with native Linux
applications.

Bruno Jesus 2011-11-10 21:35:54 CST wrote:

> Well, after reading a lot of internet pages and trying several different
> attempts I think it's possible to say that it's a kernel bug or a
> characteristic of the kernel tcp implementation.
> 
> The attached patch forces SO_REUSEADDR in before every bind in an attempt to
> fix the problem but it only works if the program exits cleanly (so the kernel
> sets the socket to TIME_WAIT), if you do "wineserver -k" the socket will remain
> opened in an unknow broken state and no applications will be able to use it
> (wine or native linux apps).
> 
> Output of strace:
> getsockopt(24, SOL_SOCKET, SO_REUSEADDR, [0], [4]) = 0
> setsockopt(24, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
> bind(24, {sa_family=AF_INET, sin_port=htons(43012), sin_addr=inet_addr("0.     
> 0.0.0")}, 16) = -1 EADDRINUSE (Address already in use)
> 
> It's possible to see that I'm checking if SO_REUSEADDR is enabled and then
> enable it. But the bind fails anyway.

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

                 reply	other threads:[~2012-08-11 18:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20120811110902.640d1042@nehalam.linuxnetplumber.net \
    --to=shemminger@vyatta.com \
    --cc=netdev@vger.kernel.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