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

[Test Failure] rclcpp / test_client_common segmentaion fault #328

Closed
YuanYuYuan opened this issue Nov 20, 2024 · 8 comments
Closed

[Test Failure] rclcpp / test_client_common segmentaion fault #328

YuanYuYuan opened this issue Nov 20, 2024 · 8 comments
Assignees

Comments

@YuanYuYuan
Copy link
Contributor

Bug report

Required Info:

Steps to reproduce issue

  1. Download rclcpp ros2/rclcpp@e854bb2
  2. Build rclcpp
  3. Run the test with
RMW_IMPLEMENTATION=rmw_cyclonedds_cpp /workspace/build/rclcpp/test/rclcpp/test_client_common
Running main() from /opt/ros/rolling/src/gtest_vendor/src/gtest_main.cc
[==========] Running 26 tests from 2 test suites.
[----------] Global test environment set-up.
[----------] 13 tests from TestAllClientTypesWithServer/Client, where TypeParam = rclcpp::Client<test_msgs::srv::Empty>
[ RUN      ] TestAllClientTypesWithServer/Client.async_send_request
[       OK ] TestAllClientTypesWithServer/Client.async_send_request (10 ms)
[ RUN      ] TestAllClientTypesWithServer/Client.test_client_remove_pending_request
[       OK ] TestAllClientTypesWithServer/Client.test_client_remove_pending_request (4 ms)
[ RUN      ] TestAllClientTypesWithServer/Client.prune_requests_older_than_no_pruned
[       OK ] TestAllClientTypesWithServer/Client.prune_requests_older_than_no_pruned (3 ms)
[ RUN      ] TestAllClientTypesWithServer/Client.prune_requests_older_than_with_pruned
[       OK ] TestAllClientTypesWithServer/Client.prune_requests_older_than_with_pruned (5 ms)
[ RUN      ] TestAllClientTypesWithServer/Client.async_send_request_rcl_send_request_error
[       OK ] TestAllClientTypesWithServer/Client.async_send_request_rcl_send_request_error (5 ms)
[ RUN      ] TestAllClientTypesWithServer/Client.async_send_request_rcl_service_server_is_available_error
[       OK ] TestAllClientTypesWithServer/Client.async_send_request_rcl_service_server_is_available_error (9 ms)
[ RUN      ] TestAllClientTypesWithServer/Client.take_response
[       OK ] TestAllClientTypesWithServer/Client.take_response (5 ms)
[ RUN      ] TestAllClientTypesWithServer/Client.on_new_response_callback
[       OK ] TestAllClientTypesWithServer/Client.on_new_response_callback (312 ms)
[ RUN      ] TestAllClientTypesWithServer/Client.client_qos
[       OK ] TestAllClientTypesWithServer/Client.client_qos (8 ms)
[ RUN      ] TestAllClientTypesWithServer/Client.rcl_client_request_publisher_get_actual_qos_error
[       OK ] TestAllClientTypesWithServer/Client.rcl_client_request_publisher_get_actual_qos_error (4 ms)
[ RUN      ] TestAllClientTypesWithServer/Client.rcl_client_response_subscription_get_actual_qos_error
[       OK ] TestAllClientTypesWithServer/Client.rcl_client_response_subscription_get_actual_qos_error (7 ms)
[ RUN      ] TestAllClientTypesWithServer/Client.async_send_request_callback_with_request
[       OK ] TestAllClientTypesWithServer/Client.async_send_request_callback_with_request (6 ms)
[ RUN      ] TestAllClientTypesWithServer/Client.qos_depth
[       OK ] TestAllClientTypesWithServer/Client.qos_depth (68 ms)
[----------] 13 tests from TestAllClientTypesWithServer/Client (451 ms total)

[----------] 13 tests from TestAllClientTypesWithServer/GenericClient, where TypeParam = rclcpp::GenericClient
[ RUN      ] TestAllClientTypesWithServer/GenericClient.async_send_request
[       OK ] TestAllClientTypesWithServer/GenericClient.async_send_request (9 ms)
[ RUN      ] TestAllClientTypesWithServer/GenericClient.test_client_remove_pending_request
[       OK ] TestAllClientTypesWithServer/GenericClient.test_client_remove_pending_request (6 ms)
[ RUN      ] TestAllClientTypesWithServer/GenericClient.prune_requests_older_than_no_pruned
[1]    479 segmentation fault (core dumped)  RMW_IMPLEMENTATION=rmw_cyclonedds_cpp

