LwIP hangs on FreeRTOS running on LM3s9B96

Hello, I have a LM3s9b96 running FreeRTOS and LwIP 1.3.2. The system is quite stable and works flawlessly on my internal network. However, when connected to a real network, the system was reported to stop responding after a few minutes (the webserver wouldn’t respond and the browser would respond with the not found message). I have been trying to reproduce the problem here and after looking for some helpful tools, I managed to find and install a Network Emulator. When I set the error rate to 50% for both the upstream and the downstream, I manage to crash the system very easily after just a few minutes. I do this by simply trying to connect to the IP several times through the webbrowser (type the IP and press enter repetitively). I believe that the LwIP stack should be capable of dealing with erratic packets and recover from those situations. However it gets stuck and stops responding under this conditions, even if I resume correct network operation on my network emulator (webserver doesn’t respond). I managed to enable the LwIP debug and I get the following messages when the system gets stuck: tcplisteninput: ACK in LISTEN, sending reset tcp_rst: seqno 14413 ackno 2663191756. tcplisteninput: ACK in LISTEN, sending reset tcp_rst: seqno 12029 ackno 1885481390. tcplisteninput: ACK in LISTEN, sending reset tcp_rst: seqno 14712 ackno 3923105658. tcplisteninput: ACK in LISTEN, sending reset tcp_rst: seqno 14712 ackno 3923105259. tcplisteninput: ACK in LISTEN, sending reset …. In other occasions I get these other messages. The “increment_magnitude <= p->len” message causes the sytem to crash and restart (somehow it results in a HW fault):
  1. Checksum (0x1000) failed, IP packet dropped.
  2. Checksum (0x40) failed, IP packet dropped.
Checksum (0x400) failed, IP packet dropped. IP (len 16432) is longer than pbuf (len 52), IP packet dropped. 2013-10-05 13:09:06 Deadlock: semaphoreTake
  1. IP (len 4136) is longer than pbuf (len 50), IP packet dropped. Checksum (0x7fff) failed, IP packet dropped.
  2. IP (len 168) is longer than pbuf (len 50), IP packet dropped.
increment_magnitude <= p->len @ C:localsvndspyNEWBWOStagsv1.4.4txstlsrcliblwipsrccorepbuf.c:437 I would appreciate any help in fixing this problem. Regards, Antonio

LwIP hangs on FreeRTOS running on LM3s9B96

Your question is very lwIP specific, so I recommend posting it to the lwIP mailing list which is active and helpful. I suspect the first reply will suggest you update to a later version of lwIP though. Which Network Emulator are you using? Regards.