|From:||Muhamad Ikhwan Ismail|
|Subject:||RE: [lwip-users] Problem with long term running of lwIP.|
|Date:||Fri, 29 Feb 2008 10:51:21 +0000|
I can verify I am seeing this problem with UDP after a certain random period of time. I am running an echo client on
lwIP 1.2.0 communicating with a server located in a windows PC. If the echo cycle is slow enough, no problem can be seen.
But if i set the echo cycles short, e.g. at 10ms, after a while the UDP echo communication stopped. I have pinpointed that
my client on lwIP had a problem when sending in which :
1.The server replied.
2 The echo on lwIP reads the data, and resend. HERE NO TRACE OF THIS PACKET COULD BE SEEN ON WIRESHARK.
3. The lwip client received the reply from tcpip thread then do read(), despite the data not being sent.
I think it is due to the driver, and the fact that the UDP packets are pbuf chains of the header and the referenced data.
I have not yet fixed this problem.
Another possible cause (I have seen this) is that after the ARP entry expired, and the client sends the pbuf chained, got queued in
ARP layer, an ARP request is sent. As soon the polling thread gets the ARP REPLY, it then updates the table and try to send the queued data (in the thread itself).
The problem was, my low_level_output was not protected, hence the chances are there that both tcpip thread (sending a TCP packet)and the polling thread access low_level_output simulataneously and corrupted the index of my Ethernet buffer descriptor. The TCP was retransmitted as it should, but the UDP data was lost, hence the echo stopped.
I fixed this by preventing preemption in the low_level_output.
Just something I found out, hopefully it could be of help to others.
> Subject: RE: [lwip-users] Problem with long term running of lwIP.
> From: address@hidden
> To: address@hidden
> Date: Fri, 29 Feb 2008 09:01:59 +0000
> On Wed, 2008-02-27 at 19:37 -0500, Taranowski, Thomas (SWCOE) wrote:
> > Thanks for the replies. I've added in some statistics collection code,
> > and am working with my customer to see if we can figure out the problem.
> > I'll post any answers I find.
> That so many people are seeing this problem is worrying. Can we try and
> establish if there's anything (port, driver, hardware) in common between
> those who have this issue?
> lwip-users mailing list
Helping your favorite cause is as easy as instant messaging. You IM, we give. Learn more.
|[Prev in Thread]||Current Thread||[Next in Thread]|