Hello,
I have two Tiva-C Development boards
* EK-TM4C1294XL Rev C
* TM4C129X Development Board
I have tested every lwIP implementation across both boards and they all have the same issue. When inspecting lwIP's MEMP_STATS_DISPLAY the number of used PBUF_POOL objects eventually equals the number of available objects. This also causes all network activity to stop.
When starting the application, there are the default 8 PBUF_POOL objects used, prepared for DMA receiving. If I perform some HTTP GETs, there are still only 8 PBUF_POOL objects used, indicating that things are working and pbufs are being recycled as expected.
Now, I pull in a small test app that listens on a TCP port, accepts the connection and receives bytes. It currently just dumps the bytes but this has been used on multiple lwIP implementations without issue so I have faith that the issue isn't in my code.
The receive handler, to show that it is not the cause:
static err_t disc_received(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err) { if (p!=NULL) { tcp_recved(pcb, p->tot_len); pbuf_free(p); } return ERR_OK; }
If I send a small 300kb file eventually all pbufs are used and inspecting the PBUF_POOL shows that the used quantity equals the available.
In order to transmit this 300kb file, 600 512 byte pbufs are used, and I have 64 total. It will occasionally succeed and typically gets to about 95% transfer. It is very repeatable though always ending at a different percentage complete. I'm sure there's a race condition somewhere but have not found it yet.
Has anyone found this yet?
-Ken