-
Notifications
You must be signed in to change notification settings - Fork 91
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
CycloneDDS hangs when the network interface switches to loopback #488
Comments
@eboasson, Could you please take a look at this issue and make a preliminary root cause analysis or maybe this is a known issue in the CycloneDDS? @amalnanavati When you mentioned
and
How did you do that? What commands did you use for that? |
I used the "Settings" application in the Ubuntu Desktop GUI. If I recall correctly, in |
I am not in a situation where I can try it out to check my hypothesis, but I think there's a pretty good chance it is the following. The default configuration (in 0.10.x, like ROS uses) uses several threads to process the incoming data, and there are two sockets (application data via unicast and same via multicast) that are handled by dedicated threads. Quite simply, they do a simple blocking read on the socket, only waking up when a packet arrives. When stopping, you have to make sure these threads wake up but there is no guarantee that they will, except when you send a packet to it — and so it does that itself. With the network interface turned off, I suspect this bit no longer works. For this hypothesis, there's a workaround: set If the above isn't correct, then I suspect it is caused by the more general problem of Cyclone not being good at dealing with changes to the network configuration for the network interfaces it uses. In principle it is straightforward (open/close some sockets when interfaces become available/disappear, update addresses advertised in discovery, update the addresses used for sending), but it is just not doing that yet. |
@amalnanavati does @eboasson's reply resolve this issue? 🧇 |
@sloretz unfortunately I won't have access to the machines I detected this bug on for the coming months. However, given that this only occurs in a rare scenario (ros2 daemon starts with ethernet, then ethernet disconnects), it is not a blocking bug for us. I mainly wanted to report it upstream to document it, especially in case others experience it. |
@eboasson I faced a similar issue and your suggestion worked. Are there any other consequences of setting |
Bug report
Required Info:
ros2cli
Steps to reproduce issue
ros2 daemon stop
).export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
ros2 topic list
(or any otherros2cli
command)ros2 topic list
(or any otherros2cli
command)ros2 topic list
(or any otherros2cli
command)Expected behavior
All of the
ros2cli
commands succeed.Actual behavior
The final
ros2cli
command hangs (I waited 30 secs before terminating it).Additional information
export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
) and it works as expected, which points to a bug in CycloneDDS.ros2 multicast receive
andros2 multicast send
. For the purpose of records, I've pasted the output ofifconfig
androute
below:The text was updated successfully, but these errors were encountered: