[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #49533] TCP connection deadlocks upon dropped window u
From: |
Joel Cunningham |
Subject: |
[lwip-devel] [bug #49533] TCP connection deadlocks upon dropped window update due to not filling window |
Date: |
Fri, 4 Nov 2016 18:40:21 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0 |
URL:
<http://savannah.nongnu.org/bugs/?49533>
Summary: TCP connection deadlocks upon dropped window update
due to not filling window
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: jcunningham
Submitted on: Fri 04 Nov 2016 06:40:18 PM GMT
Category: TCP
Severity: 3 - Normal
Item Group: Faulty Behaviour
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
lwIP version: git head
_______________________________________________________
Details:
This bug continues the discussion that happened way back in bug #34517 where
it was identified that if LwIP receives a window value smaller than the
current unsent segment and there is no unacknowledged data, LwIP won't send
and the subsequent window update can be dropped. When the update is dropped,
the connection deadlocks because we didn't fill the window entirely and engage
zero window probing
I've been able to observe this problem with git master on my products. I'm
seeing the receiver's window is less than 1 MSS but the next packet on the
unsent queue is 1 MSS, so LwIP stops sending. Then the window update from the
receiver is dropped (verified update is sent in wireshark, but tcphdr in
tcp_in.c only shows the previous ACK with < 1 MSS window).
In order to address this. I started with the original persistent timer patch
from bug #20511 which contained support for splitting the unsent segment to
fill the window (which was rejected due to complexity)
I modified the logic to use the splitting very conservative and target only
this case (rather than always filling the window by splitting). Only when
unsent segment is smaller than the send window (not congestion) AND the
unacked queue is empty.
I further re-wrote the tcp_split_unsent_seg() function to be vastly simpler.
The original implementation didn't use pbuf and TCP segment utility functions,
vastly complicating the segment creation and pbuf copying. Also it didn't
seem to be correct for read-only pbufs as it used memmove on the pbuf being
split. My implementation creates a new segment for the remainder payload
(copying the remainder) and then trims the original pbuf.
Please see attached patch and provide feedback
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Fri 04 Nov 2016 06:40:18 PM GMT Name:
0001-TCP-fill-send-window-completely-when-no-data-is-infl.patch Size: 8kB
By: jcunningham
<http://savannah.nongnu.org/bugs/download.php?file_id=38890>
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?49533>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [lwip-devel] [bug #49533] TCP connection deadlocks upon dropped window update due to not filling window,
Joel Cunningham <=
- [lwip-devel] [bug #49533] TCP connection deadlocks upon dropped window update due to not filling window, Joel Cunningham, 2016/11/11
- [lwip-devel] [bug #49533] TCP connection deadlocks upon dropped window update due to not filling window, Simon Goldschmidt, 2016/11/14
- [lwip-devel] [bug #49533] TCP connection deadlocks upon dropped window update due to not filling window, Joel Cunningham, 2016/11/14
- [lwip-devel] [bug #49533] TCP connection deadlocks upon dropped window update due to not filling window, Simon Goldschmidt, 2016/11/14
- [lwip-devel] [bug #49533] TCP connection deadlocks upon dropped window update due to not filling window, Simon Goldschmidt, 2016/11/14
- [lwip-devel] [bug #49533] TCP connection deadlocks upon dropped window update due to not filling window, Joel Cunningham, 2016/11/14
- [lwip-devel] [bug #49533] TCP connection deadlocks upon dropped window update due to not filling window, Joel Cunningham, 2016/11/14
- [lwip-devel] [bug #49533] TCP connection deadlocks upon dropped window update due to not filling window, Simon Goldschmidt, 2016/11/15
- [lwip-devel] [bug #49533] TCP connection deadlocks upon dropped window update due to not filling window, Joel Cunningham, 2016/11/15
- [lwip-devel] [bug #49533] TCP connection deadlocks upon dropped window update due to not filling window, Simon Goldschmidt, 2016/11/16