Skip to content

Commit

Permalink
Rename the test_{daemon,direct}.py tests. (#959)
Browse files Browse the repository at this point in the history
The reason for this is somewhat difficult to explain.

For many months now, we've had a regression in RHEL CI
where Python would have a segmentation fault during the
run of flake8 in the ros2cli package.  After a bunch of
local debugging, I found that there is some crash in
Fast-DDS teardown.  Specifically, sometimes it is attempting
to join on a thread where the backing memory has already
been erased somehow.  Despite a lot of debugging, and the
use of asan and valgrind, I have not been able to find
what is removing that memory before the join happens.

What does this have to do with flake8?  pytest runs all tests
within the same process, and in alphabetical order.  So it
turns out that the cleanup from the test_direct.py and test_daemon.py
tests was being delayed enough that the Python interpreter
garbage collector wouldn't actually delete it until flake8
started to run.

By rearranging things like this, we ensure that flake8 runs
before the daemon and the direct tests.  I want to emphasize
that this is a *workaround*; there is still a bug here somewhere.
But this should at least get RHEL back to green for now.

Signed-off-by: Chris Lalancette <[email protected]>
  • Loading branch information
clalancette authored Jan 2, 2025
1 parent 9f8e545 commit 01578e7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 0 deletions.
File renamed without changes.
File renamed without changes.

0 comments on commit 01578e7

Please sign in to comment.