-
Notifications
You must be signed in to change notification settings - Fork 117
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
Using different typesupports on same node and topic ends in segfault #265
Comments
This only happens in fastrtps. |
Is there anyone from eProsima we can ping to take a look at this? |
Generally @richiware is our point of contact with eProsima. @richiware any thoughts about this issue? |
I will try to check it this week. |
I was not able to check it. We are working on the next release and I didn't have time. We have this issue tracked on our tracker system. We will address it at some point. Sorry. |
This is really a blocker for FastRTPS compatibility. So please consider working on a patch early in order to ensure a fix will be available in the upcoming release. |
Hi everybody, We have been taking a look into this and the problem is that in this case we are trying to register two different types (the C typesupport, and the CPP typesupport) with the same name in the same participant, and this behavior isn't allowed by Fast-RTPS. Once the participant registers one typesupport, it will always use that typesupport. So, when the application tries to write C data with the CPP typesupport registered, it will crash. We will discuss internally how to solve it, in the meantime, do you have any ideas? In any case, is ROS2 thought to use C and CPP typesupport mixed in the same application? |
Yes, in general we can have multiple different representations on the ROS side which all map to the same type for DDS. I am not sure if that N-to-1 mapping can happen within the |
Thank you @dirk-thomas |
Please see ros2/rcl_interfaces#61 for a workaround (passing |
Commenting that this appears to prevent a lifecycle node from subscribing to the backtrace
|
For anyone who is blocked on having their node subscribe to rosout when using rclcpp you can work around this issue by disabling logging to rosout on the node that you have subscribing to rosout. The example of how to do this using the ros1_bridge as an example is below. When using ros2 run: In your launch file when using ros2 launch:
|
So How are you supposed to write that as a Looking at ros2/launch_ros#52, |
Yes
No. First If you want to pass We could add an extra parameter in the constructor, called |
Won't
result in an extraneous
That looks non-ideal.
That would be great! |
This seems like a conversation that needs to be turned into an issue on roslaunch to support passing these kinds of parameters properly. |
Yes, that will exactly happen, and it's handled correctly in
FYI ros2/launch_ros#60. |
@richiware @JaimeMartin Another report about this problem: ros2/rcl_interfaces#86 Has there been any progress on resolving this issue? |
@dirk-thomas this issue was not prioritized sorry. I can assign resources to this as soon we finish the release of Fast RTPS for eloquent, scheduled for next week. |
@dirk-thomas I just created PR #342 which should solve this. Merry Xmas! 🎅 |
Pending merge of #342, and also a patch to remove a workaround/TODO in the ros1 bridge. |
Signed-off-by: Michel Hidalgo <[email protected]>
I rushed to merge #342... As you may see on ros2/ros1_bridge#233, tests are passing for So I took a deeper look at this patch, in the context of all I'm sorry for not providing this feedback earlier in the review process (and definitely before merging). Moreover, we did not see this issue in CI because |
Both typesupports should return the same max_serialized_size in this case, so I don't think the patch is broken for that use case. So for For |
I see. It's still slightly odd to ask for the serialization size to the "wrong" type support, but OK.
Precisely, yes.
That sounds reasonable to me. If I may, I think it'd also be desirable to not have multiple apparent ways to get typesupport (e.g. registering typesupport with a domain but not really using it later because there's no way to tell if it's the right one). @MiguelCompany do you think you can provide a patch in the near future? |
@hidmic I have it planned for next week. |
@MiguelCompany any news? |
Sorry for the delay. Last three weeks I've been busy with non-coding tasks. I have just open #350, which should fix this issue on |
Signed-off-by: Michel Hidalgo <[email protected]>
Hello folks, I am seeing a similar issue where I have a node subscribing to Please let me know if you need any more information. Best, |
@mjcarroll Can you please comment about the status of releasing #342 into Eloquent. It seems it has been marked for backporting since January? |
Bug report
Required Info:
Steps to reproduce issue
Create a node that registers to an already registered topic but with a different typesupport. If we assume that the node is using rosout log, and that rosout regsiters a publisher in the /rosout topic with C typesupport. You can subscribe to the /rosout topic with a CPP typesupport.
Expected behavior
Both registered publisher and subscribers should be able to publish and receive messages for the topic.
Actual behavior
The process exits with a segfault when receiving a message on the subscribed topic.
Additional information
Two different typesupports cannot be in the same topic at the same time.
This is due to the fact that rmw_fastrtps uses the same name to register both typesupports in the FastRTPS Domain. See code
Disambiguate with a different name (appending or prepending a string) is not possible because the name of the typesupport is directly related to the name of the topic. See code and fastrtps TopicData
Probably happening in other implementations.
The text was updated successfully, but these errors were encountered: