[R-pkg-devel] weird C stack traces from win-builder, due to brms/rstan load?

Ben Bolker bbo|ker @end|ng |rom gm@||@com
Mon Jul 5 20:16:29 CEST 2021



On 7/5/21 2:01 PM, Duncan Murdoch wrote:
> On 05/07/2021 10:32 a.m., Ben Bolker wrote:
>>    I'm running into trouble checking a new release of the 'broom.mixed'
>> package <https://cran.r-project.org/web/packages/broom.mixed/index.html>
>> on win-builder.  I think it is some kind of rstan problem.
>>
>>     The broom.mixed package loads the brms package, and loads several
>> pre-computed objects from the brms package; I don't think it actually
>> tries to run anything of the functions from brms during the check 
>> process.
>>
>>     At several points during checking (see
>> <https://win-builder.r-project.org/LsDDMqpnX52n/00check.log>), I get
>> voluminous "C stack trace" outputs: once when "Checking dependencies in
>> R code", once when calling require(brms) as part of an example, once
>> when running the tests (not easy to determine the precise location, and
>> once when building the vignettes).
>>
>>     The trace starts like this:
>>
>> ==== C stack trace ===============================
>>
>>     SETCAR [0x0x6c838a90+32]
>>     ZN4Rcpp8CppClassC1EPNS_6ModuleEPNS_10class_BaseERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE 
>> [0x0x6ac093ff+1151]
>>     ZN4Rcpp6Module12classes_infoEv [0x0x6ac07467+327]
>>     Z20Module__classes_infoP7SEXPREC [0x0x6abe1c4a+74]
>>     Rf_NewFrameConfirm [0x0x6c7a7d18+33960]
>>     R_initAssignSymbols [0x0x6c7f3259+53849]
>>     Rf_eval [0x0x6c7fcd31+369]
>> ...
>>
>>     and goes on for a while.
>>
>>     R CMD check runs fine on Linux with recent r-devel.
>>
>>     Has anyone seen this?  Other than scrubbing all references to brms
>> and rstan (a second try with one of the brms references avoided instead
>> runs into trouble when loading rstan ...), I don't see what I can do ...
>>
>> <https://win-builder.r-project.org/YArr24tuYZ8G/00check.log>
>>
> 
> What error do you get before the stack trace?
> 
> The Z... names look like C++ entry points to overloaded functions or 
> methods.  There's a command line function (c++filt) that will usually 
> turn those into their original readable form.  It's not working for me 
> on the names you've got; maybe because I'm on a Mac, and that was 
> compiled on Windows.  Perhaps someone else knows how to demangle those 
> names?
> 
> Duncan Murdoch

   No obvious errors at all before the stack trace. I'm pretty sure that 
the stack trace is caused by the *act of loading the rstan package*.

   I guess the next thing to do would be to make a dummy package that 
does *nothing* but try to load rstan ... ?

=---

Here's the start of the text the first time this appears:

* checking dependencies in R code ... NOTE

==== C stack trace ===============================
	SETCAR [0x0x6c838a90+32]
	ZN4Rcpp8CppClassC1EPNS_6ModuleEPNS_10class_BaseERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE [0x0x6ac093ff+1151]
---


   Here is another example:


Error(s) in re-building vignettes:
--- re-building 'broom_mixed_intro.rmd' using rmarkdown

Attaching package: 'dplyr'

The following objects are masked from 'package:stats':

     filter, lag

The following objects are masked from 'package:base':

     intersect, setdiff, setequal, union

Loading required package: brms
Loading required package: Rcpp

==== C stack trace ===============================

	SETCAR [0x0x6c838a90+32]
>



More information about the R-package-devel mailing list