You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Gastón Kleiman (JIRA)" <ji...@apache.org> on 2017/06/13 23:47:00 UTC
[jira] [Created] (MESOS-7661) Libprocess runs long timers right
ahead
Gastón Kleiman created MESOS-7661:
-------------------------------------
Summary: Libprocess runs long timers right ahead
Key: MESOS-7661
URL: https://issues.apache.org/jira/browse/MESOS-7661
Project: Mesos
Issue Type: Bug
Components: libprocess
Reporter: Gastón Kleiman
{{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)