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

[CI][Crossbow] Nightly R with sanitizers build fails installing dependencies #23275

Closed
asfimport opened this issue Oct 21, 2019 · 5 comments
Closed

Comments

@asfimport
Copy link

See https://circleci.com/gh/ursa-labs/crossbow/4006 for example. Failure looks like this:

...
g++ -fsanitize=address,undefined,bounds-strict -fno-omit-frame-pointer -std=gnu++11 -I"/usr/local/RDsan/lib/R/include" -DNDEBUG  -I'/usr/local/RDsan/lib/R/site-library/Rcpp/include' -I'/usr/local/RD/lib/R/library/BH/include' -I/usr/local/include  -I. -Ircon -fpic  -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -O0 -Wall -pedantic  -c TokenizerWs.cpp -o TokenizerWs.o

cc1plus: out of memory allocating 65536 bytes after a total of 31866880 bytes

cc1plus: out of memory allocating 65536 bytes after a total of 52080640 bytes
virtual memory exhausted: Cannot allocate memory
virtual memory exhausted: Cannot allocate memory
/usr/local/RDsan/lib/R/etc/Makeconf:175: recipe for target 'Collector.o' failed
make[1]: *** [Collector.o] Error 1
make[1]: *** Waiting for unfinished jobs....
/usr/local/RDsan/lib/R/etc/Makeconf:175: recipe for target 'CollectorGuess.o' failed
make[1]: *** [CollectorGuess.o] Error 1
/usr/local/RDsan/lib/R/etc/Makeconf:175: recipe for target 'Reader.o' failed
make[1]: *** [Reader.o] Error 1
/usr/local/RDsan/lib/R/etc/Makeconf:175: recipe for target 'TokenizerWs.o' failed
make[1]: *** [TokenizerWs.o] Error 1
make[1]: Leaving directory '/tmp/RtmpvSXO7m/R.INSTALL992bafde57/readr/src'
ERROR: compilation failed for packagereadr’
* removing ‘/usr/local/RDsan/lib/R/site-library/readrError: Failed to install 'decor' from GitHub:
  (converted from warning) installation of one or more packages failed,
  probablyreadrExecution halted
ERROR: Service 'r-sanitizer' failed to build: The command '/bin/sh -c RDsan -e "remotes::install_github('romainfrancois/decor')"' returned a non-zero code: 1

Some thoughts:

  • This dependency is not needed to run the tests--it is a developer dependency, only needed when you're editing the Rcpp code. So we could conditionally not install it if we're on CI.

  • The docker code around this changed in ARROW-6918 last week, around the time this started failing. The installation of this package was moved to a different part of the job, and it appears that MAKEVARS=-j8 was added. Maybe that's causing more memory to be used concurrently? (Also, I would be shocked if CircleCI gave us a VM with 8 cores, so this seems wasteful and should probably be tuned to whatever the current system has.)

    cc @pitrou @fsaintjacques

Reporter: Neal Richardson / @nealrichardson
Assignee: Neal Richardson / @nealrichardson

PRs and other links:

Note: This issue was originally created as ARROW-6957. Please see the migration documentation for further details.

@asfimport
Copy link
Author

Antoine Pitrou / @pitrou:
The message "cc1plus: out of memory allocating 65536 bytes after a total of 31866880 bytes" clearly means that the VM doesn't have enough memory. Perhaps we should make the MAKEVARS configurable or something, and use a lower number on Circle CI.

If R didn't have an entirely braindead build system, it would be able to choose the optimal number of cores by itself. I chose 8 because it worked well for my machine, but of course it won't be optimal for another machine...

Perhaps a R expert can suggest a better way to choose the number of cores. You know those experts better than I do :)

 

@asfimport
Copy link
Author

Neal Richardson / @nealrichardson:
Does docker provide a shell for the ENV command such that MAKEFLAGS=-j$(getconf _NPROCESSORS_ONLN) or similar would work (https://stackoverflow.com/a/23569003/11897522) ?

@asfimport
Copy link
Author

Antoine Pitrou / @pitrou:
I don't know. Perhaps a Docker expert may be able to answer...

@asfimport
Copy link
Author

Francois Saint-Jacques / @fsaintjacques:
$(nproc) should do it, it's part of coreutils very high chance it is installed. 

@asfimport
Copy link
Author

Neal Richardson / @nealrichardson:
Issue resolved by pull request 5986
#5986

@asfimport asfimport added this to the 0.16.0 milestone Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants