Max Neunhöffer created MESOS-3518:
-------------------------------------
Summary: Assertions that compare doubles with == can fail due to
rounding issues and can crash the master.
Key: MESOS-3518
URL: https://issues.apache.org/jira/browse/MESOS-3518
Project: Mesos
Issue Type: Bug
Components: master
Affects Versions: 0.24.1, 0.24.0, 0.23.1, 0.23.0
Reporter: Max Neunhöffer
Priority: Minor
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
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)