New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bounds checking to Entry::current_running_duration #6643

merged 2 commits into from Oct 17, 2018


None yet
2 participants
Copy link

stuhood commented Oct 17, 2018


As shown in #6640, once we moved Entry locks outside of the Graph lock in #6095, it became possible for heavy_hitters to race against Nodes that are starting outside of the Graph lock.


Add a bounds check for Instant::duration_since in current_running_duration, to handle the case where a Node is started after we begin computing heavy_hitters. While switching to Instant::elapsed would "mostly" avoid this case, it would incur additional syscalls, without fully avoiding panics.


Fixes #6640.

Add a bounds check for `current_running_duration`, to handle the case…
… where a Node is started after we begin computing heavy_hitters.

@stuhood stuhood requested review from wisechengyi and illicitonion Oct 17, 2018


@stuhood stuhood merged commit 02c68ac into pantsbuild:master Oct 17, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed

@stuhood stuhood deleted the twitter:stuhood/duration-bounds-check branch Oct 17, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment