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
errors do not cancel computation -> endless loop #44
Comments
Thanks for reporting this! Do you know if this behavior also occurs when using the |
Consider for a moment the code below: # Specification instance.
specification <- Specification$new()
# Specification details.
specification$set_cores(cores = 3)
specification$set_type(type = "psock")
# Backend instance.
backend <- AsyncBackend$new()
# Start the backend.
backend$start(specification)
# Run the task.
backend$sapply(1:10, function(x) {
stop("First intended error.")
stop("Second intended error.")
return(0)
})
# Read the output.
backend$get_output(wait = TRUE)
# Stop it.
backend$stop() The call Error: ! in callr subprocess.
Caused by error in `checkForRemoteErrors(val)`:
! 3 nodes produced errors; first error: First intended error. This is what we expect to see because in Lines 269 to 273 in 8bbeaab
Since the backend works as intended, I tend to believe the issue is with the context classes in which this backend operates (i.e., maybe |
It looks like the problem is, indeed, with the progress tracking, and not with the backend. While the tasks are being executed, each worker reports the progress. The progress is then monitored from the interactive session by the parabar/R/ProgressTrackingContext.R Lines 216 to 219 in 8bbeaab
We need to let function(x) {
Sys.sleep(0.01)
if(x == 50) {
stop("First intended error.")
stop("Second intended error.")
}
return(0)
} |
@MaximilianPi, this is now fixed in #49 and will be in the next release. |
Great, thanks! @mihaiconstantin |
Hi @mihaiconstantin,
Errors in the workers do not seem to abort the computations and result in an infitine loop (tested on MacOS and Linux):
It works if you interrupt and rerun it a second time with the same workers/backend.
The text was updated successfully, but these errors were encountered: