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

Libprocess timers with long durations trigger immediately

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • None
    • 1.5.0
    • libprocess
    • Mesosphere Sprint 58, Mesosphere Sprint 59, Mesosphere Sprint 60, Mesosphere Sprint 61
    • 3

    Description

      process::delay() will schedule a method to be run right ahead when called with a veeeery long Duration.

      This happens because Timeout tries to add two long durations, leading to an integer overflow in Duration.

      I'd expect libprocess to either:

      1. Never run the method.
      2. Schedule it in the longest possible Duration.

      Duration::operator+=() should probably also handle integer overflows differently. If an addition leads to an integer overflow, it might make more sense to return Duration::max() than a negative duration.

      Attachments

        Issue Links

          Activity

            People

              gkleiman Gastón Kleiman
              gkleiman Gastón Kleiman
              Greg Mann Greg Mann
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: