lwIP - A Lightweight TCP/IP stack - Bugs: bug #50276, tcp: fix accept event on closed...
You are not allowed to post comments on this tracker with your current authentication level.
bug #50276: tcp: fix accept event on closed listening PCBs
Submitter: | David van Moolenbroek <dcvmoole> | ||
Submitted: | Fri 10 Feb 2017 05:48:22 PM UTC | ||
Category: | TCP | Severity: | 3 - Normal |
Item Group: | Faulty Behaviour | Status: | Fixed |
Privacy: | Public | Assigned to: | None |
Open/Closed: | Closed | Planned Release: | None |
lwIP version: | git head |
Jump to the original submission
Tue 28 Feb 2017 07:28:24 PM UTC, comment #6: |
Simon Goldschmidt <goldsimon> |
Tue 28 Feb 2017 05:45:58 PM UTC, comment #5: Neat, thanks!
|
David van Moolenbroek <dcvmoole> |
Tue 28 Feb 2017 11:14:31 AM UTC, comment #4: I've added bug #50418 for the new bug pointed out in comment #2. Should be already fixed. |
Simon Goldschmidt <goldsimon> |
Tue 28 Feb 2017 08:08:22 AM UTC, comment #3: Well spotted! And just in time for 2.0.2 :-)
|
Simon Goldschmidt <goldsimon> |
Mon 27 Feb 2017 10:39:44 PM UTC, comment #2: Hmm well, even though I stand by this patch and I still believe it is an improvement, I feel obliged to add the following. The same crash happened again, and this time I managed to reproduce it. As it turns out, the reason is that with the events API, events other than ACCEPT are also fired on connections that are arriving, but have not yet been accepted, on a listening socket. That is, connections in SYN_RCVD state. Such connections may see not only ACCEPT events, but also POLL and ERR events. Those events are obviously not interesting to the higher layer, but unlike with the callback API, where no callback functions will have been set for them yet, the event API will pass them to the event handler anyway.
|
David van Moolenbroek <dcvmoole> |
Fri 10 Feb 2017 08:32:06 PM UTC, comment #1: Right. Thanks for the patch. EVENT_API that is. Good to have someone testing it in that direction...
|
Simon Goldschmidt <goldsimon> |
Fri 10 Feb 2017 05:48:22 PM UTC, original submission:
I just got a rare crash I cannot reproduce, but all the debug information points to my side of things trying to process a TCP accept event for a new PCB for which the listening PCB was already gone.
|
David van Moolenbroek <dcvmoole> |
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 3 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2017-02-10 | goldsimon | Status | None | Fixed | |
Open/Closed | Open | Closed | |||
2017-02-10 | dcvmoole | Attached File | - | Added 0001-tcp-fix-accept-event-on-closed-listening-PCBs.patch, #39722 |
Powered by Savane 3.13-3230.
Corresponding source code
As you can see from the commits today, using the event api is limited to very specific use cases anyway where you have only one "application" sitting on top of lwIP: I had to disable all TCP applications for the !callback-api case...