[Rd] 1.2.0 segfault

Peter Dalgaard BSA p.dalgaard@biostat.ku.dk
18 Dec 2000 17:37:02 +0100


Paul Gilbert <pgilbert@bank-banque-canada.ca> writes:

> I'm a novice with gdb but the following is the result of a segfault problem I've been
> having with 1.2.0.  If there is something else I should do to get more useful
> information at this point, then someone please let me know.

This kind of stuff is usually caused by memory protection errors. Two
things you can do:

 - insert a call to gctorture() close to the point of the crash. This
   will often make the crash occur closer to the point of the actual
   error.

 - Compile R (I'm afraid you have to recompile the entire thing)
   configured with the --enable-strict-barrier flag

Apart from that, you can of course try tracing the origins of the
error with gdb, e.g.

 - which variable had bogus contents?
 - when was the last time something wrote to that memory location?
 - etc...

It does get a bit excessive if I try to explain all that, though...

> > library(curve) 
Loading required package: dse1 
Loading required package: syskern 
Loading required package: tframe 
Program received signal SIGWINCH, Window size changed. 
0xef5b7400 in poll () (gdb)

> dsecurvature.function.testsA() 
Undefined command: "dsecurvature". Try "help". 
(gdb) continue Continuing.
> 
> > dsecurvature.function.testsA()
> Random number generator tests ...ok
> DSE curvature test A 1 ... completed
> DSE curvature test A 2 ...
> Program received signal SIGSEGV, Segmentation fault.
> 0x763cc in Rf_allocVector (type=14, length=2) at memory.c:1551
> 1551      CLASS_GET_FREE_NODE(node_class, s);
> (gdb) bactrace
> Undefined command: "bactrace".  Try "help".
> (gdb) backtrace
> #0  0x763cc in Rf_allocVector (type=14, length=2) at memory.c:1551
> #1  0x5561c in Rf_duplicate (s=0xbcd6f0) at duplicate.c:140
> #2  0x55518 in Rf_duplicate (s=0x99c508) at duplicate.c:133
...

-- 
   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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._