From mtmorgan at fhcrc.org  Fri Sep  4 17:56:56 2009
From: mtmorgan at fhcrc.org (Martin Morgan)
Date: Fri, 04 Sep 2009 08:56:56 -0700
Subject: [Rd] enabling core dumps
In-Reply-To: <20090904173944.et305vc9gon4480c@web.supagro.inra.fr>
References: <20090904173944.et305vc9gon4480c@web.supagro.inra.fr>
Message-ID: <4AA138C8.2010904@fhcrc.org>

pleydell at supagro.inra.fr wrote:
> "Writing R Extensions" says
> 
> {quotes}
> If you have a crash which gives a core dump you can use something like
> 
>      gdb /path/to/R/bin/exec/R core.12345
> 
> to examine the core dump. If core dumps are disabled...
> {unquotes}
> 
> sadly it doesn't go on to say how to enable if core dumps are disabled.
> 
> I understand that in bash I need to do
> 
> $ ulimit -c unlimited
> 
> but this doesn't seem to be enough, I still don't find a core file despite
> 
>   *** caught segfault ***
>      address 0x20000028, 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: 1
> 
> 
> I am running Ubuntu jaunty on a laptop. Any ideas as to what I might need to
> configure next?

not really answering your question, but I find it more useful to

  R -d gdb

or

  R -d gdb -f test.R

where test.R reproduces the bug in some minimal code. A variant is

  R -d valgrind -f test.R

if the memory problem is not easy to spot.

Martin

> 
> thanks
> David
> 
> 
> 
> 
> 
>



[Rd] enabling core dumps
Martin Morgan