lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] lwip_read hanging and wrong sequence number


From: address@hidden
Subject: Re: [lwip-users] lwip_read hanging and wrong sequence number
Date: Fri, 12 Feb 2010 13:55:13 +0100
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1

Cristina Marcucci wrote:
1. My thread reads data with lwip_read (I have set a timeout of 36 seconds
as a socket option, but the problem occurs also without the timeout
directive). After working fine for some time, my thread "hangs" on the
lwip_read, no more data received or a timeout happening. But the incoming
messages are are still being processed and acked at TCP level all the time.
My window size of course shrinks more an more, and finally my receive queue
gets full, proving that my thread is not receiving anylonger. Wireshark
trace attached.
Can you see where it hangs? If you can debug your target, you should be able to tell us exactly where it hangs in lwip_read(). The only thing I can imagine hanging there is sys_arch_mbox_fetch(), which is a function of the AVR port. If that hangs while the recvmbox is growing, it suggests there is a problem with the mbox functions of that port. It should at least time out if it can't fetch new data.

Oh, this applies to 1.3.x only, which version of lwIP are you using?
2. In a different scenario, after running fine for some time, my application
sends a wrong sequence number. Wireshark trace attached.
Without knowing your protocol, I'd say what we see here is a lost packet rather than a wrong sequence number. Can you check whether that's the case somehow? You might include a counter in the sent packets to check that with wireshark. If that's the case, someone is dropping packets: either lwIP (or the netif driver, rather) or a network component between your device and wireshark. The netif driver is the most suspicious here...

What's strange is that for the retransmission, the lost packet is skipped again... And even more strange is that the device seems to be dead after that (only one retransmission, no ACKs to the retransmissions from the .82 host).

Simon




reply via email to

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