The test fails either with cyclonedds or fastrtps.

  • GDB backtrace
(gdb) bt
#0  0x00005603b2faf77c in std::_Function_base::~_Function_base (this=0x5603bcf4e558, __in_chrg=<optimized out>) at /usr/include/c++/13/bits/std_function.h:244
ros2/rclcpp#1  0x00005603b3011b80 in std::function<void (std::shared_future<std::shared_ptr<void> >)>::~function() (this=0x5603bcf4e558, __in_chrg=<optimized out>)
    at /usr/include/c++/13/bits/std_function.h:334
ros2/rclcpp#2  0x00005603b3011ba0 in std::_Head_base<0ul, std::function<void (std::shared_future<std::shared_ptr<void> >)>, false>::~_Head_base() (this=0x5603bcf4e558,
    __in_chrg=<optimized out>) at /usr/include/c++/13/tuple:188
ros2/rclcpp#3  0x00005603b3011bc4 in std::_Tuple_impl<0ul, std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > >::~_Tuple_impl() (this=0x5603bcf4e530, __in_chrg=<optimized out>) at /usr/include/c++/13/tuple:259
ros2/rclcpp#4  0x00005603b3011bf0 in std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > >::~tuple() (this=0x5603bcf4e530, __in_chrg=<optimized out>) at /usr/include/c++/13/tuple:746
ros2/rclcpp#5  0x00005603b3011c0f in std::_Destroy<std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > >(std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > >*) (__pointer=0x5603bcf4e530) at /usr/include/c++/13/bits/stl_construct.h:151
ros2/rclcpp#6  0x00005603b3011330 in std::__detail::__variant::_Variant_storage<false, std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > >::_M_reset()::{lambda(auto:1&&)#1}::operator()<std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > >&>(std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > >&) (__closure=0x7ffd46461517,
    __this_mem=std::tuple containing = {...}) at /usr/include/c++/13/variant:498
ros2/rclcpp#7  0x00005603b30124a5 in std::__invoke_impl<void, std::__detail::__variant::_Variant_storage<false, std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > >::_M_reset()::{lambda(auto:1&&)#1}, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > >&>(std::__invoke_other, std::__detail::__variant::_Variant_storage<false, std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > >::_M_reset()::{lambda(auto:1&&)#1}&&, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > >&) (__f=...) at /usr/include/c++/13/bits/invoke.h:61
ros2/rclcpp#8  0x00005603b3011c4d in std::__invoke_r<void, std::__detail::__variant::_Variant_storage<false, std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > >::_M_reset()::{lambda(auto:1&&)#1}, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > >&>(std::__detail::__variant::_Variant_storage<false, std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > >::_M_reset()::{lambda(auto:1&&)#1}&&, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > >&) (__fn=...) at /usr/include/c++/13/bits/invoke.h:111
ros2/rclcpp#9  0x00005603b3011376 in std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<void (*)(std::__detail::__variant::_Variant_storage<false, std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > >::_M_reset()::{lambda(auto:1&&)#1}&&, std::variant<std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > >&)>, std::integer_sequence<unsigned long, 1ul> >::__visit_invoke(std::__detail::__variant::_Variant_storage<false, std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > >::_M_reset()::{lambda(auto:1&&)#1}&&, std::variant<std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > >&) (__visitor=...,
    __vars#0=std::variant [no contained value]) at /usr/include/c++/13/variant:1064
ros2/rclcpp#10 0x00005603b3011408 in std::__do_visit<void, std::__detail::__variant::_Variant_storage<false, std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > >::_M_reset()::{lambda(auto:1&&)#1}, std::variant<std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > >&>(std::__detail::__variant::_Variant_storage<false, std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > >::_M_reset()::{lambda(auto:1&&)#1}&&, std::variant<std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > >&) (__visitor=...) at /usr/include/c++/13/variant:1816
ros2/rclcpp#11 0x00005603b301149a in std::__detail::__variant::_Variant_storage<false, std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > >::_M_reset() (this=0x5603bcf4e530) at /usr/include/c++/13/variant:496
--Type <RET> for more, q to quit, c to continue without paging--
ros2/rclcpp#12 0x00005603b3010b8c in std::__detail::__variant::_Variant_storage<false, std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > >::~_Variant_storage() (this=0x5603bcf4e530, __in_chrg=<optimized out>)
    at /usr/include/c++/13/variant:506
