Failing test in CI: test_rclcpp gtest_subscription__rmw_connextdds
@lobolanja is already working on this.
Since Feb 6, 2025.
Assessment
This issue has not been assessed yet.
Description
System Info
- OS
- Ubuntu 22.04
- Windows
- ROS version and installation type
- rolling/source
- RTI Connext DDS version and installation type
- Connext Pro 6.0.1
- RMW version or commit hash
- rolling branch (a6053be96c4cddf4cece95424a68fbb54373e705 as of this writing)
Bug Description
If you run the gtest_subscription__rmw_connextdds test from the test_rclcpp package with no load, it "always" passes. It also "always" seems to pass in CI. However, if you put load on the machine, it fails very often, maybe like 75% of the time.
Expected Behavior
The test always passes, even with a lot of load on the machine.
How to Reproduce
In terminal 1, put a lot of stress on the machine. In my case:
$ stress --cpu 16
In terminal 2, run the test:
$ colcon test --event-handlers console_direct+ --packages-select test_rclcpp --ctest-args -R gtest_subscription__rmw_connextdds
You may have to adjust the amount of stress on the machine, and you may have to run the test a few times, but it should fail fairly quickly.
Workarounds
Mark this test as xfail.
Additional context
This same test works fine on Fast-DDS (gtest_subscription__rmw_fastrtps_cpp) and Cyclone DDS (gtest_subscription__rmw_cyclonedds_cpp), even with load on the machine.
This has come up now because we are about to merge in https://github.com/ros2/rclcpp/pull/2142, which seems to exacerbate this problem. However, I can produce this completely with rolling packages as of today, so it is not the fault of that PR.
I did some additional debugging to try to track this down. When it fails, the executor is waiting for new data to come in via rmw_wait via a condition variable: https://github.com/ros2/rmw_connextdds/blob/a6053be96c4cddf4cece95424a68fbb54373e705/rmw_connextdds_common/src/common/rmw_impl_waitset_std.cpp#L579 . The failure occurs because the condition variable never wakes up and times out. In turn, this suggests that the condition variable is never triggered.
That condition variable should be triggered when new data comes in via the on_data_available callback in the subscriber: https://github.com/ros2/rmw_connextdds/blob/a6053be96c4cddf4cece95424a68fbb54373e705/rmw_connextdds_common/src/common/rmw_impl_waitset_std.cpp#L131 . I've verified that it is installed to the listener at https://github.com/ros2/rmw_connextdds/blob/a6053be96c4cddf4cece95424a68fbb54373e705/rmw_connextdds_common/src/common/rmw_impl_waitset_std.cpp#L630 .
Finally, I've verified that the publisher side is indeed writing the data out via DDS_DataWriter_write_untypedI in message (https://github.com/ros2/rmw_connextdds/blob/a6053be96c4cddf4cece95424a68fbb54373e705/rmw_connextdds_common/src/ndds/dds_api_ndds.cpp#L771) .
So as far as I can tell, those are all of the pieces necessary to get this working, and it does work sometimes. But under load, it seems to fail. I could use some advice on how to debug this further.
In the meantime, I'm going to propose a PR to mark that particular test as xfail so we can make progress on the other PRs.
- Dominant language
- C++
- Stars
- 68
- Forks
- 42
- Avg merge
- 9d 15h
- Merged PRs (30d)
- 2
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ros2/rmw_connextdds
-
🧑🌾 `ros2topic.pytest.missing_result` hangs in `test_cli[rmw_connextdds]` on aarch64 with `DISCParticipant` deserialize errorsPossibly taken @oliviadorenczrti claimed this 9 days ago. Open
ros2/rmw_connextdds#269 · 2 assignees ·
-
🧑🌾 `test_messages_c__rmw_connextdds` randomly hangs on Windows (missing_result)Possibly taken @fgallegosalido claimed this 17 days ago. Open
ros2/rmw_connextdds#268 · 1 assignee ·
-
Intermittent transform lookup failure after time reset in Connext nightly buildsPossibly taken @fgallegosalido claimed this 23 days ago. Open
ros2/rmw_connextdds#266 · 1 assignee ·
-
:farmer: Intermittent Windows failures in type description service and parameter events tests with Connext DDSMay be free again @fgallegosalido claimed this 36 days ago, and no pull request is open. Open
ros2/rmw_connextdds#263 · 1 comment · 1 assignee ·
-
`ros2 param list` does not workMay be free again @fgallegosalido claimed this 563 days ago, and no pull request is open. Openbug
ros2/rmw_connextdds#191 · 5 comments · 2 assignees ·
All issues in ros2/rmw_connextdds
Similar issues
-
arch-based bug niri
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
noctalia-dev/noctalia#5552 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
EchoTools/nevr-runtime#2912 ·
Maintainers usually reply within 1 day
-
area/docdb kind/failing-test priority/medium status/awaiting-triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
yugabyte/yugabyte-db#39462 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
meshtastic/firmware#12519 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day