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

Assertions that compare doubles with == can fail due to rounding issues and can crash the master.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • 0.23.0, 0.23.1, 0.24.0, 0.24.1
    • None
    • master
    • None

    Description

      mesos-0.23.0/src/common/resources.cpp has
      CHECK(result.cpus() == cpus() &&
      result.mem() == mem() &&
      result.disk() == disk() &&
      result.ports() == ports());
      at around line 869. Sometimes, rounding errors can trigger this check to fail because of the cpus() part. One should take the absolute value of the difference and compare with a small value to avoid this problem. The same problem could be true in various places, so far I have not yet checked.
      Seems to be present in all versions I checked. I could trigger this by asking for some resource value of cpus( *):0.2

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              neunhoef Max Neunhöffer
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: