Re: TCP socket close problem
- From: Staffan Ulfberg <staffan@xxxxxxxxxx>
- Date: 18 Jun 2006 22:48:13 +0200
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
.
- References:
- TCP socket close problem
- From: Staffan Ulfberg
- Re: TCP socket close problem
- From: Per Hedeland
- Re: TCP socket close problem
- From: Staffan Ulfberg
- Re: TCP socket close problem
- From: Per Hedeland
- TCP socket close problem
- Prev by Date: Re: FreeBSD > 4.11 hardware issue with Asus PSCH-SR/SATA mobo
- Next by Date: external hard drive slow to accept
- Previous by thread: Re: TCP socket close problem
- Next by thread: Re: TCP socket close problem
- Index(es):
Relevant Pages
|