lwIP - A Lightweight TCP/IP stack - Bugs: bug #31487, FIN_WAIT_1 timeout?
You are not allowed to post comments on this tracker with your current authentication level.
bug #31487: FIN_WAIT_1 timeout?
Submitter: | Andrej <a_zupanc> | ||
Submitted: | Thu 28 Oct 2010 12:26:48 PM UTC | ||
Category: | TCP | Severity: | 3 - Normal |
Item Group: | Faulty Behaviour | Status: | Works For Me |
Privacy: | Public | Assigned to: | None |
Open/Closed: | Closed | Planned Release: | None |
lwIP version: | Other |
Thu 28 Oct 2010 12:36:00 PM UTC, comment #1: |
Kieran Mansley <kieranm> |
Thu 28 Oct 2010 12:26:48 PM UTC, original submission:
I face a situation in which TCP connection blocks in FIN_WAIT_1 state forever. In this case the embedded device running LWIP stack is acting as a server. The remote client initiates TCP communication to that embedded server. The IP communication runs over GPRS.
|
Andrej <a_zupanc> |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 2 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2010-10-28 | kieranm | Status | None | Works For Me | |
Open/Closed | Open | Closed |
Powered by Savane 3.13-758e.
Corresponding source code
I think TCP keepalive would solve your problem. This will timeout a socket if no traffic is seen, and sends probes to check if the other end is still there if there is no application traffic.
However in FINWAIT1 we are waiting for the ACK of our FIN. I would expect the stack to retransmit the FIN until it reaches TCP_MAXRTX tries at which time the connection should be closed. This could take some time (up to hours) as TCP is very persistent at trying to recover in such situations. How long do you wait?
I'm closing this as I think there are two mechanisms that should achieve what you want. If one or the other isn't working please open a new bug to discuss that.