ros2/rclcpp#13 0x00005603b300fef0 in std::__detail::__variant::_Copy_ctor_base<false, std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > >::~_Copy_ctor_base() (this=0x5603bcf4e530, __in_chrg=<optimized out>)
    at /usr/include/c++/13/variant:581
ros2/rclcpp#14 0x00005603b300ff10 in std::__detail::__variant::_Move_ctor_base<false, std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > >::~_Move_ctor_base() (this=0x5603bcf4e530, __in_chrg=<optimized out>)
    at /usr/include/c++/13/variant:618
ros2/rclcpp#15 0x00005603b300ff30 in std::__detail::__variant::_Copy_assign_base<false, std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > >::~_Copy_assign_base() (this=0x5603bcf4e530, __in_chrg=<optimized out>)
    at /usr/include/c++/13/variant:656
ros2/rclcpp#16 0x00005603b300ff50 in std::__detail::__variant::_Move_assign_base<false, std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > >::~_Move_assign_base() (this=0x5603bcf4e530, __in_chrg=<optimized out>)
    at /usr/include/c++/13/variant:708
ros2/rclcpp#17 0x00005603b300ff70 in std::__detail::__variant::_Variant_base<std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > >::~_Variant_base() (this=0x5603bcf4e530, __in_chrg=<optimized out>)
    at /usr/include/c++/13/variant:762
ros2/rclcpp#18 0x00005603b300ff90 in std::variant<std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > >::~variant() (this=0x5603bcf4e530, __in_chrg=<optimized out>) at /usr/include/c++/13/variant:1432
ros2/rclcpp#19 0x00005603b300ffb4 in std::pair<std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, std::variant<std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > > >::~pair() (this=0x5603bcf4e528, __in_chrg=<optimized out>) at /usr/include/c++/13/bits/stl_pair.h:187
ros2/rclcpp#20 0x00005603b300ffd8 in std::pair<long const, std::pair<std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, std::variant<std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > > > >::~pair() (this=0x5603bcf4e520, __in_chrg=<optimized out>) at /usr/include/c++/13/bits/stl_pair.h:187
ros2/rclcpp#21 0x00005603b300df3c in std::__new_allocator<std::_Rb_tree_node<std::pair<long const, std::pair<std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, std::variant<std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > > > > > >::destroy<std::pair<long const, std::pair<std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, std::variant<std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > > > > >(std::pair<long const, std::pair<std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, std::variant<std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > > > >*) (__p=0x5603bcf4e520,
    this=0x5603bd0f1ad8) at /usr/include/c++/13/bits/new_allocator.h:198
ros2/rclcpp#22 std::allocator_traits<std::allocator<std::_Rb_tree_node<std::pair<long const, std::pair<std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, std::variant<std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > > > > > > >::destroy<std::pair<long const, std::pair<std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, std::variant<std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > > > > >(std::allocator<std::_Rb_tree_node<std::pair<long const, std::pair<std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, std::variant<std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > > > > > >&, std::pair<long const, std::pair<std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, std::variant<std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > > > >*) (__p=0x5603bcf4e520, __a=...) at /usr/include/c++/13/bits/alloc_traits.h:558
ros2/rclcpp#23 std::_Rb_tree<long, std::pair<long const, std::pair<std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, std::variant<std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std--Type <RET> for more, q to quit, c to continue without paging--
::promise<std::shared_ptr<void> > > > > >, std::_Select1st<std::pair<long const, std::pair<std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, std::variant<std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > > > > >, std::less<long>, std::allocator<std::pair<long const, std::pair<std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, std::variant<std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > > > > > >::_M_destroy_node(std::_Rb_tree_node<std::pair<long const, std::pair<std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, std::variant<std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > > > > >*) (this=0x5603bd0f1ad8, __p=0x5603bcf4e500) at /usr/include/c++/13/bits/stl_tree.h:625
ros2/rclcpp#24 0x00005603b300d1ff in std::_Rb_tree<long, std::pair<long const, std::pair<std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, std::variant<std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > > > >, std::_Select1st<std::pair<long const, std::pair<std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, std::variant<std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > > > > >, std::less<long>, std::allocator<std::pair<long const, std::pair<std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, std::variant<std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > > > > > >::_M_drop_node(std::_Rb_tree_node<std::pair<long const, std::pair<std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, std::variant<std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > > > > >*) (this=0x5603bd0f1ad8, __p=0x5603bcf4e500) at /usr/include/c++/13/bits/stl_tree.h:633
ros2/rclcpp#25 0x00005603b300b3f8 in std::_Rb_tree<long, std::pair<long const, std::pair<std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, std::variant<std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > > > >, std::_Select1st<std::pair<long const, std::pair<std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, std::variant<std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > > > > >, std::less<long>, std::allocator<std::pair<long const, std::pair<std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, std::variant<std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > > > > > >::_M_erase_aux(std::_Rb_tree_const_iterator<std::pair<long const, std::pair<std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, std::variant<std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > > > > >) (this=0x5603bd0f1ad8, __position={...}) at /usr/include/c++/13/bits/stl_tree.h:2496
ros2/rclcpp#26 0x00005603b300298c in std::_Rb_tree<long, std::pair<long const, std::pair<std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, std::variant<std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > > > >, std::_Select1st<std::pair<long const, std::pair<std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, std::variant<std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > > > > >, std::less<long>, std::allocator<std::pair<long const, std::pair<std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, std::variant<std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > > > > > >::erase[abi:cxx11](std::_Rb_tree_iterator<std::pair<long const, std::pair<std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, std::variant<std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > > > > >) (this=0x5603bd0f1ad8, __position={...}) at /usr/include/c++/13/bits/stl_tree.h:1210
ros2/rclcpp#27 0x00005603b2ffbc7f in std::map<long, std::pair<std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, std::variant<std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > > >, std::less<long>, std::allocator<std::pair<long const, std::pair<std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, std::variant<std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > > > > > >::erase[abi:cxx11](std::_Rb_tree_iterator<std::pair<long const, std::pair<std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, std::variant<std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > > > > >) (
    this=0x5603bd0f1ad8, __position={...}) at /usr/include/c++/13/bits/stl_map.h:1088
