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

process::loop does not guarantee stack overflow prevention.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Accepted
    • Major
    • Resolution: Unresolved
    • None
    • None
    • libprocess
    • 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

              Unassigned Unassigned
              bmahler Benjamin Mahler
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: