From ripley at stats.ox.ac.uk  Mon Apr 29 10:52:46 2013
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Mon, 29 Apr 2013 09:52:46 +0100
Subject: [Rd] cause 'invalid permissions'
In-Reply-To: <CAH9vowjUOcFhYC6TzqvwqW41Nk9Z5rXiehvARAD6oLqeOt0-mw@mail.gmail.com>
References: <CAH9vowjUOcFhYC6TzqvwqW41Nk9Z5rXiehvARAD6oLqeOt0-mw@mail.gmail.com>
Message-ID: <517E34DE.8050606@stats.ox.ac.uk>

On 28/04/2013 17:00, Maxpar Lin wrote:
> Hi folks,
>
> I am writing a package in C. It works most of the time, but fails
> occasionally by the segfault looking like:
>
> address 0x7f55302e2700, cause 'invalid permissions'
>
> Possible actions:
> 1: abort (with core dump, if enabled)
> 2: normal R exit
> 3: exit R without saving workspace
> 4: exit R saving workspace
>
> I tried gdb and it appears the application hangs at
>
> __kernel_vsyscall ()
>
> Since it happens randomly, I am not sure what is the exactly cause. Anyone
> reached the same problem? Any point is appreciated.

See the debugging section in 'Writing R Extensions' (and look at the 
call stack when you use gdb).  One of the tools there such as ASan or 
valgrind will likely pinpoint your error.

>
> Thanks.
>
> Max
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>


-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



[Rd] cause 'invalid permissions'
Prof Brian Ripley