Open HenrikBengtsson opened 8 years ago
A minimal reproducible example causing that output:
> script <- system.file("bin", "linux-helper", package="BatchJobs")
> system2(script, args="list-jobs", stdout=TRUE, stderr=TRUE)
[1] "dyld: DYLD_ environment variables being ignored because main executable (/bin/ps) is setuid or setgid"
It is a message sent to standard error;
> system2(script, args="list-jobs", stdout=TRUE, stderr=FALSE)
character(0)
It looks like something is setting system environment variable DYLD_FALLBACK_LIBRARY_PATH
when R is loaded, because it's not there prior to launching R:
{hb}: echo $DYLD_FALLBACK_LIBRARY_PATH
{hb}: R --vanilla
> Sys.getenv("DYLD_FALLBACK_LIBRARY_PATH")
[1] "/Library/Frameworks/R.framework/Resources/lib"
Unsetting this (e.g. https://discussions.apple.com/thread/4143805?tstart=0), makes that stderr message disappear:
> Sys.unsetenv("DYLD_FALLBACK_LIBRARY_PATH")
> script <- system.file("bin", "linux-helper", package="BatchJobs")
> system2(script, args="list-jobs", stdout=TRUE, stderr=TRUE)
character(0)
This also makes debugMulticore()
work, i.e.
> Sys.unsetenv("DYLD_FALLBACK_LIBRARY_PATH")
> library("BatchJobs")
> debugMulticore()
[...]
Writing 1 R scripts...
SubmitJobs |+++++++++++++++++++++++++++++++++++++++++++++++++| 100% (00:00:00)
Sending 1 submit messages...
Might take some time, do not interrupt this!
Syncing registry ...
Submitting 1 job result: 1
Query worker status:
Query worker status result: 1.14 4 0 0
[...]
Query worker status result: 1.05 4 0 0
Syncing registry ...
OS cmd: /Users/hb/Library/R/3.2/library/BatchJobs/bin/linux-helper list-jobs "/var/folders/r5/97tkfmg16qq_j7s_q1dgqqs40000gq/T//RtmpqvRV6F/file162ed57d08b85"
OS result:
$exit.code
[1] 0
$output
character(0)
Running jobs:
>
Now, I don't know if it's safe to unset DYLD_FALLBACK_LIBRARY_PATH
. Also, it could be that this is an OS X 10.8.x issue (which is an old OS version by now).
Problem
With BatchJobs 1.6 in a fresh R 3.2.3 Patched session on OS X 10.8.5, the multicore cluster-function setup gives the following error:
Troubleshooting
With
debug(BatchJobs:::getWorkerSchedulerStatus)
I find that:Next, inspecting
BatchJobs:::getWorkerStatus.WorkerLinux()
;lead me to the following:
Note that first output line, which is the same as reported by the above debug output.
The problem is that extra output line and that
BatchJobs:::getWorkerStatus.WorkerLinux()
tries to parse it when the information of interest is really in the following line.Session information