-
Notifications
You must be signed in to change notification settings - Fork 27
various parameter tests failing #264
Comments
I did some debugging after running across failures in the demos repo. See ros2/demos#337 (comment) for details. |
@dirk-thomas This issue seems build failed since , but build pass since |
A rebuild of the CI from ros2/demos#337 (testing I've triggered a fresh build on all platforms to see where we stand (OpenSplice only): |
Some updates about this issue. Connect to ros2/demos#337 . I can reproduce segment fault when I pass nothing to cmake build type. Download ros2.repos and vcs import src < ros2.repos $> colcon build --packages-up-to demo_nodes_cpp
$> ./build/demo_nodes_cpp/list_parameters
[INFO] [list_parameters]: Setting parameters...
Segmentation fault: 11 I make another clean environment to rebuild ros2 by passing CMAKE_BUILD_TYPE=RelWithDebInfo $> colcon build --cmake-args \ -DCMAKE_BUILD_TYPE=RelWithDebInfo --packages-up-to demo_nodes_cpp
$> ./build/demo_nodes_cpp/list_parameters
[INFO] [list_parameters]: Setting parameters...
[INFO] [list_parameters]: Listing parameters...
[INFO] [list_parameters]:
Parameter names:
bar
foo
foo.first
foo.second
Parameter prefixes:
foo It always happen on my macbook and my default compiler is clang. Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin I believe there's something with clang's optimization. |
Follow up my previous update, I write a server / client example.
If I use another .srv like lifecycle_msgs, no segment fault happen. |
So I think we just ran into this situation again with the rclcpp timesource test: https://ci.ros2.org/job/ci_osx/6892/testReport/(root)/rclcpp/test_time_source_gtest_missing_result/ While debugging locally I've only could get a traceback of this:
where the |
Hi @Karsten1987, this is interesting. Usually the _narrow just performs a downcast from an untyped DDS::DataWriter_ptr to in this case a rcl_interfaces::srv::dds_::Sample_SetParameters_Request_DataWriter, but I don't see where in your case the _narrow function you use is coming from. Could you show me the code of this _narrow function? Furthermore, it could be that the "datawriter" pointer is currently not holding a valid pointer anymore, causing the cast to fail, but it might also be possible that it represents an object of a different datatype than rcl_interfaces::srv::dds_::Sample_SetParameters_Request_DataWriter causing the cast to fail. Regards, |
@Karsten1987: I did some more research into this, and I see that the _narrow is inherited by the TemplateDataWriter class in rosidl_typesupport_opensplice/rosidl_typesupport_opensplice_cpp/resource/srv__type_support.cpp.em, which contains the infamous line 1066 in your gdb window. The problem here is that the _narrow function call is ambiguous: not only does the direct parent of TemplateDataWriter specify a static _narrow operation, but so do all other parent classes higher up in the inheritance hierarchy. Please note that the _narrow function is static, and not virtual. I don't know what the compiler will do when it picks an _narrow from its inheritance hierarchy here, since all _narrow operations differ only in the return type, which does not play a role in their name mangling schema. I could see how one compiler would make different choices than another compiler in this particular scenario. |
@e-hndrks I just did what you've proposed. However, it didn't change much the output.
Maybe it's just me wrongly interpreting lldb's output, but I am a bit confused why we had to change things in the opensplice typesupport c++ when the failing library in question is |
So basically, if I grep for $ ~/workspace/ros2/ros2_master/src/ros2/rosidl_typesupport_opensplice
➭ rg -i narrow
rosidl_typesupport_opensplice_cpp/resource/msg__type_support.cpp.em
226: @(__dds_msg_type_prefix)DataWriter::_narrow(topic_writer);
335: @(__dds_msg_type_prefix)DataReader::_narrow(topic_reader);
rosidl_typesupport_opensplice_c/resource/msg__type_support_c.cpp.em
351: @(__dds_msg_type_prefix)DataWriter::_narrow(topic_writer);
570: @(__dds_msg_type_prefix)DataReader::_narrow(topic_reader);
rosidl_typesupport_opensplice_cpp/resource/srv__type_support.cpp.em
101: @(__dds_sample_type_prefix)@(suffix)_DataReader::_narrow(datareader);
196: @(__dds_sample_type_prefix)@(suffix)_DataWriter::_narrow(datawriter); |
@Karsten1987 OK, thanks for looking into this. So the issue is not that that an ambiguous _narrow function is invoked. That leaves only two other options:
Please let me know the results of your findings. |
Closing since we no longer support OpenSplice in any active ROS 2 distribution. |
Since the transition to the IDL pipeline various parameter tests are failing - only with OpenSplice. See ros2/rosidl#346.
The text was updated successfully, but these errors were encountered: