Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRAN issues #20

Closed
jwijffels opened this issue Jul 30, 2020 · 2 comments
Closed

CRAN issues #20

jwijffels opened this issue Jul 30, 2020 · 2 comments

Comments

@jwijffels
Copy link
Contributor

jwijffels commented Jul 30, 2020

Putting here compilation issues at CRAN machines

@jwijffels
Copy link
Contributor Author

jwijffels commented Jul 30, 2020

image.CornerDetectionHarris

Check Details

Version: 0.1.0
Check: examples
Result: ERROR
    Running examples in 'image.CornerDetectionHarris-Ex.R' failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: image_harris
    > ### Title: Find Corners using Harris Corner Detection
    > ### Aliases: image_harris
    >
    > ### ** Examples
    >
    > library(magick)
    Linking to ImageMagick 6.9.10.23
    Enabled features: fontconfig, freetype, fftw, lcms, pango, webp, x11
    Disabled features: cairo, ghostscript, rsvg
    Using 3 threads
    > path <- system.file(package = "image.CornerDetectionHarris",
    + "extdata", "building.png")
    > x <- image_read(path)
    > pts <- image_harris(x)
    double free or corruption (!prev)
    Aborted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 0.1.0
Check: examples
Result: ERROR
    Running examples in ‘image.CornerDetectionHarris-Ex.R’ failed
    The error most likely occurred in:
    
    > ### Name: image_harris
    > ### Title: Find Corners using Harris Corner Detection
    > ### Aliases: image_harris
    >
    > ### ** Examples
    >
    > library(magick)
    Linking to ImageMagick 7.0.10.18
    Enabled features: cairo, fontconfig, freetype, fftw, ghostscript, lcms, pango, rsvg, webp, x11
    Disabled features:
    Using 24 threads
    > path <- system.file(package = "image.CornerDetectionHarris",
    + "extdata", "building.png")
    > x <- image_read(path)
    > pts <- image_harris(x)
    OMP: Warning #96: Cannot form a team with 6 threads, using 2 instead.
    OMP: Hint Consider unsetting KMP_DEVICE_THREAD_LIMIT (KMP_ALL_THREADS), KMP_TEAMS_THREAD_LIMIT, and OMP_THREAD_LIMIT (if any are set).
    double free or corruption (!prev)
Flavor: r-devel-linux-x86_64-fedora-clang

Version: 0.1.0
Check: whether package can be installed
Result: ERROR
    Installation failed.
Flavor: r-release-macos-x86_64 
  • noOMP
* installing *source* package ‘image.CornerDetectionHarris’ ...
** package ‘image.CornerDetectionHarris’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
make[1]: Entering directory '/data/gannet/ripley/R/packages/tests-noOMP/image.CornerDetectionHarris/src'
/usr/local/clang-noOMP/bin/clang++ -std=gnu++11 -I"/data/gannet/ripley/R/R-clang-noOMP/include" -DNDEBUG  -I'/data/gannet/ripley/R/test-clang/Rcpp/include' -isystem /usr/local/clang/include   -fpic  -g -O3 -Wall -pedantic -frtti  -c RcppExports.cpp -o RcppExports.o
/usr/local/clang-noOMP/bin/clang++ -std=gnu++11 -I"/data/gannet/ripley/R/R-clang-noOMP/include" -DNDEBUG  -I'/data/gannet/ripley/R/test-clang/Rcpp/include' -isystem /usr/local/clang/include   -fpic  -g -O3 -Wall -pedantic -frtti  -c gaussian.cpp -o gaussian.o
/usr/local/clang-noOMP/bin/clang++ -std=gnu++11 -I"/data/gannet/ripley/R/R-clang-noOMP/include" -DNDEBUG  -I'/data/gannet/ripley/R/test-clang/Rcpp/include' -isystem /usr/local/clang/include   -fpic  -g -O3 -Wall -pedantic -frtti  -c gradient.cpp -o gradient.o
/usr/local/clang-noOMP/bin/clang++ -std=gnu++11 -I"/data/gannet/ripley/R/R-clang-noOMP/include" -DNDEBUG  -I'/data/gannet/ripley/R/test-clang/Rcpp/include' -isystem /usr/local/clang/include   -fpic  -g -O3 -Wall -pedantic -frtti  -c harris.cpp -o harris.o
/usr/local/clang-noOMP/bin/clang++ -std=gnu++11 -I"/data/gannet/ripley/R/R-clang-noOMP/include" -DNDEBUG  -I'/data/gannet/ripley/R/test-clang/Rcpp/include' -isystem /usr/local/clang/include   -fpic  -g -O3 -Wall -pedantic -frtti  -c interpolation.cpp -o interpolation.o
/usr/local/clang-noOMP/bin/clang++ -std=gnu++11 -I"/data/gannet/ripley/R/R-clang-noOMP/include" -DNDEBUG  -I'/data/gannet/ripley/R/test-clang/Rcpp/include' -isystem /usr/local/clang/include   -fpic  -g -O3 -Wall -pedantic -frtti  -c rcpp_harris.cpp -o rcpp_harris.o
/usr/local/clang-noOMP/bin/clang++ -std=gnu++11 -I"/data/gannet/ripley/R/R-clang-noOMP/include" -DNDEBUG  -I'/data/gannet/ripley/R/test-clang/Rcpp/include' -isystem /usr/local/clang/include   -fpic  -g -O3 -Wall -pedantic -frtti  -c zoom.cpp -o zoom.o
rcpp_harris.cpp:8:10: fatal error: 'omp.h' file not found
#include <omp.h>
         ^~~~~~~
