lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Connection closes with Echoraw demo


From: Francois Bouchard
Subject: Re: [lwip-users] Connection closes with Echoraw demo
Date: Tue, 29 Sep 2009 10:04:27 -0400

Hi David,
 
> I assume that in your capture, 172.27.42.102 is your server running LWIP with Echoraw?
 
    Yes that is correct, without an OS.
 
 
> ... and it would be useful to get LWIP stats while the problem is occurring.
 
I got some statistic :
 
lwip_stats
    Link
        xmit: 50,737
        drop: 30
        err: 30
        (all others at zero)
 
 
    tcp
        xmit 50,707
        recv: 50,744
        err: 0
        (all others at zero)
 
    mem
        avail: 4096
        used: 40
        max: 2220
        err: 0
        (all others at zero)
 
 
    ip
        xmit: 50,714
        recv: 30292
        lenerr: 6
        proterr: 30259
        (all others at zero)
 
regards,
 
Francois
----- Original Message -----
Sent: Monday, September 28, 2009 5:29 PM
Subject: Re: [lwip-users] Connection closes with Echoraw demo

I doubt that "not having time to send ACKs" is the problem. If the client is sending packets and the server is echoing them back to the client, each packet sent by the server can include a piggyback acknowledge of the previous packet sent by the client. In your Wireshark capture, observe that the "Ack" number increases by 1000 in each packet sent by the server. The server will only send a "plain ACK" packet if it has nothing else to send.
 
I assume that in your capture, 172.27.42.102 is your server running LWIP with Echoraw?
 
Up to packet 238, everything looks normal. Packet 239 is the next data packet from the client. Packet 240 is the odd one: the server sent a duplicate ack instead of echoing any data. The duplicate ack repeats the "Ack" value from the previous data packet sent by the server. The pattern subsequently repeats, with the client retrying the same data packet and the server asking for it again.
 
The behaviour suggests the server had a problem such as running out of memory, which allowed it to receive a packet from the client but it wasn't able to store the data. It was able to transmit an empty acknowledgement, which shows that none of the receive data has been accepted by the application (as opposed to not being able to allocate enough memory to send the data in the echo response).
 
The server is still indicating it has a receive window of 1500, which suggests it has free memory.
 
I see from an earlier post that you are running LWIP 1.3.0. There were some bugs fixed in 1.3.1 in areas relating to handling of acknowledgements, so you might have run into one of these bugs. Is it possible for you to try updating to 1.3.1 or CVS-head to see if the problem is still there?
 
I'm not familiar enough with the relevant details, but I'm sure others who can help will also want to know settings from your lwipopts.h file relating to memory allocation and pbufs, and it would be useful to get LWIP stats while the problem is occurring.
 
----- Original Message -----
Sent: Tuesday, September 29, 2009 3:27 AM
Subject: [lwip-users] Connection closes with Echoraw demo

HI all,
The server side (embedded) runs the Echoraw demo, which implements a TCP Echo Server.  On the Client Side, my PC an Echo client runs and continuously sends packest, and measure the Round Trip Time.  Client sends Another message as soon as it receive the echo of the previous one.
That runs fine for a while, but after few time (mostly random I would say, although it can run for a few hours) the TCP connection terminates by itself !
 
I think server does'nt have the time to send ACK.  Should I pause client apps once in a while to let the server send acks?
 
Attached is the wireshark file when the TCP connection stops.
 
regards,
 
FB


_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users

reply via email to

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