[R] R crashing on linux

Peter Dalgaard p.dalgaard at biostat.ku.dk
Thu Nov 9 18:05:10 CET 2006


Francois Pepin <fpepin at cs.mcgill.ca> writes:

> Hi everyone,
> 
> I've had R crashing on rather repeatedly and I'd like to know if there's
> anything to be done with it.
> 
> This is with R 2.3.0. That computer does not have R 2.4 installed on it.
> This is a Linux FC4 on 64bit processor.
> 
> How to reproduce it:
> 
> 1- ssh to server with X forwarding.
> 2- start R in a screen.
> 3- violently kill ssh on the client machine (in my case this is achieved
> by the machine crashing and rebooting with no warning)
> 4- reconnect to server and reattach screen.
> 
> At this point the following message appears:
> 
> > Error: X11 fatal IO error: please save work and shut down R
> 
> Complying, I try to quit:
> 
> > q()
> Save workspace image? [y/n/c]: y
> 
>  *** caught segfault ***
> address 0x68, cause 'memory not mapped'
> 
> Possible actions:
> 1: abort (with core dump)
> 2: normal R exit
> 3: exit R without saving workspace
> 4: exit R saving workspace
> Selection: 
> 
> At this point, selecting anything other than 1 will give a repeat of the
> same message. Interestingly, I do have .RData and .Rhistory with what
> looks like the proper objects and commands.
> 
> I admit that this is a rather unusual situation caused by my client
> machine crashing repeatedly and my trying to work around it. I figure
> that R still shouldn't crash in this situation.
> 
> Should I put that as bug report and have anyone else seen this?

Probably not. What you're seeing is R trying as hard as it can to get
out of the mess and failing. The reason for the advice to quit R is
exactly that the system is suspected of being in an inconsistent
state. This has to do with low level X11 programming; the error comes
from the I/O handler and the man page says

       The XSetIOErrorHandler sets the fatal I/O error handler.  Xlib calls
       the program's supplied error handler if any sort of system call error
       occurs (for example, the connection to the server was lost).  This is
       assumed to be a fatal condition, and the called routine should not
       return.  If the I/O error handler does return, the client process
       exits.

I.e. I think you're pretty much up the roof without a ladder when this
occurs. 

 
> > sessionInfo()
> Version 2.3.0 (2006-04-24)
> x86_64-unknown-linux-gnu
> 
> attached base packages:
> [1] "methods"   "stats"     "graphics"  "grDevices" "utils"
> "datasets"
> [7] "base"
> 
> Francois
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 

-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907



More information about the R-help mailing list