ros2 / rclcpp

rclcpp (ROS Client Library for C++)
Apache License 2.0
530 stars 412 forks source link

:farmer: TestServiceIntrospection.service_introspection_enable_disable_events failing in Rolling, Jazzy and Iron Connext #2613

Open Crola1702 opened 2 weeks ago

Crola1702 commented 2 weeks ago

Bug report

Required Info:

Steps to reproduce issue

  1. Run a build in Rci__nightly-connext_ubuntu_noble_amd64
  2. See test regression fail

Additional information

Reference build:

Log output:

[ RUN      ] TestServiceIntrospection.service_introspection_enable_disable_events
RTI Connext DDS Non-commercial license is for academic, research, evaluation and personal use only. USE FOR COMMERCIAL PURPOSES IS PROHIBITED. See RTI_LICENSE.TXT for terms. Download free tools at rti.com/ncl. License issued to Non-Commercial User license@rti.com For non-production use only.
Expires on 00-jan-00 See www.rti.com for more information.
/tmp/ws/src/ros2/rclcpp/rclcpp/test/rclcpp/test_service_introspection.cpp:201: Failure
Expected equality of these values:
  events.size()
    Which is: 1
  2U
    Which is: 2

/tmp/ws/src/ros2/rclcpp/rclcpp/test/rclcpp/test_service_introspection.cpp:218: Failure
Expected equality of these values:
  events.size()
    Which is: 3
  4U
    Which is: 4

[  FAILED  ] TestServiceIntrospection.service_introspection_enable_disable_events (3309 ms)
It's a flaky with a high percentage failure rate: job_name last_fail first_fail build_count failure_count failure_percentage
Ici__nightly-connext_ubuntu_jammy_amd64 2024-08-28 2024-08-14 6 4 66.67
Rci__nightly-connext_ubuntu_noble_amd64 2024-08-27 2024-08-14 12 11 91.67
Jci__nightly-connext_ubuntu_noble_amd64 2024-08-26 2024-08-13 6 5 83.33
fujitatomoya commented 2 weeks ago

i cannot reproduce this issue with my local environment.

root@tomoyafujita:~/ros2_ws/colcon_ws# RMW_IMPLEMENTATION=rmw_connextdds
root@tomoyafujita:~/ros2_ws/colcon_ws# colcon test --event-handlers console_direct+ --retest-until-fail 100 --packages-select rclcpp --ctest-args -R test_service_introspection
...
The following tests passed:
        test_service_introspection

100% tests passed, 0 tests failed out of 1

Label Time Summary:
gmock     =   1.24 sec*proc (1 test)
mimick    =   1.24 sec*proc (1 test)

Total Test time (real) = 125.27 sec
Finished <<< rclcpp [2min 6s]

Summary: 1 package finished [2min 7s]

according to the log information in the report, client events are okay as expected, but server side missing one event. and we can see at least one service event is received from service server, that means publisher and topic are created okay. it would be worth to try to extend the timeout from 1000msec to 3000msec, but i am not sure if that actually fixes the problem.

root cause of this issue seems like almost same with https://github.com/ros2/rclcpp/issues/2588#issuecomment-2259355642, that is dropping the messages (some messages are missing, but some are okay) using same publisher object.