From simon.urbanek at r-project.org  Thu Dec  2 22:50:22 2010
From: simon.urbanek at r-project.org (Simon Urbanek)
Date: Thu, 2 Dec 2010 16:50:22 -0500
Subject: [Rd] segfault interest?
In-Reply-To: <1291323998.2840.122.camel@matt-laptop>
References: <AANLkTikfV39Sj+E=GfGL1a8+M+DUgzrF_n+uGKoMPowY@mail.gmail.com>
	<4CED3CA5.605@gmail.com>
	<AANLkTimfYVXRpOZZ5NAw=HaRuHzo6Bq_JPTYgccBZJp_@mail.gmail.com>
	<1291323998.2840.122.camel@matt-laptop>
Message-ID: <01DE9C09-DA2C-419E-8505-C36C8ABEEF0D@r-project.org>

Matt,

please use
R -d gdb
and then "bt" for a more useful trace.

Thanks,
Simon


On Dec 2, 2010, at 4:06 PM, Matt Shotwell wrote:

> On Wed, 2010-11-24 at 12:12 -0500, ivo welch wrote: 
>> I just figured out what is happening.  The root drive (presumably OSX
>> virtual memory) becomes depleted.  The error message about "memory not
>> mapped" was a hint, too.  So, not really R's fault.  However, I wonder
> 
> It still may be R's fault. This segfault occurs because R (or third
> party code called by R) attempts to access memory beyond what is
> allocated/mapped. It's very likely a programming error. A bug report is
> warranted, subject to Duncan's earlier comments. 
> 
> Does the segfault only occur when a memory limit is reached?
> 
> The top five functions in your traceback (below) are all defined in the
> base package...
> 
> -Matt
> 
> *** caught segfault *** 
> address 0xdc3f9b48, cause 'memory not mapped'
> Traceback:
> 1: rep.int(seq_len(nx), rep.int(rep.fac, nx))
> 2: rep.int(rep.int(seq_len(nx), rep.int(rep.fac, nx)), orep)
> 3: expand.grid(seq_len(nx), seq_len(ny))
> 4: merge.data.frame(d, ss)
> 5: merge(d, ss)
> 6: valid.range(opt)
> 7: eval.with.vis(expr, envir, enclos)
> 8: eval.with.vis(ei, envir)
> 9: source("fut-into-opts.R")
> 
>> whether R can be made to abort more gracefully, or at least trap the
>> error message and translate it into something more meaningful ("you
>> have run out of [virtual] memory when executing 'R statement' ").  of
>> course, this may not be possible at all.
>> 
>> /iaw
>> 
>> ______________________________________________
>> R-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
> 
> -- 
> Matthew S. Shotwell
> Graduate Student 
> Division of Biostatistics and Epidemiology
> Medical University of South Carolina
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
> 
>



[Rd] segfault interest?
Simon Urbanek