1 error generated.
make[1]: *** [/data/gannet/ripley/R/R-clang-noOMP/etc/Makeconf:174: rcpp_harris.o] Error 1
make[1]: Target 'all' not remade because of errors.
make[1]: Leaving directory '/data/gannet/ripley/R/packages/tests-noOMP/image.CornerDetectionHarris/src'
ERROR: compilation failed for package ‘image.CornerDetectionHarris’
* removing ‘/data/gannet/ripley/R/packages/tests-noOMP/image.CornerDetectionHarris.Rcheck/image.CornerDetectionHarris’
  • gcc-ASAN
* using log directory ‘/data/gannet/ripley/R/packages/tests-gcc-SAN/image.CornerDetectionHarris.Rcheck’
* using R Under development (unstable) (2020-07-27 r78912)
* using platform: x86_64-pc-linux-gnu (64-bit)
* using session charset: UTF-8
* using option ‘--no-stop-on-test-error’
* checking for file ‘image.CornerDetectionHarris/DESCRIPTION’ ... OK
* checking extension type ... Package
* this is package ‘image.CornerDetectionHarris’ version ‘0.1.0’
* package encoding: UTF-8
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking whether package ‘image.CornerDetectionHarris’ can be installed ... [50s/28s] OK
* checking package directory ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking loading without being on the library search path ... OK
* checking compiled code ... OK
* checking examples ... ERROR
Running examples in ‘image.CornerDetectionHarris-Ex.R’ failed
The error most likely occurred in:

