lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] http post and connection not closed problem


From: address@hidden
Subject: Re: [lwip-devel] http post and connection not closed problem
Date: Thu, 29 Oct 2009 11:08:17 +0100
User-agent: Thunderbird 2.0.0.23 (Macintosh/20090812)

Since you are using sockets (sorry, I seem to have missed that in your first mail), this really might be bug #26672. The change in tcp.h makes sure all newly received data doesn't influence the window, but it can happen that data in the socket's recvmbox closes the window. And the patch I posted to bug #26672 makes sure that when closing, tcp_recved() is called for this data, which makes sure the window reopens.
Could you try to apply this patch and see if it's better?

This explains the situation in packets 0-56 amd 960+. Reading your traces, I noticed you seem to run out of buffers somewhere, resulting in retransmissions (only few, but still...). You might want to get to the source of that, too.

Simon


Stephane Lesage wrote:
I'll try to reproduce my bug and see how lwip behaves with the fix.

Well I met the bug again,
And the situation is now better but not perfect.

Here is a capture with 3 attempts:
http://www.ateis-international.com/downloads/temp/upload%20bug%20IE%203.pcap

1. packets 0-56
same situation as before, but I could not reproduce it.
2. packets 57-932
Here we can see the lwip device acks and announces a full-size window of 8192 
bytes
after closing the connection.
3. packets 960+
Lwip acks with 250ms delay and window has not been reset

From preliminary investigation, it seems that read() returns a value <= 0 before the end of the http POST content, so I consider the connection closed.
I added more debug info in the response.
It may be an lwip bug or misconfiguration (recvmbox size ?)

Now I can see that I abort the download because read() returns 0.

Normally 0 means the connection is closed, right ?
Or should I use another way ?

Anyway, read() should not return 0 as the web browser keeps sending data.


When looking just before my http server sends the error 400 response,
In packet 183, length=1132
http://www.ateis-international.com/downloads/temp/upload%20bug%20IE.pcap

And here before lwip sends RST, in packet 213, length = 892
http://www.ateis-international.com/downloads/temp/upload%20bug%20FF.pcap

I can see that we arrive in the situation where window = 0.
Could it be a bug ?






reply via email to

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