Comments (7)
Strange, I would certainly not have expected it to crash there. I can't recall ever having seen it call ddsrt_recvmsg
with "bad" addresses, and the memory should also definitely not be freed before that thread shuts down.
Is there a simple way to reproduce this that you know of?
from cyclonedds.
I could not reproduce with a simple code, but my code for an integration test on Gazebo often gets SIGSEGV at the exit.
https://github.com/CMU-cabot/cabot-navigation/blob/main/cabot_navigation2/test/run_test.py
from cyclonedds.
I could not reproduce with a simple code, but my code for an integration test on Gazebo often gets SIGSEGV at the exit.
https://github.com/CMU-cabot/cabot-navigation/blob/main/cabot_navigation2/test/run_test.py
I'll give it a try, with a bit of luck I can run that test locally and reproduce it that way.
from cyclonedds.
Hello @eboasson
I made some scripts to run the integration test. Please read README in the zip file.
I can run it on Ubuntu20.04, 32GB RAM, 12 core machine.
The code will run several docker containers and require a display (maybe works with virtual display)
from cyclonedds.
Hi @daisukes, that's really nice! 🙏
I tried yesterday by following the information in the cabot README, but to no avail: gazebo on aarch64 Ubuntu 22.04 doesn't even exist. Even if it had, it would anyway have had to run in qemu and no doubt run out of memory, disk space or CPU cycles. Now I know my old Intel box here at home also won't do.
That means the first real chance comes on Monday.
from cyclonedds.
Hi @daisukes, we (@PatrickM-ZS really) tried it out and can easily reproduce it, so that's great.
What we see is that the Python exit handling ends up closing the RMW implementation too early, so in the main thread of the program. It looks like Cyclone DDS is still active when the exit handlers call librmw_implementation.so
, which dlclose
s librmw_cyclonedds_cpp.so
and results in the unmapping (via munmap
) of the memory for that library and the Cyclone library (libddsc.so
). At that point, the memory containing the code that the thread that crashed is executing (and some of the data it uses) has been yanked from the address space and it crashes.
I'm pretty much certain this is not a bug in Cyclone or the Cyclone RMW layer but something in the Python (test) scripting that causes the ROS 2 nodes and other entities to not be cleaned up before this exit handlers kick in. I don't know Python well enough to know how you could get into that state, and I also haven't tried to find out yet. Perhaps you have an idea what to look for?
Note that it could be fairly trivially "solved" in the Cyclone RMW layer if can run some code just prior to unmapping the library: dds_delete(DDS_CYCLONEDDS_HANDLE)
will immediately delete all entities, stop all threads and deinitialize the Cyclone library. However, I think that goes directly against the philosophy behind rclcpp
, rcl
and rmw
, which seems to be that the application must delete all the entities it created from the leaf entities to the nodes/contexts.
from cyclonedds.
Thank you very much for your support!
I put rclpy's cleanup before exiting the test code, and it looks stable.
from cyclonedds.
Related Issues (20)
- Why an RTPS packet could contain multiple fragments in cyclonedds HOT 1
- Sharing RSO2 Topic communication between containers operating on two Windows host machines A and B, each equipped with Docker
- How to silence ddsi_log, such as from GVERROR HOT 1
- Some questions about "dds_stream_write_keyBE" HOT 2
- Failing tests on the releases/0.10.x on Ubuntu 24.04 HOT 4
- dds_domain_set_deafmute block the thread "tev" HOT 1
- Why does the GC thread need to keep activating the RECV thread in the deaf scene HOT 2
- Why does the gc thread need to keep activating the recv thread in the deaf scene. HOT 2
- How to use cyclonedds cdrstream HOT 7
- Custom Serializer HOT 1
- IDL relative includes HOT 2
- Provides compression and decompression technology for large data transfers
- Does using Iceoryx integration still require fixed size data type? HOT 2
- The communication problem between "linux" and "windows" HOT 5
- The program exits abnormally when using the @optional or @external annotations HOT 1
- New release of the 0.10.x branch (probably 0.10.5) HOT 3
- Can the subscriber distinguish the message come from? HOT 2
- Is it true that Iceoryx libs are not needed when running CycloneDDS applications built with Iceoryx? HOT 4
- 'ENTITYID_BUILTIN_PUBLICATIONS_WRITER' writer_sequence_number are not consecutive HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cyclonedds.