From tlumley at u.washington.edu  Tue Apr 11 22:23:42 2006
From: tlumley at u.washington.edu (Thomas Lumley)
Date: Tue, 11 Apr 2006 13:23:42 -0700 (PDT)
Subject: [Rd] Stack checking, core dumps, and embedding R
In-Reply-To: <1abe3fa90604111312x177f6e4ds4e66b813c9833a00@mail.gmail.com>
References: <1abe3fa90604110234v1b4958c0w1e51e2b49f7ff9c5@mail.gmail.com>
	<Pine.LNX.4.64.0604111121440.30083@gannet.stats.ox.ac.uk>
	<1abe3fa90604111312x177f6e4ds4e66b813c9833a00@mail.gmail.com>
Message-ID: <Pine.LNX.4.64.0604111319060.10029@homer22.u.washington.edu>

On Tue, 11 Apr 2006, A.J. Rossini wrote:

> On 4/11/06, Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:
>> On Tue, 11 Apr 2006, A.J. Rossini wrote:
>>
>>> I will say this first -- I can't copy/paste the error message from the
>>> screen, so it's being retyped.  Errors might occur.  SORRY.
>>>
>>> I've been experiencing some interesting stack warnings recently when
>>> moving from R 2.2.x to the R 2.3.0 series and the R 2.4.0 series.  In
>>> particular, I'm getting warnings of "Error: C stack usage is too close
>>> to the limit" before segfaulting, and this wasn't happening under the
>>> 2.2.x series.
>
> Okay, using 2-2-patched, I'm fine.
> Using 2-3-patched and R-devel, I'm not fine (stack warnings and segfaulting).

The 2.2.x series didn't have the stack checker -- it was added for 2.3.0 
-- so you would expect the stack warnings to be limited to 2.3.x (though 
not necessarily the segfaults)

>
> What is the precise incantation for setting the stack?   using
> "--max-ppsize=N"    didn't seem to help my problem (for values of N of
> 5000, 25000, 50000 -- should I try others?)

No, it's the C stack, not the R pointer protection stack.

With tcsh this is
   limits stacksize 50000 
or ulimit with bash


 	-thomas

Thomas Lumley			Assoc. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle



[Rd] Stack checking, core dumps, and embedding R
Thomas Lumley