Skip to content

colcon parallel build race condition #35

@balthasarschuess

Description

@balthasarschuess

In our build pipeline we encountered a race condition when building multiple rust projects with multiple build jobs enabled.

The setup was similar to the following:

  • A is a rust project built through colcon-ros-cargo
  • B is a ros package like std_msgs which message definitions are generated for.
  • C is a rust project built through colcon-ros-cargo and depends on A and B

The build was triggered with colcon build --packages-up-to C.
It would fail if:

  • Job 1 would start building B first and register itself to config.toml
  • Job 2 would start building A, cargo ament build would discover package B in config.toml, try to look for the Cargo.toml, but this was not generated by Job 1 yet and the build fails.

I think this can be avoided in two ways:

  • modify config.toml on successful subpackage build
  • cargo ament-build ignores entries in config.toml that it does not depend on

So this might not be the correct repository to report this for.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions