Re: TCP socket close problem



per@xxxxxxxxxxxx (Per Hedeland) writes:

Well, then it has to be either something wrong with the packets or a
serious bug in the FreeBSD TCP/IP stack - my bets are not on the
latter...

Mine neither. However, looking at the tcp_input code, there are lots
of cases that causes an incoming packet to be dropped. Determining
which one is actually happening is kind of hard by hand. I've been
googling quite a bit for this, but maybe there is some program that
looks at a tcp session (from tcpdump) to look for protocol errors on
any of the parts?

Your trace on the server does show the packets arriving, so there's not
likely to be any difference at that level - but I'm not sure if tcpdump
will flag corrupt checksums unless given at least one '-v'.

Ethereal says "checksum correct" on all packets involved.

If your server code is in the middle of sending data, TCP will keep
retransmitting (as we saw in the trace) for a while, but not indefintely
- I don't remember what the default timeout parameters on FreeBSD are,
or if they are settable, but eventually the session will be dropped, and
your program will be able to find out. You mainly need to ensure that
the server functionality isn't disabled during this period, either via
the traditional method of forking a new process for each session, or by
having code that can handle multiple sessions within a single process.
(using non-blocking I/O is generally required for this).

Sure, I am using non-blocking I/O, and no, there's no general impact
on the server itself because of these connections. The server does
keep some transactions open on behalf of the clients, however, so it
is still a nuisance.

Staffan
.



Relevant Pages

  • Re: RWW Timing
    ... I understand that you want to monitor when and how ... > to an internal Windows XP or Terminal Server computer. ... SBS creates a connection to the internal client on port 3389 which is ... But it can not tell which one session from the RWW, ...
    (microsoft.public.windows.server.sbs)
  • Re: Restricting TS USers
    ... MCSE, CCEA, Microsoft MVP - Terminal Server ... Terminal Services and Microsoft Windows Server 2003 Service Pack ... the remote session does not end immediately. ...
    (microsoft.public.windows.terminal_services)
  • Re: ASP sessionstate
    ... :>: so it is a clientside issue. ... ASP doesn't know or care what browser it ... but then it is not a new session. ... :> How can a Response.Write write to the server screen? ...
    (microsoft.public.inetserver.asp.general)
  • Re: ASP sessionstate
    ... ASP doesn't know or care what browser it ... ticket number given when the first item is added to the cart. ... How can a Response.Write write to the server screen? ... :> delete the cart file and set the session ...
    (microsoft.public.inetserver.asp.general)
  • Re: Explanation of macros; Haskell macros
    ... > server and I got to dictate the form of the commands and arguments. ... it boiled down to (funcall command client-session args). ... Let's assume there is a type "Session" for sessions. ... You don't need the first constraint, ...
    (comp.lang.lisp)