lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #50837] TCP: zero window probe doesn't timeout


From: preet
Subject: [lwip-devel] [bug #50837] TCP: zero window probe doesn't timeout
Date: Tue, 16 May 2017 16:36:48 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36

Follow-up Comment #31, bug #50837 (project lwip):

I had to manually add the changes.  The patch did not apply; I have never
tried "git apply" command so maybe it was a user error on my end.

First I tested the workaround fix that we have on our end which used 5 second
send timeout.  Workaround still works and there was no lingering socket.  The
send() returned an error eventually after the send timeout and the socket was
gracefully closed by the application and I was able to re-connect as expected.
 PCAP file for this is attached.

Test results WITHOUT the 5 second socket timeout workaround:
After the Windows/Python app got killed, I noticed that the LWIP memory pools
claimed that 10 buffers from my MALLOC_256 byte pool were busy, but this time
I did not get any mailbox errors that were tracked during the failure of
sys_try_post() method.

One thing I did notice is that while the send() was blocked, the listening
socket was taking connections even though the listen backlog was set to 1
during the listen() function call and no one was doing accept().  This may be
a separate issue, so let me not distract ourselves.

After Windows/Python app killed itself, I noticed LWIP was consistently using
9 MALLOC_256 pools and 8 MALLOC_1564 pools while the zombie socket was still
alive.  After about 2 minutes and 30 seconds, most likely the send() timed out
with this patch, and not only the socket error led to the application closing
the socket, but the listen backlog released the allocated NETCONN memory
resources.  The memory pools also dropped down to near zero proving that the
socket let go of the allocated memory resources.  So the fix seems to work,
except that it did not really take all 11 minutes for it to release the LWIP
resources.

Please inspect the PCAP files to make sure things went well.

(file #40714, file #40715)
    _______________________________________________________

Additional Item Attachment:

File name: lwip_50837_patch_test___without_timeout.pcapng Size:335 KB
File name: lwip_50837_patch_test___with_5s_send_timeout.pcapng Size:285 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?50837>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]