Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-6158

Docker executor uses callback capturing this which isn't dispatched/deferred

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Accepted
    • Major
    • Resolution: Unresolved
    • 1.0.0
    • None
    • docker

    Description

      Our custom clang-tidy checks identified the following use of this capture without dispatch / defer.

      src/docker/executor.cpp:396:38: warning: callback capturing this should be dispatched/deferred to a specific PID [mesos-this-capture]
            .after(DOCKER_INSPECT_TIMEOUT, [=](const Future<Nothing>&) {
                                           ^
      

      The issue here is that the stored callback modifies the member variable inspect, but is not tied to the instance's lifetime. In general such access can lead to data races, or in more extreme cases cause the callback to work on already cleaned up memory.

      Attachments

        Activity

          People

            Unassigned Unassigned
            bbannier Benjamin Bannier
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: