Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

big.matrix object creation fails consistently in docker containers #81

Open
paulklemm opened this issue Dec 2, 2017 · 3 comments
Open

Comments

@paulklemm
Copy link

I encountered a reproducible problem when creating big.matrix objects using a Debian docker container. The same also happens for a different one running Ubuntu.

To reproduce, you only need to take the following steps:

# Pull the r-base package
docker pull r-base
# Run R using an interactive shell on the image
docker run -ti --rm r-base /usr/bin/R

In the interactive R session, you run:

# Install bigmemory
install.packages('bigmemory')
# Load the package and run tests
library(bigmemory)
# Works
x <- big.matrix(5, 2)
# BUS error
x <- big.matrix(53110, 1540)

The last command yields the following error:

 *** caught bus error ***
address 0x7fa154ffc000, cause 'non-existent physical address'

Traceback:
 1: .Call(`_bigmemory_CreateSharedMatrix`, row, col, colnames, rownames,     typeLength, ini, separated)
 2: CreateSharedMatrix(as.double(nrow), as.double(ncol), as.character(colnames),     as.character(rownames), as.integer(typeVal), as.double(init),     as.logical(separated))
 3: big.matrix(53110, 1540)

The code works on the R version on my Mac without problems. The same code in the docker container yielded the described problem. I've also tested the docker container on a Linux machine with over 60GB RAM (which the docker container can access) and the outcome remains the same.

@kaneplusplus already asked whether this is a 64-bit Linux. uname -i yields x86_64, so this shouldn't be the problem.

@privefl
Copy link
Contributor

privefl commented Dec 2, 2017

Have you tried with shared = FALSE or using a filebacked big.matrix?

@zhiiiyang
Copy link

@paulklemm, I encountered the same problem in a docker environment as well. But using shared = FALSE made the bug go away.

@kaneplusplus
Copy link
Owner

This might indicate a memory mapping issue. Can you try creating a much smaller big.matrix object, like 10x10, and see if you get the same error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants