eProsima / Fast-DDS

The most complete DDS - Proven: Plenty of success cases. Looking for commercial support? Contact info@eprosima.com
https://eprosima.com
Apache License 2.0
2.16k stars 765 forks source link

Memory leak in TCPChannelResource #4877

Open ulongcha opened 4 months ago

ulongcha commented 4 months ago

Is there an already existing issue for this?

Expected behavior

When TCPClient left domain, its tcpchannel in TCPServer should be removed.

Current behavior

When TCPClient match TCPServer, TCPServer's memory increase and will not decrease. image Use valgrind --tool=massif to generate a memory report also find increase memory in TCPChannelResource.

Steps to reproduce

Run DDSHelloWorldTCP demo with Server and Client, frequent start and stop Client.

Fast DDS version/commit

2.14.0

Platform/Architecture

Ubuntu Focal 20.04 amd64, Ubuntu Focal 20.04 arm64

Transport layer

TCPv4

Additional context

No response

XML configuration file

No response

Relevant log output

No response

Network traffic capture

No response

elianalf commented 4 months ago

Hi ulongcha, thanks for using Fast DDS.

This issue should be solved in Fast DDS 2.14.1, so you can try to upgrade to the new version. Let us know if the problem is solved.

ulongcha commented 4 months ago

Hi @elianalf I upgrade Fast DDS to 2.14.1, memory leak problem seems still exsist. Memory releated to TCP part still increases. image When I config TLS on TCP, the asio_ssl part also has memory leak. Maybe TCPChannel's resource not release correctly when Participant leave domain.

elianalf commented 4 months ago

Hi @ulongcha, Ok, we will have a look and try to reproduce the issue. We will come back with a feedback.