Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Probably memory leak while publishing ROS topic continuously #115

Closed
evshary opened this issue Feb 15, 2023 · 1 comment
Closed

[Bug] Probably memory leak while publishing ROS topic continuously #115

evshary opened this issue Feb 15, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@evshary
Copy link
Contributor

evshary commented Feb 15, 2023

Describe the bug

I ran the Autoware with AWSIM simulator, which they are in different domains and connected to each other with zenoh-bridge-dds.

 (domain 1)       (domain 1)              (domain 2)        (domain 2)
    AWSIM ---- (zenoh-bridge-dds) --- (zenoh-bridge-dds) --- Autoware

I found that memory usage was continuously increasing, and the zenoh-bridge-dds would crash.
Here is the video while memory usage increased

2023-02-15.zenoh-bridge-dds.memory.leak.Autoware.-.simplified.mp4

I guess the issue would happen while publishing data continuously.
To simplify the scenario, I ran two ROS nodes with zenoh-bridge-dds connected.
One of the nodes received image data from the camera and published it to another node.
I found that the same issue still happened.

To reproduce

  1. Open 1st terminal and publish image from camera: ROS_DOMAIN_ID=1 ros2 run image_tools cam2image
  2. Open 2nd terminal and subscribe image: ROS_DOMAIN_ID=2 ros2 run image_tools showimage
  3. Open 3rd terminal and run the bridge: ./target/release/zenoh-bridge-dds -d 1
  4. Open 4th terminal and run the bridge: ./target/release/zenoh-bridge-dds -d 2

Then using htop to observe the zenoh-bridge-dds memory usage.

System info

  • Platform: Ubuntu 20.04
  • ROS2 version: galactic
  • zenoh-bridge-dds version: f94ae61
@evshary evshary added the bug Something isn't working label Feb 15, 2023
@JEnoch
Copy link
Member

JEnoch commented Feb 28, 2023

After analysis, the leak occurs when a data is routed from Zenoh to DDS, calling dds_writecdr().
The bug is in cyclocut. Fix to come soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants