cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
751 Views
Registered: ‎06-10-2018

lwip on Zynq Ultrascale ZCU102 - Crash due to invalid pbuf pointer on xemacif_input

Hi,

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:

  1. pbuf_pool_size
    from 256 to 8192
  2. tcp_send_buf
    from 8192 to 65535
  3.  memp_n_buf
    from 16 to 1024
  4. memp_n_tcp_seg
    from 256 to 1024

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?
Thanks,
Amon.

Tags (3)
0 Kudos
2 Replies
Highlighted
Moderator
Moderator
688 Views
Registered: ‎09-12-2007

Re: lwip on Zynq Ultrascale ZCU102 - Crash due to invalid pbuf pointer on xemacif_input

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.

0 Kudos
Highlighted
Visitor
Visitor
678 Views
Registered: ‎06-10-2018

Re: lwip on Zynq Ultrascale ZCU102 - Crash due to invalid pbuf pointer on xemacif_input

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.

0 Kudos