Replies: 12 comments
-
How are you determining that there's a memory leak? Are you watching an application like What does your configuration file look like? Which discovery / transport are you using? |
Beta Was this translation helpful? Give feedback.
-
I utilize My configuration file look like this :
|
Beta Was this translation helpful? Give feedback.
-
FYI when I modify the configuration file to use shared memory I don't have memory leak
|
Beta Was this translation helpful? Give feedback.
-
Here is a project based on Messenger example with the same memory leak issue. |
Beta Was this translation helpful? Give feedback.
-
It sounds like this isn't exactly a true memory leak, but possibly some non-optimal storage for partially collected samples in the rtps_udp transport, specifically for larger sample sizes. I'm guessing that if you reduced your sample size or reduced the write frequency, this would be less of a problem? Unless you need RTPS for a particular reason (e.g. DDS interoperability or DDS security), you might be better off using the tcp (or shmem) transport for larger sample sizes for now. |
Beta Was this translation helpful? Give feedback.
-
@simpsont-oci Actually, we cannot really reduce the sample size, it's a RAW image. Maybe using the Messenger example to test this use case was not a good choice, did you check the project https://github.com/KelsOnFire/opendds-memory-leak? Thanks you help! |
Beta Was this translation helpful? Give feedback.
-
@simpsont-oci Unfortunately we can't reduce the sample size, as I said in my first post it's a RAW image. Is DDS not supposed to allow large data sample to be send in real-time ? If it is a problem with my code what can I do to fix the problem ? Have you tried the example of @KelsOnFire. I also have a memory leak on this project too. |
Beta Was this translation helpful? Give feedback.
-
@simpsont-oci I activate the option Can it be the issue ? If yes, how can I fix it ? The trace : The lines like below are from my code, they show me if I received a frame and the frame's number (frame_id). If the number don't follow one or more frames are lost.
|
Beta Was this translation helpful? Give feedback.
-
FYI, even with a empty on_data_available the memory continue to grow. |
Beta Was this translation helpful? Give feedback.
-
i meet this problem too, i use opendds to send pointcloud(about 3MByte) and 10Hz, and the publisher memory is grow, it seem that the pointcloud message's memory not release even if the message was received by subscriber. |
Beta Was this translation helpful? Give feedback.
-
i use the opendds's example to send my message, almost no any modified. |
Beta Was this translation helpful? Give feedback.
-
try not update the sample keyword, because sample with new keyword which send that will create new instance, and the new instance will load to memory grow up! |
Beta Was this translation helpful? Give feedback.
-
Hello,
I have two applications, the first one is a streamer which capture frames from a camera and send it to DDS, the second one is a subscriber application to the topic of the streamer. They both are executed on the same computer which is on Ubuntu 20.04.
The streamer application send a frame of 4.608.000 bytes (1920*1200 and 2 bytes for 1 pixel, this is a raw image) every 50ms to DDS.
I notice that I have some memory leaks on the subscriber application. It's as if the data received by the listener are not released after the function DataReaderListenerImple::on_data_available is finished. I modified the Messenger_zeroCopy example to test if I reproduce the memory leak on a example provided because I didn't find any clue on my part and I reproduce the memory leak.
Maybe this leak is from a incorrect implementation from me. Below is the code of my streamer and the DataReaderListenerImpl class from the Messenger_zeroCopy that I have modified. The subcriber.cpp file is also modified to follow the structure of my topic, but don't change drastically.
IDL :
Streamer
DataReaderListenerImpl.cpp
Beta Was this translation helpful? Give feedback.
All reactions