Return-Path: X-Original-To: apmail-mesos-issues-archive@minotaur.apache.org Delivered-To: apmail-mesos-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 38A6D18DC0 for ; Tue, 29 Sep 2015 21:21:06 +0000 (UTC) Received: (qmail 61225 invoked by uid 500); 29 Sep 2015 21:21:06 -0000 Delivered-To: apmail-mesos-issues-archive@mesos.apache.org Received: (qmail 61194 invoked by uid 500); 29 Sep 2015 21:21:06 -0000 Mailing-List: contact issues-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mesos.apache.org Delivered-To: mailing list issues@mesos.apache.org Received: (qmail 61184 invoked by uid 99); 29 Sep 2015 21:21:06 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Sep 2015 21:21:06 +0000 Date: Tue, 29 Sep 2015 21:21:06 +0000 (UTC) From: "Benjamin Mahler (JIRA)" To: issues@mesos.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (MESOS-3552) Check failed: result.cpus() == cpus() && result.mem() == mem() && result.disk() == disk() && result.ports() == ports() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/MESOS-3552?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1493= 5885#comment-14935885 ]=20 Benjamin Mahler commented on MESOS-3552: ---------------------------------------- Could you please include a pointer to the code containing the check? > Check failed: result.cpus() =3D=3D cpus() && result.mem() =3D=3D mem() &&= result.disk() =3D=3D disk() && result.ports() =3D=3D ports()=20 > -------------------------------------------------------------------------= ---------------------------------------------- > > Key: MESOS-3552 > URL: https://issues.apache.org/jira/browse/MESOS-3552 > Project: Mesos > Issue Type: Bug > Components: master > Affects Versions: 0.24.1 > Reporter: Mandeep Chadha > Assignee: Mandeep Chadha > > result.cpus() =3D=3D cpus() check is failing due to ( double =3D=3D doubl= e ) comparison problem.=20 > Root Cause :=20 > Framework requested 0.1 cpu reservation for the first task. So far so goo= d. Next Reserve operation =E2=80=94 lead to double operations resulting in = following double values : > results.cpus() : 23.9999999999999964472863211995 cpus() : 24 > And the check ( result.cpus() =3D=3D cpus() ) failed.=20 > The double arithmetic operations caused results.cpus() value to be : 23= .9999999999999964472863211995 and hence ( 23.9999999999999964472863211995 = =3D=3D 24 ) failed. -- This message was sent by Atlassian JIRA (v6.3.4#6332)