[R] robustbase adjbox segfault - memory not mapped

Baan baanbapat at gmail.com
Mon Mar 4 10:32:02 CET 2013


Hi,

I encountered a segfault, memory not mapped error when  using adjbox in 
robustbase. In trying to recreate the issue I found that the error 
occurs only for large sample size. Here is the code.

 > require(robustbase)
Loading required package: robustbase
 > x <- rnorm(10)
 > y <- rep(1, 10)
 > adjbox(x ~ y) ## gives a plot
 > x <- rnorm(10000)
 > y <- rep(1, 10000)
 > adjbox(x ~ y) ## gives a plot
 > x <- rnorm(100000)
 > y <- rep(1, 100000)
 > adjbox(x ~ y)

  *** caught segfault ***
address 0xfffffffcc47af530, cause 'memory not mapped'

Traceback:
  1: .C(mc_C, x, n, eps = eps, iter = c.iter, medc = double(1))
  2: mcComp(x, doReflect, eps1 = eps1, eps2 = eps2, maxit = maxit,     
trace.lev = trace.lev)
  3: mc.default(x, ..., na.rm = TRUE)
  4: mc(x, ..., na.rm = TRUE)
  5: adjboxStats(unclass(groups[[i]]), coef = range, doReflect = doReflect)
  6: adjbox.default(split(mf[[response]], mf[-response]), ...)
  7: adjbox(split(mf[[response]], mf[-response]), ...)
  8: adjbox.formula(x ~ y)
  9: adjbox(x ~ y)

*** glibc detected *** /usr/lib64/R/bin/exec/R: free(): corrupted 
unsorted chunks: 0x0000000002510030 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x71e16)[0x7fbaf93a6e16]
/lib64/libc.so.6(cfree+0x6c)[0x7fbaf93abb8c]
/usr/lib64/R/lib/libR.so(+0x135481)[0x7fbaf9bf5481]
/usr/lib64/R/lib/libR.so(+0xa5e19)[0x7fbaf9b65e19]
/usr/lib64/R/lib/libR.so(R_GetTraceback+0xb5)[0x7fbaf9b9cdf5]
/usr/lib64/R/lib/libR.so(+0x130f83)[0x7fbaf9bf0f83]
/lib64/libpthread.so.0(+0xeff0)[0x7fbaf96a5ff0]
/usr/local/lib/R/site-library/robustbase/libs/robustbase.so(mc_C_d+0x1263)[0x7fbaf50d73a3]
/usr/local/lib/R/site-library/robustbase/libs/robustbase.so(mc_C+0xb)[0x7fbaf50d75bb]
/usr/lib64/R/lib/libR.so(+0xba136)[0x7fbaf9b7a136]
/usr/lib64/R/lib/libR.so(Rf_eval+0x75b)[0x7fbaf9bb1eab]
/usr/lib64/R/lib/libR.so(+0xf97b0)[0x7fbaf9bb97b0]
/usr/lib64/R/lib/libR.so(+0x1df282)[0x7fbaf9c9f282]
/usr/lib64/R/lib/libR.so(Rf_eval+0x57b)[0x7fbaf9bb1ccb]
/usr/lib64/R/lib/libR.so(+0xf94f0)[0x7fbaf9bb94f0]
/usr/lib64/R/lib/libR.so(Rf_eval+0x57b)[0x7fbaf9bb1ccb]
/usr/lib64/R/lib/libR.so(+0xf3160)[0x7fbaf9bb3160]
/usr/lib64/R/lib/libR.so(Rf_eval+0x57b)[0x7fbaf9bb1ccb]
/usr/lib64/R/lib/libR.so(Rf_applyClosure+0x36b)[0x7fbaf9bb3a4b]
/usr/lib64/R/lib/libR.so(Rf_eval+0x458)[0x7fbaf9bb1ba8]
/usr/lib64/R/lib/libR.so(+0xf94f0)[0x7fbaf9bb94f0]
/usr/lib64/R/lib/libR.so(Rf_eval+0x57b)[0x7fbaf9bb1ccb]
/usr/lib64/R/lib/libR.so(+0xf3160)[0x7fbaf9bb3160]
/usr/lib64/R/lib/libR.so(Rf_eval+0x57b)[0x7fbaf9bb1ccb]
/usr/lib64/R/lib/libR.so(Rf_applyClosure+0x36b)[0x7fbaf9bb3a4b]
/usr/lib64/R/lib/libR.so(Rf_usemethod+0x820)[0x7fbaf9c09930]
/usr/lib64/R/lib/libR.so(+0x149bf8)[0x7fbaf9c09bf8]
/usr/lib64/R/lib/libR.so(Rf_eval+0x57b)[0x7fbaf9bb1ccb]
/usr/lib64/R/lib/libR.so(Rf_applyClosure+0x36b)[0x7fbaf9bb3a4b]
/usr/lib64/R/lib/libR.so(Rf_eval+0x458)[0x7fbaf9bb1ba8]
/usr/lib64/R/lib/libR.so(+0xf94f0)[0x7fbaf9bb94f0]
/usr/lib64/R/lib/libR.so(Rf_eval+0x57b)[0x7fbaf9bb1ccb]
/usr/lib64/R/lib/libR.so(+0xf3160)[0x7fbaf9bb3160]
/usr/lib64/R/lib/libR.so(Rf_eval+0x57b)[0x7fbaf9bb1ccb]


My setup details:

R --version
R version 2.15.2 (2012-10-26) -- "Trick or Treat"

Package:            robustbase
Version:            0.9-5
Date:               2012-03-01
Packaged:           2013-03-01 16:34:03 UTC; maechler
NeedsCompilation:   yes
Repository:         CRAN
Date/Publication:   2013-03-01 18:31:33
Built:              R 2.15.2; x86_64-pc-linux-gnu; 2013-03-04 05:54:20
                     UTC; unix


Platform: x86_64-pc-linux-gnu (64-bit)
uname -a
Linux R 2.6.32-5-amd64 #1 SMP Mon Feb 25 00:26:11 UTC 2013 x86_64 GNU/Linux
Debian squeeze

Could someone pls help.

Regards
Baan



More information about the R-help mailing list