lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] How to avoid lwIP v2.1.2 udp send stuck when data is co


From: Lan Yang
Subject: Re: [lwip-users] How to avoid lwIP v2.1.2 udp send stuck when data is coming in faster than it is going out
Date: Fri, 16 Sep 2022 20:58:35 +0800

Hi Сергей Борщ,


I would like to explain my situation clearer. 

In the function udp_client_send() defined by me, I used mutex.

I called the udp_client_send() function separately in two threads in my RTOS.
Thread A runs every 1ms and calls the udp_client_send() function 100 times per run.
Thread A runs every 1s and calls the udp_client_send() function 100 times per run.
The length of data sent by UDP is 5000 bytes.

Because of the mutex, the program will only pbuf_alloc a new pbuf when the last pbuf is free.

The program is still stuck though I used mutex to make sure only one pbuf is allocated at one time.
The"assert stuck line: p!=NULL" is inside the pbuf_free() function.
You can see the assert line at this link:
https://github.com/RT-Thread/rt-thread/blob/a0ca06b4994d7c4a423b03f272c2c2a86a7bd07f/components/net/lwip/lwip-2.1.2/src/core/pbuf.c#L732
 
So the num of pbuf is enough, as I only used one pbuf at one udp_send(). 

Now I just don't know how this stuck problem is triggered, and I don't know how to solve it.
Do you have any new guesses or directions for experimentation?


С уважением,
Lan




CONFIDENTIALITY NOTICE: The contents of this email and any attachments are intended solely for the addressee(s) and contain confidential and/or privileged information and are legally protected from disclosure unless otherwise indicated. If you received this message by mistake, please immediately alert the sender by reply email and then delete this message and any attachments. If you are not the intended recipient, you are hereby notified that any use, dissemination, copying, or storage of this message or its attachments is strictly prohibited.  

reply via email to

[Prev in Thread] Current Thread [Next in Thread]