For some of my packages I am getting a segmentation fault in Linux when I use R CMD check. (Using R 1.0.1) The segmentation fault does not happen in Solaris and in some cases it does not happen in Linux if I set R_NSIZE and R_VSIZE much higher than I need in Solaris. Should I expect a segmentation fault if there is not enough memory for R CMD check, or are these unrelated? Paul Gilbert -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
R CMD check seg fault in Linux
3 messages · Paul Gilbert, Peter Dalgaard
Paul Gilbert <pgilbert@bank-banque-canada.ca> writes:
For some of my packages I am getting a segmentation fault in Linux when I use R CMD check. (Using R 1.0.1) The segmentation fault does not happen in Solaris and in some cases it does not happen in Linux if I set R_NSIZE and R_VSIZE much higher than I need in Solaris. Should I expect a segmentation fault if there is not enough memory for R CMD check, or are these unrelated?
It's certainly not the intention to give segfaults for that reason... However, the same pattern could occur from PROTECT errors in your C code, triggered by a garbage collection at just the wrong moment (which could be different on different OSs). You should rerun the relevant testscript under "R -d gdb" and see exactly where the segfault occurs.
O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Should I expect a segmentation fault if there is not enough memory for R CMD check, or are these unrelated?
It's certainly not the intention to give segfaults for that reason...
...
You should rerun the relevant testscript under "R -d gdb" and see exactly where the segfault occurs.
It seems the correlation with CMD check and memory was spurious but I have now observered that the seg faults occur when I run tests on one Linux machine, but not when I run on the Linux machine I used for installing R (from source) and my code (which includes some fortan). The machines have similar Linux2.2.9/Mandrake installations (but fortran didn't get installed on one). The biggest difference is that the one with fortran installed has has a Celeron processor and the other one has an AMD-K6. I've never had problems with this differences before. It might be some time before I get a chance to really dig into it with gdb so if anyone has any quick insights I would appreciate suggestions. Would there be compiler flags for different processors or anything like that which might cause a problem? Thanks, Paul Gilbert -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._