> ### Name: image_harris
> ### Title: Find Corners using Harris Corner Detection
> ### Aliases: image_harris
> 
> ### ** Examples
> 
> library(magick)
Linking to ImageMagick 6.9.11.22
Enabled features: cairo, fontconfig, freetype, fftw, ghostscript, lcms, pango, rsvg, webp, x11
Disabled features: 
Using 24 threads
> path <- system.file(package = "image.CornerDetectionHarris", 
+                     "extdata", "building.png")
> x    <- image_read(path)
> pts  <- image_harris(x)
=================================================================
==971254==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6210003ffc00 at pc 0x7f05f4468640 bp 0x7ffdb3732630 sp 0x7ffdb3732620
WRITE of size 8 at 0x6210003ffc00 thread T0
    #0 0x7f05f446863f in discrete_gaussian(float*, float*, int, int, float, int) [clone ._omp_fn.1] /data/gannet/ripley/R/packages/tests-gcc-SAN/image.CornerDetectionHarris/src/gaussian.cpp:339
    #1 0x7f0605702f45 in GOMP_parallel (/lib64/libgomp.so.1+0x12f45)
    #2 0x7f05f446c183 in discrete_gaussian(float*, float*, int, int, float, int) /data/gannet/ripley/R/packages/tests-gcc-SAN/image.CornerDetectionHarris/src/gaussian.cpp:327
    #3 0x7f05f446c9ed in gaussian(float*, float*, int, int, float, int, int) /data/gannet/ripley/R/packages/tests-gcc-SAN/image.CornerDetectionHarris/src/gaussian.cpp:402
    #4 0x7f05f448e4b6 in harris(float*, std::vector<harris_corner, std::allocator<harris_corner> >&, int, int, int, float, float, float, float, int, int, int, int, int, int, int) /data/gannet/ripley/R/packages/tests-gcc-SAN/image.CornerDetectionHarris/src/harris.cpp:499
    #5 0x7f05f448ea05 in harris_scale(float*, std::vector<harris_corner, std::allocator<harris_corner> >&, int, int, int, int, float, float, float, float, int, int, int, int, int, int, int) /data/gannet/ripley/R/packages/tests-gcc-SAN/image.CornerDetectionHarris/src/harris.cpp:565
    #6 0x7f05f44a24d6 in detect_corners(Rcpp::Vector<14, Rcpp::PreserveStorage>, int, int, float, float, float, float, int, int, int, int, int, int, int, int, int) /data/gannet/ripley/R/packages/tests-gcc-SAN/image.CornerDetectionHarris/src/rcpp_harris.cpp:35
    #7 0x7f05f44228f2 in _image_CornerDetectionHarris_detect_corners /data/gannet/ripley/R/packages/tests-gcc-SAN/image.CornerDetectionHarris/src/RcppExports.cpp:30
    #8 0x57b565 in R_doDotCall /data/gannet/ripley/R/svn/R-devel/src/main/dotcode.c:669
    #9 0x58527c in do_dotcall /data/gannet/ripley/R/svn/R-devel/src/main/dotcode.c:1281
    #10 0x62584b in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7114
    #11 0x66d567 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:723
    #12 0x672834 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1888
    #13 0x674ce4 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1814
    #14 0x643fae in bcEval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:7082
    #15 0x66d567 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:723
    #16 0x672834 in R_execClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1888
    #17 0x674ce4 in Rf_applyClosure /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:1814
    #18 0x66de2f in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:846
    #19 0x67a689 in do_set /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:2960
    #20 0x66e258 in Rf_eval /data/gannet/ripley/R/svn/R-devel/src/main/eval.c:798
    #21 0x6ecadd in Rf_ReplIteration /data/gannet/ripley/R/svn/R-devel/src/main/main.c:264
    #22 0x6ed128 in R_ReplConsole /data/gannet/ripley/R/svn/R-devel/src/main/main.c:314
    #23 0x6ed274 in run_Rmainloop /data/gannet/ripley/R/svn/R-devel/src/main/main.c:1113
    #24 0x6ed2c2 in Rf_mainloop /data/gannet/ripley/R/svn/R-devel/src/main/main.c:1120
    #25 0x41b378 in main /data/gannet/ripley/R/svn/R-devel/src/main/Rmain.c:29
    #26 0x7f0604bbe041 in __libc_start_main (/lib64/libc.so.6+0x27041)
    #27 0x41daed in _start (/data/gannet/ripley/R/gcc-SAN/bin/exec/R+0x41daed)

0x6210003ffc00 is located 0 bytes to the right of 4864-byte region [0x6210003fe900,0x6210003ffc00)
allocated by thread T0 here:
    #0 0x7f06062b41d7 in operator new[](unsigned long) (/lib64/libasan.so.6+0xb21d7)
    #1 0x7f05f4466dd2 in discrete_gaussian(float*, float*, int, int, float, int) [clone ._omp_fn.1] /data/gannet/ripley/R/packages/tests-gcc-SAN/image.CornerDetectionHarris/src/gaussian.cpp:331
    #2 0x7f0605702f45 in GOMP_parallel (/lib64/libgomp.so.1+0x12f45)
    #3 0x7f05f0ddf7ff  (<unknown module>)

SUMMARY: AddressSanitizer: heap-buffer-overflow /data/gannet/ripley/R/packages/tests-gcc-SAN/image.CornerDetectionHarris/src/gaussian.cpp:339 in discrete_gaussian(float*, float*, int, int, float, int) [clone ._omp_fn.1]
Shadow bytes around the buggy address:
  0x0c4280077f30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c4280077f40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c4280077f50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c4280077f60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c4280077f70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c4280077f80:[fa]fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c4280077f90: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c4280077fa0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c4280077fb0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c4280077fc0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c4280077fd0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc
==971254==ABORTING
* checking for detritus in the temp directory ... OK
* DONE
Status: 1 ERROR

Message from CRAN:
image.CornerDetectionHarris assumes omp.h unconditionally: see 'Writing R Extensions'.

@jwijffels
Copy link
Contributor Author

Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant