lkml.org 
[lkml]   [1996]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.0.13 Sockets Stuck on close


On 22 Aug 1996, Thomas Koenig wrote:
>
> In linux.dev.kernel, "Eric Schenk" <schenk@cs.toronto.edu> wrote:
> >Does the stuck socket eventually
> >disappear, or does it stick around until a reboot?
>
> It sticks around until the process dies (in my case, sendmail).

Umm.. This sounds like "TCP_CLOSE_WAIT" as opposed to "TCP_CLOSE". And that
makes sense, because any socket in TCP_CLOSE shouldn't even show up on
netstat (because it simply isn't there any more). Maybe "netstat" has a
bug and reports the wrong state?

And "TCP_CLOSE_WAIT" should NOT time out. Because the state essentially
means that the other end has closed the connection, and the networking
side is now waiting for _our_ application to close down the socket. And
obviously the kernel can't time out on that.

So if you see sockets in CLOSE state (and assuming this really is
TCP_CLOSE_WAIT), it probably means that there is a local application that for
some unfathomable reason keeps the socket open. So rather than a kernel
problem, it might indicate a user-level problem (a application getting stuck
waiting for something to happen, possibly due to race conditions within the
application itself due to signal handling or something)?

Linus

\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.086 / U:0.688 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site