lwIP - A Lightweight TCP/IP stack - Bugs: bug #46701, Non-standard close behavior can...
You are not allowed to post comments on this tracker with your current authentication level.
bug #46701: Non-standard close behavior can result in socket/netconn leaks
Submitter: | Joel Cunningham <jcunningham> | ||
Submitted: | Wed 16 Dec 2015 11:03:32 PM UTC | ||
Category: | sockets/netconn | Severity: | 3 - Normal |
Item Group: | Change Request | Status: | Fixed |
Privacy: | Public | Assigned to: | goldsimon |
Open/Closed: | Closed | Planned Release: | None |
lwIP version: | git head |
Jump to the original submission
Mon 21 Mar 2016 02:39:16 PM UTC, comment #11: |
Joel Cunningham <jcunningham> |
Fri 18 Mar 2016 06:59:16 PM UTC, comment #10: Right.
|
Simon Goldschmidt <goldsimon> |
Fri 18 Mar 2016 03:55:54 PM UTC, comment #9: Simon,
|
Joel Cunningham <jcunningham> |
Thu 17 Mar 2016 08:13:28 PM UTC, comment #8: I'm fine with addressing the RST-on-close by translating the err to ERR_OK and allowing the netconn/socket to be cleaned up appropriately. Feel free to move that to a separate bug if desired, thanks! |
Joel Cunningham <jcunningham> |
Thu 17 Mar 2016 08:05:41 PM UTC, comment #7: I've committed the fix for nonblocking sockets, so only the RST-on-close remains. Although that one might deserve its own bug entry... |
Simon Goldschmidt <goldsimon> |
Thu 17 Mar 2016 07:52:05 PM UTC, comment #6: Reading up on this, you're probably right that lwIP-internal resource shortage should not lead to EWOULDBLOCK on socket layer. I'm OK with changing the netconn API in this respect, too.
|
Simon Goldschmidt <goldsimon> |
Thu 17 Mar 2016 06:56:13 PM UTC, comment #5: Simon,
|
Joel Cunningham <jcunningham> |
Thu 18 Feb 2016 07:09:23 PM UTC, comment #4: I can follow you on Stevens, but he doesn't talk about nonblocking sockets or is he? I don't know if we're doing something wrong here or not.
|
Simon Goldschmidt <goldsimon> |
Thu 14 Jan 2016 12:33:20 AM UTC, comment #3: I'm attaching some work-arounds for this issue (which I'm using in my port) for anyone to use before Simon gets back and we can work through the proper fix. |
Joel Cunningham <jcunningham> |
Thu 17 Dec 2015 07:54:23 PM UTC, comment #2: I found another case where this is happening. If once in a blocking close, trying to send a FIN, if an RST is received, the TCP error callback is called, returning ERR_RST (ECONNRESET) to the application thread that is blocked. When this happens, the netconn and socket are leaked
|
Joel Cunningham <jcunningham> |
Wed 16 Dec 2015 11:05:31 PM UTC, comment #1: Here's the Steven's text, apologies for messed up formatting:
|
Joel Cunningham <jcunningham> |
Wed 16 Dec 2015 11:03:32 PM UTC, original submission:
I've encountered non-standard close behavior that can result in socket and netconn leaks. Long explanation here, please bear with me
|
Joel Cunningham <jcunningham> |
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 5 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2016-03-18 | goldsimon | Status | In Progress | Fixed | |
Open/Closed | Open | Closed | |||
2016-03-17 | goldsimon | Status | None | In Progress | |
Assigned to | None | goldsimon | |||
2016-01-14 | jcunningham | Attached File | - | Added 0001-Work-around-for-bug-46701-close-leaks-sockets.patch, #36021 |
Powered by Savane 3.13-f8d8.
Corresponding source code
Moved the issue of blocking during memory failure over to:
bug #47485 (https://savannah.nongnu.org/bugs/index.php?47485)