Thread (16 messages) flat view 16 messages, 2 authors, 2017-11-08

Re: TCP connection closed without FIN or RST

From: Eric Dumazet <hidden>
Date: 2017-11-08 17:29:07

Please do not top post on netdev.

On Wed, 2017-11-08 at 11:04 -0500, Vitaly Davidovich wrote:
So this issue is somehow related to setting SO_RCVBUF *after*
connecting the socket (from the client).  The system is configured
such that the default rcvbuf size is 1MB, but the code was shrinking
this down to 75Kb right after connect(). 
What are you calling default rcvbuf size exactly ?

Is the application doing 

 s = socket(...);
 ...
 setsockopt(s, SOL_SOCKET, SO_RCVBUF, [1000000], 4)
 ...
 connect(s, ...)
 setsockopt(s, SOL_SOCKET, SO_RCVBUF, [75000], 4)
 
 I think that explains why
the window size advertised by the client was much larger than
expected.  I see that the kernel does not want to shrink the
previously advertised window without advancement in the sequence
space.  So my guess is that the client runs out of buffer and starts
dropping packets.  Not sure how to further debug this from userspace
(systemtap? bpf?) - any tips on that front would be appreciated.

You could provide a packet capture (tcpdump) for a start ;)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help