[Rd] Segfault reporting: memory not mapped error

Martin Maechler maechler at stat.math.ethz.ch
Wed Oct 28 09:06:34 CET 2009


>>>>> Blair Christian <blair.christian at gmail.com>
>>>>>     on Sun, 25 Oct 2009 15:42:36 -0400 writes:

    > Is this the right place to report segfaults?
    > spc$ R CMD BATCH driver.q rOut.txt
    > spc$ tail -16 rOut.txt /Library/Frameworks/R.framework/Resources/bin/BATCH:
    > line 60:  5461 Segmentation fault      ${R_HOME}/bin/R -f ${in} ${opts}
    > ${R_BATCH_OPTIONS} > ${out} 2>&1

    > *** caught segfault ***
    > address 0x3f095116, cause 'memory not mapped'

    > Traceback:
    > 1: .Call("La_dgesv", a, b, tol, PACKAGE = "base")
    > 2: solve.default(iV0)
    > 3: solve(iV0)
    > 4: standardGeneric("solve")
    > 5: solve(iV0)
    > 6: w0.fullCond(curr.sample, x at internals@values, x at priors@values)
    > 7: gsSampler(down.univ.gs)
    > 8: standardGeneric("gsSampler")
    > 9: gsSampler(down.univ.gs)
    > 10: univDownStatic(o3Jun21, internal.vals, prior.vals, init.vals,
    > param.dims)
    > aborting ...


    >> sessionInfo()
    > R version 2.9.2 (2009-08-24)
    > i386-apple-darwin8.11.1

    > locale:
    > en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8

    > attached base packages:
    > [1] stats     graphics  grDevices utils     datasets  methods   base


    > I also got this error once:
    > Error: segfault from C stack overflow

    > Any thoughts would be appreciated.  I have no personal C code, and it looks
    > like the matrix I pass to solve is too ill conditioned?  
Yes, maybe.
But the underlying LAPACK code that is eventually called from
the above .Call(...)
should *never* seg.fault

On the other hand the  "C stack overflow" you've seen is a bad
sign (of other C code your R code calls).

    > Let me know what
    > other info I can use to help figure out the problem. I saw several of these
    > on the R-help but wasn't sure which was the best place to report.

    > Thx, Blair

The most important thing is to provide a self-contained
reproducible example (as the footer of every R-help message has:)
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.

Only then there's a good chance that the problem can be
addressed at all.

Martin Maechler, ETH Zurich



More information about the R-devel mailing list