Thanks, fixed in R-devel and R-patched. The error happens in the child process when it is already exiting, after it had delivered a result, so this should not cause any trouble in an unpatched version of R (apart from showing that message). It is specific to mccollect(wait=FALSE).
Best Tomas On 5/3/19 12:47 PM, Pavel Krivitsky wrote: > Dear All, > > Since upgrading to 3.6.0, I've been getting a strange error messages > from the child process when using mcparallel/mccollect. Before filing a > report in the Bugzilla, I want to figure out whether I had been doing > something wrong all this time and R 3.6.0 has exposed it, or whether > something else is going on. > > # Background # > > Ultimately, what I want to do is to be able to set a time limit for an > expression to be evaluated that would be enforced even inside compiled > code. (R.utils::withTimeout() uses base::setTimeLimit(), which can only > enforce within R code.) > > # Implementation # > > The approach that my implementation, statnet.common::forkTimeout() > (source attached for convenience), uses is to call mcparallel() to > evaluate the expression in a child process, then mccollect() with > wait=FALSE and a timeout to give it a chance to finish. If it runs past > the timeout, the child process is killed and an onTimeout value is > returned. (This only works on Unix-alikes, but it's better than > nothing.) > > # The problem # > > Since 3.6.0---and I've tested fresh installs of 3.6.0 and 3.5.3 side- > by-side---I've been getting strange messages. > > Running > > source("forkTimeout.R") # attached > repeat print(forkTimeout({Sys.sleep(1);TRUE}, timeout=3)) > > results in > > [1] TRUE > [1] TRUE > Error in mcexit(0L) : ignoring SIGPIPE signal > [1] TRUE > [1] TRUE > Error in mcexit(0L) : ignoring SIGPIPE signal > [1] TRUE > [1] TRUE > [1] TRUE > > until interrupted. Running > > options(error=traceback) > repeat print(forkTimeout({Sys.sleep(1);TRUE}, timeout=3)) > > results in sporadic messages of the form: > > Error in mcexit(0L) : ignoring SIGPIPE signal > 6: selectChildren(jobs, timeout) > 5: parallel::mccollect(child, wait = FALSE, timeout = timeout) at > forkTimeout.R#75 > 4: withCallingHandlers(expr, warning = function(w) > invokeRestart("muffleWarning")) > 3: suppressWarnings(parallel::mccollect(child, wait = FALSE, timeout = > timeout)) at forkTimeout.R#75 > 2: forkTimeout({ > Sys.sleep(1) > ... > 1: print(forkTimeout({ > Sys.sleep(1) > ... > > So, these messages do not appear to prevent the child process from > returning valid output, but I've never seen them before R 3.6.0, so I > wonder if I am doing something wrong. Session info is also attached. > > Thanks in advance, > Pavel > > > ______________________________________________ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel [[alternative HTML version deleted]] ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel