Skip to content
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

Differentiate between and process and timeout errors #24338

Merged
merged 3 commits into from
Nov 26, 2017

Conversation

omus
Copy link
Member

@omus omus commented Oct 26, 2017

Previously a SIGKILL from the timeout task or signalled externally would both raise the same exception. This should assist in debugging #24329

@omus omus added the libgit2 The libgit2 library or the LibGit2 stdlib module label Oct 26, 2017
@ararslan ararslan added error handling Handling of exceptions by Julia or the user parallelism Parallel or distributed computation labels Oct 26, 2017
sleep(timeout)
kill(p)
close(master)
end
try
for (challenge, response) in challenges
process_exited(p) && error("Too few prompts. $(format_output(out))")

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't manage to trigger this error. Most of the time this loop is blocked by readuntil which will abend when the process is aborted and trigger the "Could not locate challenge" error.


# Process timed out or aborted
if !success(p)
if istaskdone(t)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at this again there is a small timing window where the process could be killed externally and the time out task could end

@omus
Copy link
Member Author

omus commented Oct 27, 2017

Some additional changes:

  • Code should now always report a ProcessError when the processed was killed outside of the timeout task
  • Revised the error message to indicate that a timeout has occurred rather assuming the process was blocked at a prompt
  • Suppress displaying empty process output

@omus omus force-pushed the cv/challenge-process-error branch from 32ab46e to 8b7784a Compare November 13, 2017 15:18
@omus
Copy link
Member Author

omus commented Nov 13, 2017

Rebased changes. Hopefully the Circle CI test pass now.

@omus omus force-pushed the cv/challenge-process-error branch from 8b7784a to 273e570 Compare November 26, 2017 15:46
@omus
Copy link
Member Author

omus commented Nov 26, 2017

Rebased changes to re-run the CI. Will merge if successful.

@omus
Copy link
Member Author

omus commented Nov 26, 2017

Travis CI failures are unrelated.

@omus omus merged commit d502d23 into master Nov 26, 2017
@omus omus deleted the cv/challenge-process-error branch November 26, 2017 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error handling Handling of exceptions by Julia or the user libgit2 The libgit2 library or the LibGit2 stdlib module parallelism Parallel or distributed computation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants