[R-pkg-devel] debugging memory sanitation errors
Marcin Jurek
m@rc|njurek1988 @end|ng |rom gm@||@com
Mon Apr 20 19:00:09 CEST 2020
Hello so I keep getting my package turned back because of errors detected
by UBSAN. I am trying to catch it using r-hub's platform with UBSAN but
there are no errors thrown there. What would be a good way for me to debug
this.
Obviously I did R CMD check --as-cran on my own machine, and on Travis and
I can't detect a thing.
What surprises me is that this is a runtime error and I wonder why all the
systems I test it on give it a pass...
Thanks for suggestions!
Marcin
---------- Forwarded message ---------
From: Uwe Ligges <ligges using statistik.tu-dortmund.de>
Date: Sat, Apr 18, 2020 at 2:32 AM
Subject: Re: CRAN submission GPvecchia 0.1.3
To: Marcin Jurek <marcinjurek1988 using gmail.com>, CRAN <
cran-submissions using r-project.org>
Thanks, we see:
checking with clang-UBSAN still has
/data/gannet/ripley/R/test-clang/RcppArmadillo/include/armadillo_bits/subview_meat.hpp:1277:23:
runtime error: reference binding to null pointer of type 'const unsigned
int'
#0 0x7f8b9133b5ae in arma::subview<unsigned int>::colptr(unsigned
int)
/data/gannet/ripley/R/test-clang/RcppArmadillo/include/armadillo_bits/subview_meat.hpp:1277:12
#1 0x7f8b9133b5ae in arma::subview_col<unsigned
int>::subview_col(arma::Mat<unsigned int> const&, unsigned int, unsigned
int, unsigned int)
/data/gannet/ripley/R/test-clang/RcppArmadillo/include/armadillo_bits/subview_meat.hpp:3133:25
#2 0x7f8b913218d3 in arma::Col<unsigned int>::head(unsigned int)
/data/gannet/ripley/R/test-clang/RcppArmadillo/include/armadillo_bits/Col_meat.hpp:782:10
#3 0x7f8b913218d3 in clusterEqual(arma::Mat<double>, int, int)
/data/gannet/ripley/R/packages/incoming/GPvecchia.Rcheck/00_pkg_src/GPvecchia/src/fastTree.cpp:53:35
#4 0x7f8b9132722d in knotTree(arma::Mat<double>,
std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char> >, arma::Col<unsigned int>,
std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char> > >,
std::__1::allocator<std::__1::pair<std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > const,
arma::Col<unsigned int> > > >)
/data/gannet/ripley/R/packages/incoming/GPvecchia.Rcheck/00_pkg_src/GPvecchia/src/fastTree.cpp:241:21
#5 0x7f8b91328fae in generateNNarray(arma::Mat<double>,
arma::Col<unsigned int>, int, arma::Col<unsigned int>, int)
/data/gannet/ripley/R/packages/incoming/GPvecchia.Rcheck/00_pkg_src/GPvecchia/src/fastTree.cpp:279:39
#6 0x7f8b91267769 in _GPvecchia_generateNNarray
/data/gannet/ripley/R/packages/incoming/GPvecchia.Rcheck/00_pkg_src/GPvecchia/src/RcppExports.cpp:93:34
and others not from this package.
Please fix the issue reported above and resubmit.
Best,
Uwe Ligges
On 16.04.2020 00:37, CRAN submission wrote:
> [This was generated from CRAN.R-project.org/submit.html]
>
> The following package was uploaded to CRAN:
> ===========================================
>
> Package Information:
> Package: GPvecchia
> Version: 0.1.3
> Title: Scalable Gaussian-Process Approximations
> Author(s): Matthias Katzfuss [aut], Marcin Jurek [aut, cre], Daniel Zilber
> [aut], Wenlong Gong [aut], Joe Guinness [ctb], Jingjie Zhang
> [ctb], Florian Schaefer [ctb]
> Maintainer: Marcin Jurek <marcinjurek1988 using gmail.com>
> Suggests: mvtnorm, knitr, rmarkdown, testthat
> Description: Fast scalable Gaussian process approximations, particularly
> well suited to spatial (aerial, remote-sensed) and
> environmental data, described in more detail in Katzfuss and
> Guinness (2017) <arXiv:1708.06302>. Package also contains a
> fast implementation of the incomplete Cholesky decomposition
> (IC0), based on Schaefer et al. (2019) <arXiv:1706.02205> and
> MaxMin ordering proposed in Guinness (2018)
> <arXiv:1609.05372>.
> License: GPL (>=2)
> Imports: Rcpp (>= 0.12.16), methods, stats, sparseinv, fields,
> Matrix(>= 1.2.14), parallel, GpGp, FNN
> LinkingTo: Rcpp, RcppArmadillo, BH
>
>
> The maintainer confirms that he or she
> has read and agrees to the CRAN policies.
>
> Submitter's comment: ### Resubmission 5
> This is a fifth resubmission
>
> *
> fixed problems reported in
> https://cran.r-project.org/web/checks/check_results_GPvecchia.html
>
>
>
>
>
> ###
> Resubmission 4
> This is a fourth resubmission
>
> * fixed
> a problem with unmatched variable types encountered
> during the last submission:
> runtime error:
> reference binding to null pointer of type 'const
> unsigned
>
> other check results as in submission
> 3
>
>
>
>
>
>
> ### Resubmission 3
> This is a third
> resubmission
>
> * fixed the problem with variable types
> (unsigned int) in src/U_NZentries.cpp
>
>
> ## Test
> environments
> * local ubuntu 18.04, R 3.4.4
> * ubuntu
> 16.04 (Travis CI), R-devel
> * Windows Server 2008 R2
> SP1, R-devel, 32/64 bit (R-hub)
>
> There was 1 NOTE:
> *
> checking installed package size ... NOTE
> installed
> size is 7.0Mb
> sub-directories of 1Mb or more:
>
> libs 6.5Mb
>
> This is not unexpected in packages with
> compiled code as observed by Dirk
> Eddelbuettel
>
https://stackoverflow.com/questions/53819970/r-package-libs-directory-too-large-after-compilation-to-submit-on-cran
>
>
>
>
>
>
> ###
> Resubmission 2
> This is a second resubmission.
>
> *
> fixed an alloc-dealloc-mismatch error as reported
> here
>
> https://cran.r-project.org/web/checks/check_results_GPvecchia.html
>
>
> ##
> Test environments
> * local ubuntu 18.04, R 3.4.4
> *
> ubuntu 16.04 (Travis CI), R 3.6.1
> * local OS X
> install, R 3.5.1
>
> ## R CMD check results
> There were
> no ERRORs or WARNINGs under either Ubuntu
> version
>
> There were 2 NOTEs on Travis:
>
> * checking
> installed package size ... NOTE
> installed size is
> 5.1Mb
> sub-directories of 1Mb or more:
>
> libs
> 4.6Mb
>
> This is not unexpected in packages with
> compiled code as observed by Dirk
> Eddelbuettel
>
https://stackoverflow.com/questions/53819970/r-package-libs-directory-too-large-after-compilation-to-submit-on-cran
>
> *
> checking for hidden files and directories ... NOTE
>
> Found the following hidden files and directories:
>
> .travis.yml
> These were most likely included in
> error. See section ‘Package
> structure’ in the
> ‘Writing R Extensions’ manual.
>
> The said file is
> listed in .Rbuildignore and the note goes away in the
> local check of the build tarball
>
>
> There was 1 NOTE
> on local ubuntu installation:
>
> * checking installed
> package size ... NOTE
> installed size is 6.3Mb
>
> sub-directories of 1Mb or more:
> libs 5.9Mb
>
> See
> explanation above
>
>
>
> There was 1 WARNING under local
> OS X:
>
> * checking whether package ‘GPvecchia’
> can be installed (41.2s)
> Found the following
> significant warnings:
> Warning: package
> ‘GpGp’ was built under R version 3.5.2
>
> Local R
> version used for development is 3.5.1
>
>
>
> ##
> Downstream dependencies
> none
>
> =================================================
>
> Original content of DESCRIPTION file:
>
> Package: GPvecchia
> Type: Package
> Title: Scalable Gaussian-Process Approximations
> Version: 0.1.3
> Date: 2020-04-15
> Authors using R: c(
> person("Matthias", "Katzfuss", role=c("aut"), email="
katzfuss using gmail.com"),
> person("Marcin", "Jurek", role=c("aut", "cre"), email="
marcinjurek1988 using gmail.com"),
> person("Daniel", "Zilber", role="aut"),
> person("Wenlong", "Gong", role="aut"),
> person("Joe", "Guinness", role="ctb"),
> person("Jingjie", "Zhang", role="ctb"),
> person("Florian", "Schaefer", role="ctb"))
> Maintainer: Marcin Jurek <marcinjurek1988 using gmail.com>
> Author: Matthias Katzfuss [aut],
> Marcin Jurek [aut, cre],
> Daniel Zilber [aut],
> Wenlong Gong [aut],
> Joe Guinness [ctb],
> Jingjie Zhang [ctb],
> Florian Schaefer [ctb]
> Description: Fast scalable Gaussian process approximations, particularly
well suited to spatial (aerial, remote-sensed) and environmental data,
described in more detail in Katzfuss and Guinness (2017)
<arXiv:1708.06302>. Package also contains a fast implementation of the
incomplete Cholesky decomposition (IC0), based on Schaefer et al. (2019)
<arXiv:1706.02205> and MaxMin ordering proposed in Guinness (2018)
<arXiv:1609.05372>.
> License: GPL (>=2)
> Imports: Rcpp (>= 0.12.16), methods, stats, sparseinv, fields,
> Matrix(>= 1.2.14), parallel, GpGp, FNN
> LinkingTo: Rcpp, RcppArmadillo, BH
> RoxygenNote: 6.1.1
> Suggests: mvtnorm, knitr, rmarkdown, testthat
> VignetteBuilder: knitr
> NeedsCompilation: yes
> Packaged: 2020-04-15 22:36:32 UTC; marcin
>
[[alternative HTML version deleted]]
More information about the R-package-devel
mailing list