Hello R-help list,


I have a piece of code written by a grad student here at BU which will segfault when using one data set, but complete just fine using another.  Both sets are just text files full of real numbers.

It seems like a bug within R.  It could be a bug within her data, but
again, her data is just a bunch of floats, so her data could be
triggering a bug within R.  I have tried this with two different rpm packages of R for Linux (R-2.8.0-1.rh5 and R-2.8.1-1.rh5) as well as a fresh build that I just did of the prerelease R-beta_2009-04-02_r48271.tar.gz
I have also tried installing the absolute newest versions of  glmnet_1.1-3.tar.gz and Matrix_0.999375-23.tar.gz.  In all cases, the exact same error occurs.

Can anyone try this and let me know what they think is happening?  Thanks!

Download and untar the following file:
http://www.sendspace.com/file/siboaw

Then go into either the "works" or the "segfaults" directory.  The .r files are identical in both, but the data is different.  Both data sets are just a bunch of real numbers. Run:

R --vanilla < 200.r

Make sure you've got Matrix and glmnet in your Rlibs.  Change the line at the top of the .R file to reflect where your Rlibs are instead of mine.  In the "works" directory, this will run for a bit, and then, using the old data, it will begin to dump out solutions.  If you were to give it a few hours, it would complete.  (You don't need to bother.)

In the "segfaults" directory, however, it will segfault with the following
traceback before it gets to the point in the code where it dumps out
solutions at all:

  *** caught segfault ***
address (nil), cause 'memory not mapped'

Traceback:
 1: .Fortran("elnet", ka, parm = alpha, nobs, nvars, as.double(x),    
y, weights,
 jd, vp, ne, nx, nlam, flmin, ulam, thresh, isd,     lmu = integer(1),
a0 = double
(nlam), ca = double(nx * nlam),     ia = integer(nx), nin =
integer(nlam), rsq = d
ouble(nlam),     alm = double(nlam), nlp = integer(1), jerr =
integer(1),     PACK
AGE = "glmnet")
 2: glmnet(xstd$sdat, ystd$sdat, family = c("gaussian"), lambda =
lambda,     stan
dardize = FALSE, type = c("naive"))
 3: sl_cv.glmnet(Xnew, ynew, K = 10, fit_all$lambda)
aborting ...


Thanks again!

Dan Kamalic
Director of Systems Analysis / Administration
Boston University Department of Biomedical Engineering


      
	[[alternative HTML version deleted]]


