ros2 / sros2

tools to generate and distribute keys for SROS 2
Apache License 2.0
88 stars 43 forks source link

:farmer: sros2 test failure in windows: `test_generate_policy_no_nodes.test_generate_policy_no_nodes` #321

Open Crola1702 opened 1 month ago

Crola1702 commented 1 month ago

Bug report

Steps to reproduce issue

  1. Run a build in Windows nightly CI
  2. See test regressions appear

Additional information

Reference build:

Test regression:

Log output: ``` test_generate_policy_no_nodes.TestSROS2GeneratePolicyVerbWithNoNodes.test_generate_policy_no_nodes[rmw_fastrtps_cpp, True] failed test_generate_policy_no_nodes.TestSROS2GeneratePolicyVerbWithNoNodes.test_generate_policy_no_policy_file[rmw_fastrtps_cpp, True] failed ... FAIL: test_generate_policy_no_nodes.TestSROS2GeneratePolicyVerbWithNoNodes.test_generate_policy_no_policy_file[rmw_fastrtps_cpp, True] ----------------------------------------------------------- Exception: Launch stopped before the active tests finished. ---------------------------- Captured stdout call ----------------------------- Starting test run test_generate_policy_no_nodes[rmw_fastrtps_cpp, True] [INFO] [launch]: All log files can be found below C:\Users\ContainerAdministrator\.ros\log\2024-06-17-08-00-12-989365-72b9d2b249b9-8684 [INFO] [launch]: Default logging verbosity is set to INFO [INFO] [daemon-stop-29]: process started with pid [8124] [INFO] [daemon-stop-29]: process has finished cleanly [pid 8124] [INFO] [daemon-start-30]: process started with pid [9416] [daemon-start-30] C:\Python38\lib\subprocess.py:942: ResourceWarning: subprocess 7272 is still running [daemon-start-30] _warn("subprocess %s is still running" % self.pid, [daemon-start-30] ResourceWarning: Enable tracemalloc to get the object allocation traceback [daemon-start-30] sys:1: ResourceWarning: unclosed file <_io.FileIO name=4 mode='wb' closefd=True> [daemon-start-30] ResourceWarning: Enable tracemalloc to get the object allocation traceback [INFO] [daemon-start-30]: process has finished cleanly [pid 9416] [INFO] [ros2security-cli-31]: process started with pid [6160] [ros2security-cli-31] No nodes detected in the ROS graph. No policy file was generated. [ERROR] [ros2security-cli-31]: process has died [pid 6160, exit code 1, cmd 'ros2 security generate_policy C:\Users\ContainerAdministrator\AppData\Local\Temp\tmpmx6c92nb\test-policy.xml']. [INFO] [ros2security-cli-32]: process started with pid [8888] [ros2security-cli-32] usage: ros2 security generate_policy [-h] [--spin-time SPIN_TIME] [-s] [ros2security-cli-32] [--no-daemon] [ros2security-cli-32] POLICY_FILE_PATH [ros2security-cli-32] ros2 security generate_policy: error: the following arguments are required: POLICY_FILE_PATH [ERROR] [ros2security-cli-32]: process has died [pid 8888, exit code 2, cmd 'ros2 security generate_policy']. Starting test run test_generate_policy_no_nodes[rmw_fastrtps_cpp, False] [INFO] [launch]: All log files can be found below C:\Users\ContainerAdministrator\.ros\log\2024-06-17-08-00-12-989365-72b9d2b249b9-8684 [INFO] [launch]: Default logging verbosity is set to INFO [INFO] [daemon-stop-33]: process started with pid [11096] [INFO] [daemon-stop-33]: process has finished cleanly [pid 11096] [INFO] [ros2security-cli-34]: process started with pid [2180] [ros2security-cli-34] No nodes detected in the ROS graph. No policy file was generated. [ERROR] [ros2security-cli-34]: process has died [pid 2180, exit code 1, cmd 'ros2 security generate_policy C:\Users\ContainerAdministrator\AppData\Local\Temp\tmpy9z1x95i\test-policy.xml --no [INFO] [ros2security-cli-35]: process started with pid [8] [ros2security-cli-35] usage: ros2 security generate_policy [-h] [--spin-time SPIN_TIME] [-s] [ros2security-cli-35] [--no-daemon] [ros2security-cli-35] POLICY_FILE_PATH [ros2security-cli-35] ros2 security generate_policy: error: the following arguments are required: POLICY_FILE_PATH [ERROR] [ros2security-cli-35]: process has died [pid 8, exit code 2, cmd 'ros2 security generate_policy --no-daemon --spin-time 4.0']. ... =========================================================== FAIL: test_generate_policy_no_nodes.TestSROS2GeneratePolicyVerbWithNoNodes.test_generate_policy_no_nodes[rmw_fastrtps_cpp, True] ----------------------------------------------------------- Exception: Launch stopped before the active tests finished. ```

Flaky ratio (last 15 days):

job_name last_fail first_fail build_count failure_count failure_percentage
nightly_win_deb 2024-06-17 2024-06-04 15 9 60.0
nightly_win_rel 2024-06-14 2024-06-14 16 1 6.25
fujitatomoya commented 4 weeks ago

/assign @clalancette we have talked about this a bit in today's ROS 2 team meeting, the issue is not reproducible.

ahcorde commented 1 week ago

I increased the time to the policy generation https://github.com/ros2/sros2/pull/323