Re: [Rd] Force quitting a FORK cluster node on macOS and Solaris wreaks havoc

2021-08-16 Thread Henrik Bengtsson
Thank you Simon, this is helpful. I take this is specific to quit(), so it's a poor choice for emulating crashed parallel workers, and Sys.kill() is much better for that. I was focusing on that odd extra execution/output, but as you say, there are lots of other things that is done by quit() here,

Re: [Rd] Force quitting a FORK cluster node on macOS and Solaris wreaks havoc

2021-08-12 Thread Simon Urbanek
Henrik, I'm not quite sure I understand the report to be honest. Just a quick comment here - using quit() in a forked child is not allowed, because the R clean-up is only intended for the master as it will be blowing away the master's state, connections, working directory, running master's ex

[Rd] Force quitting a FORK cluster node on macOS and Solaris wreaks havoc

2021-08-12 Thread Henrik Bengtsson
The following smells like a bug in R to me, because it puts the main R session into an unstable state. Consider the following R script: a <- 42 message("a=", a) cl <- parallel::makeCluster(1L, type="FORK") try(parallel::clusterEvalQ(cl, quit(save="no"))) message("parallel:::isChild()=", parallel: