[Rd] Strange error messages from parallel::mcparallel family under 3.6.0

Pavel Krivitsky p@ve| @end|ng |rom uow@edu@@u
Fri May 3 12:47:23 CEST 2019

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

# 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.


  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

  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
4: withCallingHandlers(expr, warning = function(w)
3: suppressWarnings(parallel::mccollect(child, wait = FALSE, timeout =
timeout)) at forkTimeout.R#75
2: forkTimeout({
1: print(forkTimeout({

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 Krivitsky
Lecturer in Statistics
National Institute of Applied Statistics Research Australia (NIASRA)
School of Mathematics and Applied Statistics | Building 39C Room 154
University of Wollongong NSW 2522 Australia
T +61 2 4221 3713
Web (NIASRA): http://niasra.uow.edu.au/index.html
Web (Personal): http://www.krivitsky.net/research
ORCID: 0000-0002-9101-3362

NOTICE: This email is intended for the addressee named and may contain
confidential information. If you are not the intended recipient, please
delete it and notify the sender. Please consider the environment before
printing this email.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sessionInfo.txt
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20190503/bfe185b4/attachment.txt>

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: forkTimeout.R
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20190503/bfe185b4/attachment.ksh>

More information about the R-devel mailing list