--Type <RET> for more, q to quit, c to continue without paging--
ros2/rclcpp#28 0x00005603b2ff540c in rclcpp::detail::prune_requests_older_than_impl<std::map<long, std::pair<std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, std::variant<std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > > >, std::less<long>, std::allocator<std::pair<long const, std::pair<std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, std::variant<std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > > > > > >, std::allocator<long> >(std::map<long, std::pair<std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, std::variant<std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > > >, std::less<long>, std::allocator<std::pair<long const, std::pair<std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, std::variant<std::promise<std::shared_ptr<void> >, std::tuple<std::function<void (std::shared_future<std::shared_ptr<void> >)>, std::shared_future<std::shared_ptr<void> >, std::promise<std::shared_ptr<void> > > > > > > >&, std::mutex&, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, std::vector<long, std::allocator<long> >*) (pending_requests=std::map with 1 element = {...}, pending_requests_mutex=...,
    time_point=std::chrono::sys_time = { 1732111090907666181ns [2024-11-20 13:58:10] }, pruned_requests=0x0) at /workspace/src/rclcpp/rclcpp/include/rclcpp/client.hpp:126
ros2/rclcpp#29 0x00005603b2ff0515 in rclcpp::GenericClient::prune_requests_older_than<std::allocator<long> > (this=0x5603bd0f1a20,
    time_point=std::chrono::sys_time = { 1732111090907666181ns [2024-11-20 13:58:10] }, pruned_requests=0x0)
    at /workspace/src/rclcpp/rclcpp/include/rclcpp/generic_client.hpp:201
ros2/rclcpp#30 0x00005603b2fe00cd in TestAllClientTypesWithServer_prune_requests_older_than_no_pruned_Test<rclcpp::GenericClient>::TestBody (this=0x5603bd06cd40)
    at /workspace/src/rclcpp/rclcpp/test/rclcpp/test_client_common.cpp:236
ros2/rclcpp#31 0x00005603b3057c81 in testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void> (object=0x5603bd06cd40, method=&virtual testing::Test::TestBody(),
    location=0x5603b3078bfb "the test body") at /opt/ros/rolling/src/gtest_vendor/./src/gtest.cc:2612
ros2/rclcpp#32 0x00005603b304fd51 in testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void> (object=0x5603bd06cd40, method=&virtual testing::Test::TestBody(),
    location=0x5603b3078bfb "the test body") at /opt/ros/rolling/src/gtest_vendor/./src/gtest.cc:2648
