SCM

[#6325] node stack overflow for do.call("rbind", <list of sparse matrices>) --- design bug in R's methods:::rbind()

Date:
2016-05-09 17:36
Priority:
3
State:
Closed
Submitted by:
Benjamin Tyner (btyner)
Assigned to:
Nobody (None)
Hardware:
None
Product:
None
Operating System:
All
Component:
None
Version:
None
Severity:
None
Resolution:
Won't Fix
URL:
Summary:
node stack overflow for do.call("rbind", <list of sparse matrices>) --- design bug in R's methods:::rbind()

Detailed description
I am not sure whether this is a bug in base::rbind or in Matrix, so posting it here first. To reproduce:

n <- 408 # it succeeds for 407

X <- vector("list", n)
set.seed(6860)
for (i in 1:n) {
X[[i]] <- new("dgCMatrix",
i = 0:57L,
p = c(0L, sort(sample(1:58, size = 9L)), 58L),
Dim = c(58L, 10L),
Dimnames = list(NULL, NULL),
x = runif(58L),
factors = list()
)
}

Xb <- do.call("rbind", X)

here is my sessionInfo()

R version 3.2.5 (2016-04-14)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux Server release 6.7 (Santiago)

locale:
[1] LC_CTYPE=en_US LC_NUMERIC=C LC_TIME=en_US LC_COLLATE=en_US LC_MONETARY=en_US LC_MESSAGES=en_US LC_PAPER=en_US LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

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

loaded via a namespace (and not attached):
[1] grid_3.2.5 lattice_0.20-23


Comments:

Message  ↓
Date: 2016-05-10 20:46
Sender: Martin Maechler

This is really a design bug in R's methods:::rbind().
I have sent an e-mail to R-devel about this:
https://stat.ethz.ch/pipermail/r-devel/2016-May/072682.html

Date: 2016-05-10 01:02
Sender: Benjamin Tyner

Note: on my other machine, I had to set n to 409 in order to trigger this. The sessionInfo() there is

R version 3.2.5 (2016-04-14)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04 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-5

loaded via a namespace (and not attached):
[1] grid_3.2.5 lattice_0.20-33

Attached Files:

Changes

Field Old Value Date By
Operating SystemLinux2016-05-10 20:46mmaechler
ResolutionNone2016-05-10 20:46mmaechler
status_idOpen2016-05-10 20:46mmaechler
close_dateNone2016-05-10 20:46mmaechler
summarynode stack overflow for do.call("rbind", <list of sparse matrices>)2016-05-10 20:46mmaechler
Thanks to:
Vienna University of Economics and Business Powered By FusionForge