[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #34111] TCP_FIN_WAIT_TIMEOUT might be too small
From: |
Simon Goldschmidt |
Subject: |
[lwip-devel] [bug #34111] TCP_FIN_WAIT_TIMEOUT might be too small |
Date: |
Wed, 24 Aug 2011 09:03:55 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 5.1; rv:6.0) Gecko/20100101 Firefox/6.0 |
URL:
<http://savannah.nongnu.org/bugs/?34111>
Summary: TCP_FIN_WAIT_TIMEOUT might be too small
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: goldsimon
Submitted on: Mi 24 Aug 2011 09:03:55 GMT
Category: TCP
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release:
lwIP version: CVS Head
_______________________________________________________
Details:
I observed this while adding support for HTTP/1.1 persistent connections (not
checked in, yet):
The scenario is:
- using Firefox 6.0 (Windows XP), I loaded a webpage with embedded images (1
connection for the webpage, ~6 connections for the images)
- when the page is loaded, the connections stay open (firefox would re-use
them if I load another page soon enough)
- after ~8 seconds, our webserver closes unused connections -> FIN is sent
from lwIP to windows
- windows responds with ACK, but not with FIN (lwIP connections go to
FIN_WAIT2 state)
- 100 seconds later, windows would send the FIN, but at that state, lwIP has
already (silently) purged the pcbs (since the FIN_WAIT_TIMEOUT is 20 seconds
- since lwIP has already purged the connection, the FIN packet is passed to
the listening pcb -> RST is returned
- the last step is repeated several times, since the RST does not seem to lead
to windows giving up the connection, instead the FIN is retried
Now when I increase TCP_FIN_WAIT_TIMEOUT from 20 sec to 120 sec, it all
works.
However, I'm not sure if this is OK since
a) I'm not sure where that 100 sec timeout before windows sends the FIN comes
from (OS or browser?) and
b) I thought that the RST should be enough for windows to stop retrying the
FIN - maybe the seq/ack no's are wrong?
I'll attach a pcap showing this.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Mi 24 Aug 2011 09:03:55 GMT Name:
lwIP_FIN_WAIT_TIMEOUT_is_too_small.pcap Size: 51kB By: goldsimon
<http://savannah.nongnu.org/bugs/download.php?file_id=23855>
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?34111>
_______________________________________________
Nachricht geschickt von/durch Savannah
http://savannah.nongnu.org/
- [lwip-devel] [bug #34111] TCP_FIN_WAIT_TIMEOUT might be too small,
Simon Goldschmidt <=