[R-sig-Debian] segfault and RunSnowWorker: not found
Martin Renner
greatauklet at gmail.com
Wed Aug 28 03:26:59 CEST 2013
Hallo Johannes,
Danke für die Antwort.
Yes, I did figure this is something peculiar to my installation. At last, I think I found a reproducible scenario that will trigger this segfault -- describing it here in case this might help others. It looks like parallel execution in package 'parallel' fails when debian package "libopenblas" is also installed. I can reproduce this on a fresh install.
Best,
Martin
Using the R 3.0.1 debian CRAN binaries on Debian wheezy, amd64, all works well. But after adding debian package "libopenblas-dev" and executing:
> library (parallel)
> example (mclapply)
I get:
mclppl> simplify2array(mclapply(rep(4, 5), rnorm))
*** caught segfault ***
[,1] [,2] [,3] [,4] [,5]
[1,] -1.4367983 -0.2086828 -0.5020836 1.0936661 -0.2593556
[2,] 0.9047555 0.6281615 -1.3045477 -0.5334737 -0.2911158
[3,] -0.8932667 0.2139596 -1.2259668 -0.3311813 -1.0246794
[4,] 0.6238694 0.9832240 -0.1994412 -0.2410835 -0.6639767
address 0x7f02ab5139d0, cause 'memory not mapped'
Traceback:
1: mcexit(0L)
2: FUN(1:2[[1L]], ...)
3: lapply(seq_len(cores), inner.do)
4: mclapply(rep(4, 5), rnorm)
5: lapply(x, length)
6: unlist(lapply(x, length))
7: unique(unlist(lapply(x, length)))
8: simplify2array(mclapply(rep(4, 5), rnorm))
9: eval(expr, envir, enclos)
......
> sessionInfo()
R version 2.15.1 (2012-06-22)
Platform: x86_64-pc-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=C LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
>
On 18 Aug 2013, at 05:25 , Johannes Ranke <jranke at uni-bremen.de> wrote:
> Hi,
>
> just for the record: On Debian squeeze, amd64, using R 3.0.1 from CRAN I get:
>
>> library(snow)
>> cl <- makeSOCKcluster(c("localhost", "localhost"))
>> sessionInfo()
> R version 3.0.1 (2013-05-16)
> Platform: x86_64-pc-linux-gnu (64-bit)
>
> locale:
> [1] LC_CTYPE=de_DE at euro LC_NUMERIC=C
> [3] LC_TIME=de_DE at euro LC_COLLATE=de_DE at euro
> [5] LC_MONETARY=de_DE at euro LC_MESSAGES=de_DE at euro
> [7] LC_PAPER=C LC_NAME=C
> [9] LC_ADDRESS=C LC_TELEPHONE=C
> [11] LC_MEASUREMENT=de_DE at euro LC_IDENTIFICATION=C
>
> attached base packages:
> [1] stats graphics grDevices utils datasets methods base
>
> other attached packages:
> [1] snow_0.3-12
>
> So it seems to be a problem with your installation.
>
> Johannes
>
> Am Freitag, 2. August 2013, 21:29:27 schrieb Martin Renner:
>> Hi,
>>
>> While I suspect that this is an issue peculiar to my machine (Debian squeeze
> amd64, R version 3.0.1, up-to-date packages), I'm hoping that somebody on this
> list may be able to give me suggestions on how to troubleshoot and fix the
> following:
>>> library (snow)
>>> cl <- makeSOCKcluster(c("localhost","localhost"))
>>
>> sh: 1: RunSnowWorker: not found
>>
>>
>> I presume/hope that this may be related to an (even more pressing) issue I
>> have with mclapply (package 'parallel'). While
>>
>>> example (mclapply)
>>
>> works as expected, any of my longer parallel jobs result in segfaults:
>>
>> *** caught segfault ***
>> address 0x7f0aeed649d0, cause 'memory not mapped'
>>
>> Traceback:
>> 1: mcexit(0L)
>> 2: mcparallel(FUN(X[[i]], ...), mc.set.seed = mc.set.seed, silent =
>> mc.silent) 3: FUN(1:8[[2L]], ...)
>> 4: lapply(jobid, function(i) mcparallel(FUN(X[[i]], ...), mc.set.seed =
>> mc.set.seed, silent = mc.silent)) 5: mclapply(sppDaysL, predDist,
>> mc.cores = 8)
>> aborting ...
>>
>> To add to the puzzle: the first couple of iterations sometimes finish
>> successfully, but on other runs segfaults start to appear with the first
>> iteration. The reported address seems to be always the same. htop
>> indicates that there is still sufficient RAM available and memtester came
>> out clean. Running the code with mc.cores=1 works fine -- run times are
>> just not practical when I can't take advantage of my 8 cores. Likewise, no
>> problems running in parallel under Mac OS X.
>>
>> I tried the cran binaries R version 3.0.1 (2013-05-16) as well as my
>> locally compiled version with the same result. I also tried a blank user
>> account, again with the same issue. Any suggestions how I could
>> troubleshoot this seqfault or RunSnowWorker: not found issue would be much
>> appreciated.
>>
>> Best wishes,
>>
>> Martin
>>
>>
>> Martin Renner
>> Tern Again Consulting
>> 388 E. Bayview Ave.
>> Homer, AK 99603, USA
>> phone: +1 907 235 0728
>> cell: 299 6152
>>
>> _______________________________________________
>> R-SIG-Debian mailing list
>> R-SIG-Debian at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-debian
>
>
> --
> PD Dr. Johannes Ranke
> Kronacher Str. 8
> 79639 Grenzach-Wyhlen
> http://chem.uft.uni-bremen.de/ranke
> <snow.txt>
More information about the R-SIG-Debian
mailing list