[Rcpp-devel] memory not mapped with Rcpp on Ubuntu
John Clarke
john.clarke at cornerstonenw.com
Thu Feb 13 15:17:48 CET 2025
Hey folks,
I've been developing an Rcpp package on my Mac and testing on Mac and
Windows. I also have been testing on linux-latest with the standard Github
action which runs the CMD check. These passed without any problem until I
implemented a test suite (testthat) and increased the test coverage to
include additional calls. It turns out that the two main functions (and
maybe others) that I wrote cause a segfault on Ubuntu builds. Several
versions on Linux are tested and all fail.
It appears to be related to Rcpp so I'm wondering if you've encountered
this before and how I might go about finding a solution. I can reproduce
the error on a local docker image consistently, but... I don't have the
debugging tools I"m used to on MacOS via VS Code to help me step through
when the error occurs. And I suspect it has to do with a mismatched library
version because the tests pass fine on Windows and MacOS. So not sure if
debugging would help much.
Is there a known configuration/compiling issue/fix that I could try? Apart
from installing a full fledged instance of Ubuntu with VS Code and
debugger, is there a way I can get closer to finding out what the issue is?
Clip from the failed R error messages when I call
shg$runSimFromFixedValues(N, 0, 0, 1940):
*** caught segfault ***
address (nil), cause 'memory not mapped'
Traceback:
1: .External(list(name = "CppMethod__invoke_notvoid", address = <pointer:
0x55efab6ef710>, dll = list(name = "Rcpp", path =
"/usr/local/lib/R/site-library/Rcpp/libs/Rcpp.so", dynamicLookup =
TRUE, handle = <pointer: 0x55efa9b64b30>, info = <pointer:
0x55efaa89aaa0>, forceSymbols = FALSE), numParameters = -1L), <pointer:
0x55efae9ae1f0>, <pointer: 0x55efaf2399d0>, .pointer, ...)
2: shg$runSimFromFixedValues(N, 0, 0, 1940)
Thanks,
-John
John Clarke | Senior Technical Advisor |
Cornerstone Systems Northwest | john.clarke at cornerstonenw.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20250213/ae8f45a9/attachment.htm>
More information about the Rcpp-devel
mailing list