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

RGUI/Rstudio crash (r seesion aborted) when build package importing data.table #2413

Closed
StanleyXu opened this issue Oct 12, 2017 · 4 comments

Comments

@StanleyXu
Copy link

Firstly this issue came up whenever I clicked "Install and Restart" botton from Rstudio during package development. I tested in RGUI, and on a different Macbook, it still exists. Even if I tried to roll back to the version of my code to a previous version that has passed Bioconductor-devel automatic tests (on Mac, windows and Linux machines), it still crashes when I tried to build the code.

In RGUI, more information is available before crash.

 *** caught illegal operation ***
address 0x7fffa5eeeae4, cause 'illegal opcode'

After comparing sessionInfo I narrow down potential cause for this issue to package data.table. I came up with the same issue even when installing devtools when data.table is loaded in current session. This happened and can be repeated on both of my Mac machines.

> install.packages('devtools')
trying URL 'https://cran.cnr.berkeley.edu/bin/macosx/el-capitan/contrib/3.4/devtools_1.13.3.tgz'
Content type 'application/x-gzip' length 439380 bytes (429 KB)
==================================================
downloaded 429 KB


The downloaded binary packages are in
	/var/folders/rr/sfjprz_j4_z382t4qd4wqgmm0000gn/T//RtmpIyCeMU/downloaded_packages
> library(data.table)
data.table 1.10.4.1
  The fastest way to learn (by data.table authors): https://www.datacamp.com/courses/data-analysis-the-data-table-way
  Documentation: ?data.table, example(data.table) and browseVignettes("data.table")
  Release notes, videos and slides: http://r-datatable.com
> sessionInfo()
R version 3.4.2 (2017-09-28)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.6

Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
[1] data.table_1.10.4-1

loaded via a namespace (and not attached):
[1] compiler_3.4.2
> 
> install.packages('devtools')
trying URL 'https://cran.cnr.berkeley.edu/bin/macosx/el-capitan/contrib/3.4/devtools_1.13.3.tgz'
Content type 'application/x-gzip' length 439380 bytes (429 KB)
==================================================
downloaded 429 KB


 *** caught illegal operation ***
address 0x7fffa5eeeae4, cause 'illegal opcode'

Traceback:
 1: system(paste0("tar zxf \"", path.expand(what), "\" -C \"", path.expand(where),     "\""), intern = FALSE)
 2: untar(pkg, tmpDir)
 3: unpackPkg(foundpkgs[okp, 2L], foundpkgs[okp, 1L], lib, lock = lock)
 4: .install.macbinary(pkgs = bins, lib = lib, contriburl = contrib.url(repos,     type2), method = method, available = av2, destdir = destdir,     dependencies = NULL, quiet = quiet, ...)
 5: install.packages("devtools")

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: 

Any suggestion is appreciated!

@mattdowle
Copy link
Member

mattdowle commented Oct 12, 2017

It always seems to be MacOS will all the problems! No problems on Windows or Linux.

If you are installing data.table from source then you must very precisely follow the instructions. That said, we haven't seen any crashes like yours, just errors when compiling from source on MacOS.

Try installing the MacOS binary from CRAN, don't compile from source yourself. See ?install.packages and the type= argument.

Try in R in a Terminal rather than from RStudio. Does the problem still occur?

Maybe apply the Windows advice to MacOS too.

1.10.4-2 is now on CRAN. Might as well try that. Although, Mac binaries are in progress and will take a few days to reach all mirrors.

Clear out and purge data.table and reboot before reinstalling. To make sure you have a full and clean reinstall of the package. We've seen problems before where MacOS is still using the old .so with the new R level calls, after an upgrade.

I don't see why devtools is involved here. You're saying that installing the devtools package (not even using devtools) causes RStudio to crash when data.table is loaded? So data.table hasn't even been called yet or anything?

@mattdowle
Copy link
Member

mattdowle commented Oct 12, 2017

See also every comment here : #2409
in particular this one about llvm vs gcc : #2409 (comment)

I'll close for now as either it isn't a data.table issue, or 1.10.4-2 fixes it. Please reopen if none of the suggestions or the links help.

@StanleyXu
Copy link
Author

@mattdowle Thank you. I can install data.table package following the openMP instruction. The problem remains. I'll try the llvm vs gcc configs, or wait for the 1.10.4-2 binary in a few days.

@StanleyXu
Copy link
Author

@mattdowle I also tried the testing function test.data.table() and these are the error messages I got, not sure if they help.

Running test id 1687.1     Test 1687.1 Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘first’ for signature ‘"integer"’
Running test id 1687.2     Test 1687.2 Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘first’ for signature ‘"data.table"’
Running test id 1705     Assertion failure at kmp_runtime.cpp(6480): __kmp_thread_pool == __null.
Assertion failure at kmp_runtime.cpp(6480): __kmp_thread_pool == __null.
OMP: Error #13: Assertion failure at kmp_runtime.cpp(6480).
OMP: Hint: Please submit a bug report with this message, compile and run commands used, and machine configuration info including native compiler and operating system versions. Faster response will be obtained by including all program sources. For information on submitting this issue, please see http://www.intel.com/software/products/support/.
OMP: Error #13: Assertion failure at kmp_runtime.cpp(6480).
OMP: Hint: Please submit a bug report with this message, compile and run commands used, and machine configuration info including native compiler and operating system versions. Faster response will be obtained by including all program sources. For information on submitting this issue, please see http://www.intel.com/software/products/support/.
Assertion failure at kmp_runtime.cpp(6480): __kmp_thread_pool == __null.
Assertion failure at kmp_runtime.cpp(6480): __kmp_thread_pool == __null.
OMP: Error #13: Assertion failure at kmp_runtime.cpp(6480).
OMP: Hint: Please submit a bug report with this message, compile and run commands used, and machine configuration info including native compiler and operating system versions. Faster response will be obtained by including all program sources. For information on submitting this issue, please see http://www.intel.com/software/products/support/.
OMP: Error #13: Assertion failure at kmp_runtime.cpp(6480).
OMP: Hint: Please submit a bug report with this message, compile and run commands used, and machine configuration info including native compiler and operating system versions. Faster response will be obtained by including all program sources. For information on submitting this issue, please see http://www.intel.com/software/products/support/.
Running test id 1750     Test 1751 not run. If required call library(nanotime) first.
Error in eval(exprs[i], envir) : 
  2 errors out of 5858 (lastID=1750, endian==little, sizeof(long double)==16, sizeof(pointer)==8) in inst/tests/tests.Rraw on Thu Oct 12 21:00:47 2017. Search tests.Rraw for test numbers: 1687.1, 1687.2.

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

2 participants