I've ported the lwip_httpsrv freertos example (from SDK 2.8.2) to RTX5 on a custom board with a LPC54616 and LAN8720A. After some time it runs in one of the following asserts:
tcpip_thread: invalid message
pbuf_free: p->ref > 0
To reproduce the issue i send up to 20 http requests per second. Slowing down the request rate also reduces the crash rate.The network only consists of the board and my computer, so there is no other traffic.
To eliminate issues due to the porting I've also tested the unchanged example on a LPCXpresso54618. After some time this one crashed too. Even with older LwIP versions (I've tested the ones from SDK 2.6.0 and 2.7.0) I can reproduce this issue.
Can anyone help?
thank you @nxf46115 for the link. Actually I already saw this thread before but did not recognize it's use for my problem cause the code for the LPC is a bit different.
I gave it a try anyway and implemented a seperate thread to call ethernet_input(), which solves the initial problem. But even if my code runs much smoother now, after some time it seems that there are no RX interrupts anymore and my ethernet_input_thread stays blocked.
All other interrupts and the lwip independent threads work as expected.