You are not logged in.

#1 2016-09-25 22:42:58

veroke12
Member
Registered: 2011-07-22
Posts: 98

[Solved] Calling 'lm' function crashes R

I experienced that R crashes, everytime I called 'lm' function,
lm(y~x, data=something)

here's the output:

$ R

R version 3.3.1 Patched (2016-09-24 r71349) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> require(ISLR)
Loading required package: ISLR
> fix(Auto)
> names(Auto)
[1] "mpg"          "cylinders"    "displacement" "horsepower"   "weight"      
[6] "acceleration" "year"         "origin"       "name"        
> lm(horsepower~acceleration, data=Auto)

 *** caught illegal operation ***
address 0x7fbf535b0457, cause 'illegal operand'

Traceback:
 1: lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...)
 2: lm(horsepower ~ acceleration, data = Auto)

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: 1
R is aborting now ...
Illegal instruction (core dumped)
$

several things i've tried:
1. build a daily patched R package using in a clean chroot ---> same result, still crashes
2. build a "Very, Very Secure Dishes" R 3.2.5 in a clean chroot ---> still crashes, here's the output:

$ R

R version 3.2.5 (2016-04-14) -- "Very, Very Secure Dishes"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> require(ISLR)
Loading required package: ISLR
Warning message:
package ‘ISLR’ was built under R version 3.3.0 
> require(MASS)
Loading required package: MASS
Warning message:
package ‘MASS’ was built under R version 3.3.0 
> lm(medv~lstat, data=Boston)

 *** caught illegal operation ***
address 0x7faae9235457, cause 'illegal operand'

Traceback:
 1: lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...)
 2: lm(medv ~ lstat, data = Boston)

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: 1
aborting ...
Illegal instruction (core dumped)
$ 

3. and the last thing, downgrade to 3.2.4-2 ---> still crashes

is this R bugs?? or R hasn't complied yet with new gcc standard (i'm not an expert on this).
Help me, thanks in advance.

Last edited by veroke12 (2016-09-25 23:30:41)

Offline

#2 2016-09-25 23:12:01

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,520
Website

Re: [Solved] Calling 'lm' function crashes R

R works fine here (on two different laptops and on 2 servers).  Is your system fully up to date?  Rebuilding R probably isn't relevant, more likely blas or lapack.  Do you use custom versions of either of these?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2016-09-25 23:26:59

veroke12
Member
Registered: 2011-07-22
Posts: 98

Re: [Solved] Calling 'lm' function crashes R

Trilby wrote:

R works fine here (on two different laptops and on 2 servers).  Is your system fully up to date?  Rebuilding R probably isn't relevant, more likely blas or lapack.  Do you use custom versions of either of these?

Yes, it's fully up to date..
I'm using openblas here.. So, i recompile openblas against the new gcc..
And it works fine now..

Thanks..

$ R --vanilla

R version 3.3.1 Patched (2016-09-24 r71349) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> require(MASS)
Loading required package: MASS
> lm(medv~lvstat, data=Boston)
Error in eval(expr, envir, enclos) : object 'lvstat' not found
> lm(medv~lstat, data=Boston)

Call:
lm(formula = medv ~ lstat, data = Boston)

Coefficients:
(Intercept)        lstat  
      34.55        -0.95  

> 

Last edited by veroke12 (2016-09-25 23:31:16)

Offline

Board footer

Powered by FluxBB