rhub icon indicating copy to clipboard operation
rhub copied to clipboard

I wasn't able to reproduce the CRAN clang asan ubsan warnings and errors using the Fedora rhub docker image

Open mlampros opened this issue 1 year ago • 1 comments

First of all thank you for making this repository publicly available.

I currently have clang asan ubsan issues with a couple of my RcppArmadillo packages (OpenImageR, fastGLCM) and I used one of the rhub docker images (rhub/fedora-clang-devel-san) to reproduce and fix these issues. I wasn't sure if I have to open the issue here or in the rhub-linux-builders repository

I realized that reproducing the clang-asan-ubsan issues is not feasible because currently the rhub dockerfile uses by default the fedora:33 docker image whereas the latest Fedora version is 37 . I was able to retrieve this fedora version also from the Docker API

I am aware of the related rhub issue where the fedora version was set to version 33 in the Dockerfile, because I received initially also the R_HOME ('/opt/R-devel/lib64/R') not found error and during my search on the web I stumbled upon the cause which I also describe in the README.md file of the repository that I created (by including the url's). This seems to be a 'glibc' issue (as mentioned in the thread). The temporary solution (proposed in the thread) was to include one of the following two commands in the docker run command (runtime):

  • --cap-add=SYS_PTRACE --security-opt seccomp=unconfined
  • --security-opt seccomp=unconfined

What I did in my repo was to include an R script to retrieve the latest Fedora version (currently 37) using the Docker API and to also slightly modify the 3 related Dockerfiles from the rhub-linux-builders repository (Dockerfile_fedora, Dockerfile_fedora_clang, Dockerfile_fedora_clang_san). Thank you for all your work. Then I created a new Docker image based on the latest fedora version which by default installs the LLVM-Clang version 14.0.5 which is close to the one used currently by CRAN (14.0.6) on Fedora 34. This docker image is created using a Github action

Based on this docker image I was able to reproduce the CRAN Clang asan ubsan issues in both packages (OpenImageR, fastGLCM) both from the command line and from within an R session

I don't know how rhub works internally but there might be a quick fix using one of the two runtime commands

  • --cap-add=SYS_PTRACE --security-opt seccomp=unconfined
  • --security-opt seccomp=unconfined

I'll ping the ones that might be interested in this issue (based on issue 464 and issue 462) @gaborcsardi @maelle

mlampros avatar Aug 24 '22 13:08 mlampros

Thanks, this is very valuable! We hope to improve the container that runs the ASAN checks in the near future.

gaborcsardi avatar Aug 31 '22 11:08 gaborcsardi

This issue is about the previous R-hub system, it does not apply to the new system, so I am closing it now. Please see https://r-hub.github.io/rhub/ for the new system, R-hub v2.

gaborcsardi avatar May 09 '24 12:05 gaborcsardi