Skip to content
Prev 350706 / 398502 Next

does segfault mean (always) a bug?

It looks like a problem in the Matrix package.  I made the file KE.rda
containing the Matrix objects K and E constructed in calc.diffusion.kernel
by adding a save() call just before where R dies in the original example:

        K = lam$values[1] * I - M
        E = I - matrix(1, ncol = ncol(I), nrow = nrow(I))/ncol(I)
cat("saving K, E, etc. in /tmp/KE.rda\n")
save(K, E, deg, invD, I, W, M, lam, file="/tmp/KE.rda")
cat("    done making the file\n")
        K = E %*% K %*% E

With that file in place I get
R version 3.2.0 (2015-04-16)
Platform: x86_64-unknown-linux-gnu (64-bit)
Running under: Ubuntu precise (12.04.5 LTS)

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=en_US.UTF-8       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

other attached packages:
[1] Matrix_1.2-0

loaded via a namespace (and not attached):
[1] grid_3.2.0      lattice_0.20-31
Formal class 'dsyMatrix' [package "Matrix"] with 5 slots
  ..@ x       : num [1:143376676] 1.00 -8.35e-05 -8.35e-05 -8.35e-05
-8.35e-05 ...
  ..@ Dim     : int [1:2] 11974 11974
  ..@ Dimnames:List of 2
  .. ..$ : NULL
  .. ..$ : NULL
  ..@ uplo    : chr "U"
  ..@ factors : list()
Formal class 'dgCMatrix' [package "Matrix"] with 6 slots
  ..@ i       : int [1:487692] 0 69 948 951 1027 1192 1414 1420 1421 1714
...
  ..@ p       : int [1:11975] 0 27 125 147 199 212 221 230 254 274 ...
  ..@ Dim     : int [1:2] 11974 11974
  ..@ Dimnames:List of 2
  .. ..$ : chr [1:11974] "GO:0000002" "GO:0000003" "GO:0000012"
"GO:0000018" ...
  .. ..$ : chr [1:11974] "GO:0000002" "GO:0000003" "GO:0000012"
"GO:0000018" ...
  ..@ x       : num [1:487692] 32.2163 -0.004674 -0.000722 -0.005316
-0.014022 ...
  ..@ factors : list()
*** caught segfault ***
address 0x7fffa7e1ccf8, cause 'memory not mapped'

Traceback:
 1: EK %*% E
 2: EK %*% E

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Selection:

Bill Dunlap
TIBCO Software
wdunlap tibco.com

On Wed, May 6, 2015 at 1:57 AM, Martin Maechler <
maechler at lynne.stat.math.ethz.ch> wrote: