lwIP - A Lightweight TCP/IP stack - Bugs: bug #36167, tcp server crash when client...
You are not allowed to post comments on this tracker with your current authentication level.
bug #36167: tcp server crash when client closes (maximum window)
Submitter: | christian <xtian> | ||
Submitted: | Fri 13 Apr 2012 02:45:41 PM UTC | ||
Category: | TCP | Severity: | 3 - Normal |
Item Group: | Crash Error | Status: | Fixed |
Privacy: | Public | Assigned to: | goldsimon |
Open/Closed: | Closed | Planned Release: | 2.1.0 |
lwIP version: | 1.4.0 |
Jump to the original submission
Fri 17 Nov 2017 08:21:17 PM UTC, comment #16: |
Simon Goldschmidt <goldsimon> |
Tue 31 Oct 2017 04:32:09 AM UTC, comment #15:
|
Joel Cunningham <jcunningham> |
Mon 30 Oct 2017 03:22:22 PM UTC, comment #14: Reopened to prevent these comments getting lost. I guess I'll need some time to check this again... |
Simon Goldschmidt <goldsimon> |
Mon 30 Oct 2017 03:20:04 PM UTC, comment #13: Sorry I wasn't clear enough. Line #118 in socket.t, the perl script I attached.
|
Joan Lledó <jllledo> |
Mon 30 Oct 2017 02:22:01 PM UTC, comment #12:
|
Joel Cunningham <jcunningham> |
Mon 30 Oct 2017 08:41:18 AM UTC, comment #11: Yes, the stack is aborted by that LWIP_ASSERT. I'm running this[1] Perl test over lwip with the sockets API and it makes the stack crash at line #118.
|
Joan Lledó <jllledo> |
Sun 29 Oct 2017 08:55:08 PM UTC, comment #10: Joan,
|
Joel Cunningham <jcunningham> |
Sun 29 Oct 2017 09:30:09 AM UTC, comment #9: Sorry for raising an old bug, but I've experienced this exact bug in the client side. That is, with TCP_WND set to 0xFFFF, an active closing crashes the server as its pcb->state is not CLOSE_WAIT nor LAST_ACK, but TIME_WAIT.
|
Joan Lledó <jllledo> |
Tue 08 Apr 2014 07:27:14 PM UTC, comment #8: Fixed, thanks for reporting. |
Simon Goldschmidt <goldsimon> |
Mon 13 Aug 2012 08:21:12 PM UTC, comment #7: Sorry for taking so long, but it seems that most of your solutions are correct:
|
Simon Goldschmidt <goldsimon> |
Thu 21 Jun 2012 01:27:29 PM UTC, comment #6: Simon Goldschmidt wrote:
|
christian <xtian> |
Thu 21 Jun 2012 10:52:46 AM UTC, comment #5: christian wrote:
|
Mason <mason> |
Thu 21 Jun 2012 10:41:21 AM UTC, comment #4: Just for the record: there is a window scaling patch (patch #6537) which should also implement this. It is however not against the current master and would need attention to be applied to current sources. |
Simon Goldschmidt <goldsimon> |
Thu 21 Jun 2012 10:11:16 AM UTC, comment #3: Thanks to all for contributing to this discussion.
|
christian <xtian> |
Fri 11 May 2012 09:13:42 PM UTC, comment #2:
|
Simon Goldschmidt <goldsimon> |
Sat 14 Apr 2012 10:04:03 AM UTC, comment #1: I expect the problem here is that the assert doesn't cope with the rcv_wnd value being at its maximum. Most users would have a TCP_WND value that would limit rcv_wnd before it got to 0xffff. For now you should work around this by setting TCP_WND slightly smaller until this gets fixed. |
Kieran Mansley <kieranm> |
Fri 13 Apr 2012 02:45:41 PM UTC, original submission:
Hi all:
|
christian <xtian> |
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 10 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2017-11-17 | goldsimon | Open/Closed | Open | Closed | |
2017-11-17 | goldsimon | Planned Release | None | 2.1.0 | |
2017-10-30 | goldsimon | Open/Closed | Closed | Open | |
2014-04-08 | goldsimon | Status | In Progress | Fixed | |
Open/Closed | Open | Closed | |||
2012-08-13 | goldsimon | Status | Confirmed | In Progress | |
Assigned to | None | goldsimon | |||
2012-08-13 | goldsimon | Summary | tcp server crash when client closes | tcp server crash when client closes (maximum window) | |
2012-05-11 | goldsimon | Status | None | Confirmed | |
2012-04-13 | xtian | Carbon-Copy | - | Added xtian |
Powered by Savane 3.13-4448.
Corresponding source code
OK, I have successfully triggered this by simulating the netconn behaviour (without NETCONN_NOAUTORCVD). The socket API seems to be fixed in this regard since 06.03.2017 when implementing the delayed window update speedup.
Keeping that aside, another way to trigger this via socket API was probably that before fixing bug #52403, tcp_recved() was called for pbufs left over in recvmbox on close.
Anyway, I've change the overflow check to be OK in all closing states, not only for passive close.
Thanks for reporting this, Joan.