Skip to content

test_ros2trace tests hang on nightly Linux jobs #166

@christophebedard

Description

@christophebedard

Operating System:

Latest Linux (Ubuntu + RHEL) target platforms

ROS version or commit hash:

Latest Rolling from source + Kilted (osrf/buildfarm-tools#183 (comment))

RMW implementation (if applicable):

(not directly involved in this)

RMW Configuration (if applicable):

No response

Client library (if applicable):

(not directly involved in this)

'ros2 doctor --report' output

N/A

Steps to reproduce issue

This can't really be reproduced locally, but it's been happening regularly in nightly Linux CI jobs:

  1. https://ci.ros2.org/job/nightly_linux-rhel_release/2237/
  2. https://ci.ros2.org/job/nightly_linux_debug/3391/
  3. https://ci.ros2.org/job/nightly_linux-aarch64_release/3069/
  4. https://ci.ros2.org/job/nightly_linux_release/3430/
  5. https://ci.ros2.org/job/nightly_linux_repeated/3799/

Note that tests are run in parallel here.

Expected behavior

Tests pass or time out after a reasonable amount of time.

Actual behavior

test_ros2trace tests hang and never time out. There is no test result ("The test invocation failed without generating a result file.").

Additional information

CLI test flakiness or hanging is definitely not something we've never seen. However, these specific tests could probably be improved.

It's hard to say where the tests are hanging. However, they do wait for a certain output here:

# If needed, wait until tracing has started by waiting until 'ros2 trace' is ready to stop
if wait_for_start:
assert process.stdout
stdout = ''
while 'press enter to stop...' not in stdout:
stdout += process.stdout.read(1)

We should look into other, more reliable ways to wait until ros2 trace has started tracing.

Overall, though, we could start by adding a timeout.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions