06-10-2018 05:54 AM
I am developing a simple sever, based on the sample echo server, running on one of the RPUs. I am now testing the stability of this server by sending random data buffers of random size (0-128 bytes), in high speed.
In this scenario, it doesn't take long for the program to crash. I found that it crashes when it tries to free an invalid pbuf pointer when calling to xemacif_input.
Also, increasing the following parameters (or maybe only one of them) seemingly solves the problem, or at least, it doesn't occur immediately:
This means that the problem is probably a matter of insufficient resources, but I would like to prevent the program from crashing without increasing the available memory, and for this matter I don't mind missing some incoming data or not being able momentarily to send data, in case I am out of memory.
Can someone help me solve this issue?
06-11-2018 02:52 AM
There is debug parameters that can be enabled in the LwIP settings. Can you enable these and these should indicate exactly what the issue is.
06-11-2018 03:51 AM
Yes, I'm aware of this option. The problem is that there far too many printouts, and along with a missing "\r" (line feed) in the lwip debug print, it makes them impossible to be understood.
Another thing, when I do set these parameters, the server stops listening at some point. That is, it continues its execution, but the accept callback isn't being invoked.