Skip to content

CI: combine ros2/rclcpp#3452 #3453 #3454 #3455 #3458 - #1

Open
mjcarroll wants to merge 25 commits into
rollingfrom
combined-leak-fixes
Open

mjcarroll wants to merge 25 commits into
rollingfrom
combined-leak-fixes

Conversation

@mjcarroll

Copy link
Copy Markdown
Owner

Combined branch used only to run ci.ros2.org on ros2#3452, ros2#3453, ros2#3454, ros2#3455 and ros2#3458 together. Not for merging.

mjcarroll and others added 21 commits November 23, 2026 23:25
…past tests (ros2#3430)

The steady clock counts from boot, and a negative time point cannot be stored in rclcpp::Time. Going back 1000 s therefore throws on hosts that have been up for less than that, e.g. fresh CI VMs. Go back 1 s instead.

Signed-off-by: Michael Carroll <mjcarroll.oss@gmail.com>
Service<ServiceT>::send_response now takes const ServiceT::Response &, and GenericService::send_response takes const SharedResponse &. The response is only forwarded to rcl_send_response, which now takes a const pointer. Existing callers passing non-const responses continue to compile.

Companion change for ros2/rmw#437, which makes rmw_send_response take a const void * ros_response. A response only needs to be read to be serialized and sent, so the pointer should be const, consistent with rmw_send_request.

Signed-off-by: Tomoya Fujita <fujita.tomoya@triorb.co.jp>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…entrant groups (ros2#3426)

Signed-off-by: Skyler Medeiros <skye@polymathrobotics.com>
Co-authored-by: Skyler Medeiros <skye@polymathrobotics.com>
…os2#3424)

* fix: look up timers in EventsCBGExecutor timer manager by ID instead of weak ptr

Signed-off-by: Skyler Medeiros <skye@polymathrobotics.com>

* test: wait until the node's default callback group is removed before readding

Signed-off-by: Skyler Medeiros <skye@polymathrobotics.com>

---------

Signed-off-by: Skyler Medeiros <skye@polymathrobotics.com>
Co-authored-by: Skyler Medeiros <skye@polymathrobotics.com>
`CallbacksContainerType` has been deprecated since
ros2#1947 (Iron) in favor of
`OnSetCallbacksHandleContainer`.

Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>
`TestNodeService` and `TestNodeTopics` passed `-r foo:=bar` without
`--ros-args`, so `foo:=bar` was only applied as a remap rule through
`rcl`'s deprecated support for remap rules outside of `--ros-args`.

Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>
These executables have been deprecated since
ros2#3134 (Lyrical), which said that
they would be removed in M-turtle, in favor of `component_container`
with the `--executor-type` and `--isolated` options.

Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>
`rclcpp::spin_some()` and `rclcpp::spin_all()` have been deprecated
since ros2#2848 (Lyrical), since they
create a new executor and add the node to it on every call. Use the
methods with the same names on an executor instead.

Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>
`MemoryStrategy` and `AllocatorMemoryStrategy` have been deprecated
since ros2#3136 (Lyrical), as the
executors do not use them anymore, with a note to remove them after
Lyrical. Also remove their tests, which were marked for removal after
Lyrical, and the `rclcpp.hpp` documentation entries for them and for
`rclcpp/memory_strategies.hpp`, which was already removed.

Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>
…them

test_on_new_event_callback installed callbacks capturing local atomics by reference on a publisher/subscription whose deadline events fire every few milliseconds on the middleware's thread. The counters were declared after the publisher and subscription, so they were destroyed first and the still-running callbacks wrote to dead stack memory (AddressSanitizer: stack-use-after-scope). Declare them before the entities.

Signed-off-by: Michael Carroll <mjcarroll.oss@gmail.com>
…ient

The introspection publisher stores a raw pointer to the clock's rcl handle and dereferences it when the service or client is finalized. Neither Service nor Client held a reference to the clock passed to configure_introspection(), so destroying the clock first (e.g. the node's clock when the node is destroyed before the service) left rcl_service_fini()/rcl_client_fini() reading freed memory. Found with AddressSanitizer.

Signed-off-by: Michael Carroll <mjcarroll.oss@gmail.com>
Tests that make rcl_names_and_types_fini(), rcutils_string_array_fini() or rcl_topic_endpoint_info_array_fini() fail leave the array allocated by the code under test unreleased, which LeakSanitizer reports. Have the replacement functions free the memory before returning the error.

Signed-off-by: Michael Carroll <mjcarroll.oss@gmail.com>
test_graph_listener, and the is_ready tests of the action client and generic client, initialize an rcl wait set by hand and never finalize it. construction_and_destruction_rcl_errors replaces rcl_action_client_fini() with a function that only returns an error, so the client is never finalized. Finalize the wait sets, and call the real rcl_action_client_fini() before injecting the error. Found with LeakSanitizer.

Signed-off-by: Michael Carroll <mjcarroll.oss@gmail.com>
…#3450)

Subscription callbacks taking a `std::shared_ptr` to a non-const
message were deprecated in ros2#2975
(Lyrical), but the `[[deprecated]]` function,
`AnySubscriptionCallback::set_deprecated()`, is only used inside rclcpp
headers. Downstream packages include these as system headers, and GCC
does not show warnings located in system headers, even if user code
triggered the template instantiation, so only Clang >= 18 shows the
warning.

Instead, add `[[deprecated]]` overloads of `create_subscription()` and
`create_generic_subscription()` (free functions and `Node` and
`LifecycleNode` member functions), constrained to the deprecated
callback signatures, so that the warning is located at the user's call.
Move the `create_generic_subscription()` implementation to
`rclcpp::detail` so that both overloads can use it, like
`create_subscription()`. Then remove `set_deprecated()` and the
`RCLCPP_AVOID_DEPRECATIONS_FOR_UNIT_TESTS` macro.

Since GCC users will only see the warning starting with Makoa, add TODOs
to remove these overloads and the support for these callback signatures
after Makoa.

Also update the `rclcpp_action` tests that used a deprecated callback.

Part of ros2#3176

Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>
…2#3457)

ros2#1598 defined it on Windows, along
with new uses of `std::allocator<void>`, whose explicit specialization
was deprecated in C++17. Since it is public, it silences all of MSVC's
C++17 deprecation warnings in every package that depends on `rclcpp`.

C++20, which Rolling now uses, removed that specialization.

Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>
Tests that replaced rcl_service_fini(), rcl_client_fini(), rcl_network_flow_endpoint_array_fini(), rcutils_string_map_fini(), rcl_lifecycle_transition_fini() and rcl_wait_set_fini() with a function that only returns an error never released the object, which LeakSanitizer reports. Use inject_on_return(), like the surrounding tests already do, so the real function runs before the error is injected.

Signed-off-by: Michael Carroll <mjcarroll.oss@gmail.com>
@mjcarroll

mjcarroll commented Nov 29, 2026 •

Copy link
Copy Markdown
Owner Author

CI for this PR, built together with ros2#3452, ros2#3453, ros2#3454, ros2#3455 and ros2#3458 on one branch (all five merge cleanly): https://ci.ros2.org/job/ci_launcher/21407

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

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

Successfully merging this pull request may close these issues.

4 participants