Skip to content

Data race in CostmapSubscriber::costmapCallback() on costmap_received_ #6009

@Finder16

Description

@Finder16

Summary

A data race occurs in nav2_costmap_2d::CostmapSubscriber.

Affected Location

  • nav2_costmap_2d/src/costmap_subscriber.cpp:93

Observed Result

ThreadSanitizer reports a concurrent write in costmap_subscriber.cpp:93 and a read in getCostmap().

WARNING: ThreadSanitizer: data race                                                                                                                    
  Write of size 1 ...                                                                                                                                  
    -> nav2_costmap_2d::CostmapSubscriber::costmapCallback(...) .../costmap_subscriber.cpp:93                                                          
  Previous read of size 1 ...                                                                                                                          
    -> nav2_costmap_2d::CostmapSubscriber::getCostmap() .../costmap_subscriber.cpp:49                                                                  
SUMMARY: ThreadSanitizer: data race (...libnav2_costmap_2d_client.so+0xf2ce7)                                                                          

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