mesos-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Mann (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (MESOS-7661) Libprocess timers with long durations trigger immediately
Date Mon, 14 Aug 2017 21:20:00 GMT

    [ https://issues.apache.org/jira/browse/MESOS-7661?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16126403#comment-16126403
] 

Greg Mann edited comment on MESOS-7661 at 8/14/17 9:19 PM:
-----------------------------------------------------------

The commits here, along with those from MESOS-7660, will help us avoid many cases in which
we would overflow. Note, however, that fundamentally this issue still exists, since we have
not made changes to the arithmetic operators.

After some discussion, we are opting to address this issue at the Mesos level, by restricting
the lengths of durations that users can supply, so I'm closing this ticket as "Won't Fix".


was (Author: greggomann):
The commits here, along with those from MESOS-7660, will prevent us from overflowing. Note,
however, that fundamentally this issue still exists, since we have not made changes to the
arithmetic operators.

> Libprocess timers with long durations trigger immediately
> ---------------------------------------------------------
>
>                 Key: MESOS-7661
>                 URL: https://issues.apache.org/jira/browse/MESOS-7661
>             Project: Mesos
>          Issue Type: Bug
>          Components: libprocess
>            Reporter: Gastón Kleiman
>            Assignee: Gastón Kleiman
>              Labels: mesosphere
>
> {{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|https://github.com/apache/mesos/blob/13cae29e7832d8bb879c68847ad0df449d227f17/3rdparty/libprocess/include/process/timeout.hpp#L33-L38],
leading to an [integer overflow in {{Duration}}|https://github.com/apache/mesos/blob/13cae29e7832d8bb879c68847ad0df449d227f17/3rdparty/stout/include/stout/duration.hpp#L116].
> 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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message