ros2/rclcpp#33 0x00005603b302805e in testing::Test::Run (this=0x5603bd06cd40) at /opt/ros/rolling/src/gtest_vendor/./src/gtest.cc:2687
ros2/rclcpp#34 0x00005603b3028c2f in testing::TestInfo::Run (this=0x5603bcacf0b0) at /opt/ros/rolling/src/gtest_vendor/./src/gtest.cc:2836
ros2/rclcpp#35 0x00005603b30296a8 in testing::TestSuite::Run (this=0x5603bcace790) at /opt/ros/rolling/src/gtest_vendor/./src/gtest.cc:3015
ros2/rclcpp#36 0x00005603b303a82c in testing::internal::UnitTestImpl::RunAllTests (this=0x5603bcace140) at /opt/ros/rolling/src/gtest_vendor/./src/gtest.cc:5920
ros2/rclcpp#37 0x00005603b3058fa0 in testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> (object=0x5603bcace140,
    method=(bool (testing::internal::UnitTestImpl::*)(testing::internal::UnitTestImpl * const)) 0x5603b303a3f8 <testing::internal::UnitTestImpl::RunAllTests()>,
    location=0x5603b3079648 "auxiliary test code (environments or event listeners)") at /opt/ros/rolling/src/gtest_vendor/./src/gtest.cc:2612
ros2/rclcpp#38 0x00005603b30512ad in testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> (object=0x5603bcace140,
    method=(bool (testing::internal::UnitTestImpl::*)(testing::internal::UnitTestImpl * const)) 0x5603b303a3f8 <testing::internal::UnitTestImpl::RunAllTests()>,
    location=0x5603b3079648 "auxiliary test code (environments or event listeners)") at /opt/ros/rolling/src/gtest_vendor/./src/gtest.cc:2648
ros2/rclcpp#39 0x00005603b3038c5f in testing::UnitTest::Run (this=0x5603b30ce700 <testing::UnitTest::GetInstance()::instance>) at /opt/ros/rolling/src/gtest_vendor/./src/gtest.cc:5484
ros2/rclcpp#40 0x00005603b3013459 in RUN_ALL_TESTS () at /opt/ros/rolling/src/gtest_vendor/include/gtest/gtest.h:2317
ros2/rclcpp#41 0x00005603b3013441 in main (argc=1, argv=0x7ffd46461e98) at /opt/ros/rolling/src/gtest_vendor/src/gtest_main.cc:64
@clalancette
Copy link
Collaborator

I'm not sure, but this may be a case where we just have to do releases into Rolling. The reason I think that is that in our from-source builds last night at https://ci.ros2.org/view/nightly/ , we didn't see this failure. I'll leave this open for now and do a round of Rolling releases in the next couple of days.

@YuanYuYuan
Copy link
Contributor Author

I'm not sure, but this may be a case where we just have to do releases into Rolling. The reason I think that is that in our from-source builds last night at https://ci.ros2.org/view/nightly/ , we didn't see this failure. I'll leave this open for now and do a round of Rolling releases in the next couple of days.

I see. I've updated the docker to the latest one and also tested this with rclcpp buit from latest rcl and rclcpp. But the error is still there. Let's wait until the next release.

@clalancette
Copy link
Collaborator

I just tried rebuilding again locally, and I'm unable to reproduce this with any of rmw_fastrtps_cpp, rmw_cyclonedds_cpp, or rmw_connextdds.

However, I am able to reproduce this sometimes with rmw_zenoh_cpp, on both the rolling branch and the dev/1.0.0 branch. This needs further investigation.

@clalancette
Copy link
Collaborator

All right, this is a bug in rmw_zenoh_cpp. See #320, which should fix it, at least on the rolling branch.

@YuanYuYuan YuanYuYuan changed the title Segmentaion fault with test_client_common [Test Failure] Segmentaion fault with test_client_common Nov 21, 2024
@YuanYuYuan
Copy link
Contributor Author

Hi @clalancette! Can you help transfer this issue back to ros2/rmw_zenoh? I found that this one is router-status-dependent.

Procedure to reproduce it:

  1. Launch zenohd.
  2. Run rclcpp/test_executors or rclcpp/test_executor until we encounter an error.
  3. Run rclcpp/test_client_common. The test can fail consistently in this way.

@fujitatomoya fujitatomoya transferred this issue from ros2/rclcpp Dec 4, 2024
@fujitatomoya
Copy link

@YuanYuYuan done

@YuanYuYuan
Copy link
Contributor Author

@YuanYuYuan done

Thanks! @fujitatomoya

@YuanYuYuan YuanYuYuan changed the title [Test Failure] Segmentaion fault with test_client_common [Test Failure] rclcpp / test_client_common segmentaion fault Dec 4, 2024
@Yadunund
Copy link
Member

Closing as i'm unable to reproduce with the latest changes.

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

4 participants