lwIP - A Lightweight TCP/IP stack - Bugs: bug #26062, FIN_WAIT_2 state following...
You are not allowed to post comments on this tracker with your current authentication level.
bug #26062: FIN_WAIT_2 state following tcp_close should timeout eventually
Submitter: | Jeff Barber <jeffbabar> | ||
Submitted: | Wed 01 Apr 2009 01:16:18 PM UTC | ||
Category: | TCP | Severity: | 3 - Normal |
Item Group: | Faulty Behaviour | Status: | Fixed |
Privacy: | Public | Assigned to: | goldsimon |
Open/Closed: | Closed | Planned Release: | None |
lwIP version: | CVS Head |
Jump to the original submission
Sat 20 Feb 2010 06:11:25 PM UTC, comment #9: |
Simon Goldschmidt <goldsimon> |
Mon 15 Feb 2010 06:40:25 PM UTC, comment #8: We should continue the discussion about close vs. shutdown in task #10088 and delay this bug until that task is done. |
Simon Goldschmidt <goldsimon> |
Wed 21 Oct 2009 11:20:43 AM UTC, comment #7: Having close and shutdown is planned for 1.4.0, so this will be dependent on that. |
Kieran Mansley <kieranm> |
Mon 19 Oct 2009 01:04:11 PM UTC, comment #6: I think this is actually a subtle API change that should be considered carefully.
|
Jeff Barber <jeffbabar> |
Sun 18 Oct 2009 09:07:11 AM UTC, comment #5: Would preventing to reset pcb->tmr in tcp_process for FIN_WAIT_2 and LAST_ACK states be enough to solve this? |
Simon Goldschmidt <goldsimon> |
Mon 06 Apr 2009 09:16:47 AM UTC, comment #4: It is mean that we have timeout error in LAST_ACK state too. |
Oleg Tyshev <olegreen> |
Fri 03 Apr 2009 02:27:40 PM UTC, comment #3: OK, that makes sense, thanks. |
Kieran Mansley <kieranm> |
Fri 03 Apr 2009 01:48:16 PM UTC, comment #2: True but there's only a single timer ("tmr") in the pcb and it gets updated for each segment received. So if the remote end continues to send data after we sent the FIN -- which is perfectly okay for it to do -- the session never times out.
|
Jeff Barber <jeffbabar> |
Thu 02 Apr 2009 02:20:15 PM UTC, comment #1: There's some code in tcp_slowtmr() that seems to be intending to do this:
|
Kieran Mansley <kieranm> |
Wed 01 Apr 2009 01:16:18 PM UTC, original submission:
If an application calls tcp_close, this indicates that it no longer needs the connection (i.e. it's equivalent to closing the socket descriptor in Unix). Hence, after a FIN is sent to the peer, the TCP session should enter a state where it is guaranteed to be destroyed eventually. In the typical TCP implementation (see reference below), this is achieved by an additional FIN_WAIT_2 timer. There is no such mechanism in the current lwIP implementation -- the session and associated data structure may hang around forever if the remote peer doesn't send a FIN of its own.
|
Jeff Barber <jeffbabar> |
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 4 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2010-02-20 | goldsimon | Status | None | Fixed | |
Assigned to | None | goldsimon | |||
Open/Closed | Open | Closed | |||
2009-08-20 | kieranm | Planned Release | 1.4.0 |
Powered by Savane 3.13-f8d8.
Corresponding source code
Fixed by not updating pcb->tmr after calling tcp_close() (i.e. in states FIN_WAIT_1, FIN_WAIT_2 and LAST_ACK.