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

Unit test segfault #226

Closed
nnmm opened this issue Jul 14, 2022 · 4 comments
Closed

Unit test segfault #226

nnmm opened this issue Jul 14, 2022 · 4 comments
Assignees

Comments

@nnmm
Copy link
Contributor

nnmm commented Jul 14, 2022

To reproduce, set up an environment with a recent install of ROS 2 Rolling, run cargo test, note down the path of the test binary and run it several times, e.g.

until target/debug/deps/rclrs-786fb1931d2745ba; [ $? -eq 139 ]; do printf '.'; done
@nnmm
Copy link
Contributor Author

nnmm commented Jul 14, 2022

Backtrace:

#0  0x00007ff7b5e56b86 in eprosima::fastrtps::types::TypeIdentifier::operator=(eprosima::fastrtps::types::TypeIdentifier const&) () from /opt/ros/rolling/lib/libfastrtps.so.2.6
#1  0x00007ff7b5e8569b in ?? () from /opt/ros/rolling/lib/libfastrtps.so.2.6
#2  0x00007ff7b5e7f377 in register_builtin_annotations_types(eprosima::fastrtps::types::TypeObjectFactory*) () from /opt/ros/rolling/lib/libfastrtps.so.2.6
#3  0x00007ff7b5e74e63 in eprosima::fastrtps::types::TypeObjectFactory::get_instance() () from /opt/ros/rolling/lib/libfastrtps.so.2.6
#4  0x00007ff7b62c3e35 in rmw_fastrtps_shared_cpp::register_type_object(rosidl_message_type_support_t const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from /opt/ros/rolling/lib/librmw_fastrtps_shared_cpp.so
#5  0x00007ff7b631c88a in ?? () from /opt/ros/rolling/lib/librmw_fastrtps_cpp.so
#6  0x00007ff7b6309777 in ?? () from /opt/ros/rolling/lib/librmw_fastrtps_cpp.so
#7  0x00007ff7b6310800 in rmw_create_node () from /opt/ros/rolling/lib/librmw_fastrtps_cpp.so
#8  0x00007ff7b6e6687a in rcl_node_init () from /opt/ros/rolling/lib/librcl.so
#9  0x0000564a6e00eca5 in rclrs::node::builder::NodeBuilder::build (self=0x7ff7b4b70ad8) at src/node/builder.rs:257
#10 0x0000564a6e03da9c in rclrs::node::Node::new (context=0x7ff7b4b70b78, node_name="Bob") at src/node.rs:103

So, probably FastRTPS' fault.

@nnmm
Copy link
Contributor Author

nnmm commented Jul 14, 2022

@ros2-rust/dev We should see if we can find an upstream ticket for this and then close this.

@nnmm
Copy link
Contributor Author

nnmm commented Jul 14, 2022

Potentially related to eProsima/Fast-DDS#2635

@maspe36 maspe36 self-assigned this Mar 20, 2024
@maspe36
Copy link
Collaborator

maspe36 commented Oct 14, 2024

This was fixed with #386

TL;DR we added additional protection around rcl calls because it uses globals internally

@maspe36 maspe36 closed this as completed Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants