-
Notifications
You must be signed in to change notification settings - Fork 2.1k
lwip: multiple sock_udp_send() return ENOMEM. (possible memory leak?) #12859
Description
Description
When making multiple sock_udp_send() calls, after n times, -12 (ENOMEM) is returned and sending fails. This happens both on target (nucleo-f207fg), and on native.
Also tried using mem_pools, but the behavior remained unchanged.
Issue is the same with IPv4 and IPv6 lwip.
GNRC does not show this behavior and works fine.
Steps to reproduce the issue
in test/lwip shell: udp send fe80::9333:621c:1f7c:96fd 80 5555 100 100000
(Or in own code: make a loop and call sock_udp_send())
Expected results
Ethernet frame with UDP payload "5555" sent 100 times to the specified IP.
Actual results
First n calls: successful, also show up in Wireshark (with n in [5, 20])
After that: "could not send" ( in example), or -12 (ENOMEM) returned from call (when calling it in own code)
Versions
OS: Ubuntu 19.10
native gcc: gcc (Ubuntu 9.2.1-9ubuntu2) 9.2.1 20191008
arm-none-eabi-gcc: arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 9-2019-q4-major) 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599]