Skip to content

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Feb 20, 2025

fixes #2678

@mjcarroll we should merge this ASAP and backport to jazzy, to keep the ABI breakage to one release


This is an automatic backport of pull request #2745 done by Mergify.

#2678 reported that the executor
was holding strong references to entities during execution. This commit
adds a regression test for this.

* fix(Executor): Don't hold strong references to entities during spin

This fixes a bug, were dropping an entity during a callback would
not prevent further callbacks. Note, there might still be a race
in the case of the mutithreaded executor.

Signed-off-by: Janosch Machowinski <[email protected]>
Co-authored-by: Janosch Machowinski <[email protected]>
(cherry picked from commit 9c493c4)
@mergify mergify bot mentioned this pull request Feb 20, 2025
@marcoag
Copy link
Contributor

marcoag commented Feb 20, 2025

Pulls: #2754
Gist: https://gist.githubusercontent.com/marcoag/e4e4b5e29e3db9e35e11de1ce24f48d6/raw/6ee32177c277a5e44bb177d22bfc568cfe505632/ros2.repos
BUILD args:
TEST args:
ROS Distro: Jazzy
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/15230

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

@jmachowinski
Copy link
Collaborator

I just reran the windows build and now it shows no errors :
https://ci.ros2.org/job/ci_windows/23378/

I don't really know what to make of this, I will check the failed test with valgrind.

@jmachowinski
Copy link
Collaborator

valgrind ./add_two_ints_client_async 
==760996== Memcheck, a memory error detector
==760996== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==760996== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==760996== Command: ./add_two_ints_client_async
==760996== 
[INFO] [1740134787.893492135] [add_two_ints_client]: Result of add_two_ints: 5
==760996== 
==760996== HEAP SUMMARY:
==760996==     in use at exit: 81,717 bytes in 192 blocks
==760996==   total heap usage: 30,207 allocs, 30,015 frees, 6,747,330 bytes allocated
==760996== 
==760996== LEAK SUMMARY:
==760996==    definitely lost: 0 bytes in 0 blocks
==760996==    indirectly lost: 0 bytes in 0 blocks
==760996==      possibly lost: 736 bytes in 2 blocks
==760996==    still reachable: 80,981 bytes in 190 blocks
==760996==         suppressed: 0 bytes in 0 blocks
==760996== Rerun with --leak-check=full to see details of leaked memory
==760996== 
==760996== For lists of detected and suppressed errors, rerun with: -s
==760996== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

Valgrind shows no problems. I would say we can move ahead and say this was some fluke in the build pipeline.
@mjcarroll Whats your opinion ?

Copy link
Collaborator

@alsora alsora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CHanges look good and the windows failure seems unrelated / general flakiness.

@alsora alsora merged commit d24a317 into jazzy Feb 21, 2025
2 of 3 checks passed
@MichaelOrlov MichaelOrlov deleted the mergify/bp/jazzy/pr-2745 branch July 29, 2025 17:52
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