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

process::loop does not guarantee stack overflow prevention.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Accepted
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: libprocess
    • Labels:
      None

      Description

      One of the goals of process::loop is to prevent stack overflows in the case that the callbacks are completing synchronously. However, it's still possible for process::loop to stack overflow if the body and iterate futures transition between the checking of them being ready and the setting of the continuation callbacks. If the futures continuously transition in these windows, the stack will overflow.

      One way to fix this would be to provide an atomic set-callbacks-if-pending function on Future (e.g. bool setIfPending(...) that allows the caller to avoid accidentally invoking callbacks synchronously when setting the callbacks.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                bmahler Benjamin Mahler
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: