PickNikRobotics / generate_parameter_library

Declarative ROS 2 Parameters
BSD 3-Clause "New" or "Revised" License
240 stars 45 forks source link

Build hangs in Dockerized Bitbucket CI with coverage flags #201

Closed fnivek closed 5 months ago

fnivek commented 5 months ago

My builds hang under some rather specific conditions:

Most of the time the error is a timeout after two hours but once I had an error of out of memory. Builds work just fine on my local machine and in the same container built in the CI pipeline, but not in bitbucket's CI pipeline. Any ideas what might be causing it, or ways to debug it?

CMake:

find_package(generate_parameter_library REQUIRED)
generate_parameter_library(<lib_name>_parameters src/params.yaml)
...
target_link_libraries(<lib_name> ... <lib_name>_parameters)

params.yaml:

<lib_name>:
  joints: {
    type: string_array,
    description: "List of joints.",
    read_only: true
  }
  frame_id: {
    type: string,
    description: "The frame id.",
    read_only: true
  }
  xx: {
    type: double,
    description: "The xx.",
    read_only: true,
    default_value: 1.0
  }

Build command: colcon build --cmake-args -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} --coverage" -DCMAKE_C_FLAGS="${CMAKE_C_FLAGS} --coverage"

fnivek commented 5 months ago

Looks like it wasn't so much this library that was the problem but its use of templates which significantly increased the memory requirements of the build pipeline and the build pipeline not having enough memory.