Skip to content

Deadlock when a static layer gets map updated #3109

@daisukes

Description

@daisukes

I found a deadlock bug when I tested our new prototype, which frequently updates the static costmap.

Bug report

Required Info:

  • Operating System:
    • Ubuntu20.04
  • ROS2 Version:
    • Galactic (ros:galactic docker image)
  • Version or commit hash:
    • Galactic sync 2-based (a25cd43) custom build
  • DDS implementation:
    • default (cyclone dds)

Steps to reproduce issue

  • frequently update the static costmap (2hz)

Expected behavior

  • no deadlock

Actual behavior

Additional information

Implementation considerations

The mutex of the static layer should be unlocked before calling resizeMap of the layered costmap
https://github.com/ros-planning/navigation2/blob/6a9508b772eb6f07cbfd350b3578aa9de2567d59/nav2_costmap_2d/plugins/static_layer.cpp#L194-L198

I think this lock can be removed. What do you think?
https://github.com/ros-planning/navigation2/blob/6a9508b772eb6f07cbfd350b3578aa9de2567d59/nav2_costmap_2d/plugins/static_layer.cpp#L272

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions