RMongo installation fails with Segmentation Fault

2019-02-11 01:19发布

I've been for last couple of hours trying to install the RMongo package with the following output:

> install.packages("RMongo")
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
trying URL 'https://repo.bppt.go.id/cran/src/contrib/RMongo_0.0.25.tar.gz'
Content type 'application/x-gzip' length 4169519 bytes (4.0 MB)
==================================================
downloaded 4.0 MB

* installing *source* package ‘RMongo’ ...
** package ‘RMongo’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Segmentation fault (core dumped)
ERROR: loading failed
* removing ‘/usr/local/lib/R/site-library/RMongo’

The downloaded source packages are in
    ‘/tmp/RtmpHZoomn/downloaded_packages’
Warning message:
In install.packages("RMongo") :
  installation of package ‘RMongo’ had non-zero exit status

I've also identified the same error trying to install xlsx.

I don't know what has changed in the past distros, since I've tried this with Ubuntu 16.04.2 and Ubuntu 17.04, with the same result.

This is a description of the R environment in the Ubuntu 16.04.2 distro:

> sessionInfo()
R version 3.4.0 (2017-04-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.2 LTS
Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0
locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=es_ES.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=es_ES.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=es_ES.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=es_ES.UTF-8 LC_IDENTIFICATION=C       
attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     
loaded via a namespace (and not attached):
[1] compiler_3.4.0 tools_3.4.0    tcltk_3.4.0

Any idea about what can be happening?

3条回答
冷血范
2楼-- · 2019-02-11 01:45

linux-image-3.13.0-121-generic and linux-image-4.4.0-81-generic contain a fix for the Stack Clash vulnerability.

Be careful with kernel updates, which fix this vulnerability. Current patch breaks many java (sun/oracle and openjdk) applications. See Bug #1699772: linux-image-4.4.0-81-generic, linux-image-3.13.0-121-generic Regression: many user-space apps crashing. The solution is to temporary reboot system with old kernel (linux-image-3.13.0-119-generic in Trusty).

Ubuntu kernel developers will prepare new patch in a few days.

UPDATE: Latest updates (at least image-4.4.0-83-generic, linux-image-4.8.0-58-generic, linux-image-4.10.0-26-generic) fix this vulnerability and problems with user-space programs.

查看更多
小情绪 Triste *
3楼-- · 2019-02-11 01:50

Same problem (at least for package "xlsx") occurs in Ubuntu 14.04 LTS with kernel 3.13.0-121-generic. When booting with the previous kernel (3.13.0-119-generic) installation works and library loads.

UPDATE: problem appears to be solved in Ubuntu 14.04 LTS by new kernel 3.13.0-123-generic

查看更多
Emotional °昔
4楼-- · 2019-02-11 02:02

This doesn't answer to the problems that I'm experiencing with RMongo, but solves the problem for me, so I hope it can be useful.

I've continued making some tests. Since this problem started when RMongo suddenly stopped from working, and taking into account that I had a similar installation that was working properly, I started to compare both environments.

I've checked that, in the system that is failing, some software updates were performed (you can check them below):

The following NEW packages will be installed
  libmircommon7 libmircore1 linux-headers-4.4.0-81 linux-headers-4.4.0-81-generic linux-image-4.4.0-81-generic
  linux-image-extra-4.4.0-81-generic
The following packages will be upgraded:
  click firefox firefox-locale-en flashplugin-installer gir1.2-click-0.4 google-chrome-stable grub-common grub-pc
  grub-pc-bin grub2-common libc-bin libc-dev-bin libc6 libc6:i386 libc6-dbg libc6-dev libclick-0.4-0 libepoxy0
  libgnutls-openssl27 libgnutls30 libmirclient9 libmircookie2 libmirprotobuf3 libmwaw-0.3-3 libnss3 libnss3-nssdb
  libqt5concurrent5 libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5 libqt5opengl5 libqt5printsupport5 libqt5sql5
  libqt5sql5-sqlite libqt5test5 libqt5widgets5 libqt5xml5 libssl-dev libssl-doc libssl1.0.0 libvlc5 libvlccore8
  libzzip-0-13 linux-firmware linux-headers-generic linux-image-generic linux-libc-dev locales multiarch-support
  openssl python3-click-package vlc vlc-data vlc-nox vlc-plugin-notify vlc-plugin-samba

So, I've checked one by one this packages, and it turns out that the root of the problem is the new kernel 4.4.0-81.

In order to be sure that this is the root of the problem, I've launched by Ubuntu distro with the previous version of the kernel that I had in my laptop: 4.4.0-79

And this is the result of the installation:

> install.packages("RMongo")
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
trying URL 'https://pbil.univ-lyon1.fr/CRAN/src/contrib/RMongo_0.0.25.tar.gz'
Content type 'application/x-gzip' length 4169519 bytes (4.0 MB)
==================================================
downloaded 4.0 MB

* installing *source* package ‘RMongo’ ...
** package ‘RMongo’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (RMongo)

The downloaded source packages are in
    ‘/tmp/RtmpJScKfz/downloaded_packages’
> install.packages("xlsx")
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
trying URL 'https://pbil.univ-lyon1.fr/CRAN/src/contrib/xlsx_0.5.7.tar.gz'
Content type 'application/x-gzip' length 312839 bytes (305 KB)
==================================================
downloaded 305 KB

* installing *source* package ‘xlsx’ ...
** package ‘xlsx’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (xlsx)

The downloaded source packages are in
    ‘/tmp/RtmpJScKfz/downloaded_packages’

Both packages, xlsx and RMongo, are now successfully installed and working.

I've also checked the relationship between xlsx and RMongo, and I'm afraid that problem underneath is rJava (common dependency). As a matter of fact, in order to be sure about this, I've made tests with other packages rJava-dependant (RWeka) and I had the same problem, solved after changing the kernel version.

== UPDATE ==

After the last kernel update, from 4.4.0-81 to 4.4.0-83, the problem has been fixed.

查看更多
登录 后发表回答