commit | 83785c35e6d23abd24d30cc5eab36b0561b8eb5b | [log] [tgz] |
---|---|---|
author | George Burgess IV <gbiv@google.com> | Thu Jun 18 18:10:27 2020 -0700 |
committer | George Burgess <gbiv@chromium.org> | Sat Jun 20 01:50:41 2020 +0000 |
tree | e0cb6b836b21f861ab942ae2c1a52471a245e776 | |
parent | 2efe72e635474b402b4cd456f51c0bc5989931aa [diff] |
wrapper: fork() before exec()ing This CL is a wild guess that tries to work around what appears to be an incredibly rare Go runtime bug (https://github.com/golang/go/issues/24484). As mentioned on the chromium bug, apparently execve is taking a while... somehow, and `pthread_create` fails with `EAGAIN` concurrently. So the intent here is to `fork()` + `exec()`. `fork()` will a) dispose of the thread that's trying to `pthread_create` b) isolate the `exec` in its own process, so the parent's runtime can spin up as many threads as it likes in peace. This slows down an 'ideal' kernel build (aka a build where ccache is a 100% hit rate, so the compiler wrapper's overheads are very pronounced) by ~4% in my measurements. BUG=chromium:1095528 TEST=sdk tryjob; CQ Change-Id: I73e1b238738b74c85def4709c09610f586fb04e5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2252552 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>
toolchain-utils
Various utilities used by the Chrome OS toolchain team.
To run Python scripts in this directory, first run:
export PYTHONPATH=$(readlink -f .):$PYTHONPATH
from this directory.
Then you can run any script.
To get help on any script, type in python <script> --help
, or refer to the header of the script for more information.