ros2 / rclpy

rclpy (ROS Client Library for Python)
Apache License 2.0
285 stars 224 forks source link

:farmer: Humble TestClient.test_service_timestamps failing consistently in Connext #1347

Open Crola1702 opened 3 weeks ago

Crola1702 commented 3 weeks ago

Bug report

Required Info:

Steps to reproduce issue

  1. Run a build in Hci__nightly-connext_ubuntu_jammy_amd64
  2. See rclpy test regression appear

Additional information

Reference build:

Test regressions:

Version of the first fail (Jul 26th build#258):

  ros2/rclpy:
    type: git
    url: https://github.com/ros2/rclpy.git
    version: 993b2b6d254a923503a049c14034cde07ebc750a

Log output:

../../src/ros2/rclpy/rclpy/test/test_client.py ..F...                    [100%]

=================================== FAILURES ===================================
______________________ TestClient.test_service_timestamps ______________________

self = <test.test_client.TestClient testMethod=test_service_timestamps>

    @unittest.skipIf(
        get_rmw_implementation_identifier() == 'rmw_connextdds' and platform.system() == 'Windows',
        reason='Source timestamp not implemented for Connext on Windows')
    def test_service_timestamps(self):
        cli = self.node.create_client(GetParameters, 'get/parameters')
        srv = self.node.create_service(
            GetParameters, 'get/parameters',
            lambda request, response: response)
        try:
            self.assertTrue(cli.wait_for_service(timeout_sec=20))
            cli.call_async(GetParameters.Request())
            for i in range(5):
                with srv.handle:
                    result = srv.handle.service_take_request(srv.srv_type.Request)
                if result is not None:
                    request, header = result
>                   self.assertTrue(header is not None)
E                   AssertionError: False is not true

../../src/ros2/rclpy/rclpy/test/test_client.py:110: AssertionError
fujitatomoya commented 2 weeks ago

This happened before with Connext https://github.com/ros2/rclpy/pull/818, but i cannot reproduce this problem on my local environment. what is the reproduction rate for this issue with nightly CI?

fujitatomoya commented 2 weeks ago

Sorry i did not use Connext DDS, with Connext i can now reproduce the issue with https://github.com/ros2/ros2/blob/humble/ros2.repos

fujitatomoya commented 2 weeks ago

srv.handle.service_take_request just takes the data from RMW implementation which is Connext in this case.

according the git history, nothing from rclpy, rmw_connextdds seems related to this behavior.

root@tomoyafujita:~/ros2_ws/humble_ws# dpkg -l rti-connext-dds-6.0.1
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                  Version      Architecture Description
+++-=====================-============-============-=============================================
ii  rti-connext-dds-6.0.1 6.0.1.25-1   amd64        real-time messaging and integration platform.

@trubio-rti any thoughts?

trubio-rti commented 2 weeks ago

@fujitatomoya Hi, I've taken a look but I can't make much out of this issue. I'm unfortunately not working on the Connext RMW any more, sorry. I've created an internal issue and notified my colleague who's now working in the project.

Crola1702 commented 1 week ago

@trubio-rti have you had any updates from your colleague? Can we link them to this issue?

fgallegosalido commented 6 days ago

Hi, I'm the new person working on Connext RMW. I will look into this as soon as I have some bandwith along with some more training.