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

windows,testing: bazel_bootstrap_distfile_test is slow #4503

Open
laszlocsomor opened this Issue Jan 22, 2018 · 1 comment

Comments

Projects
None yet
1 participant
@laszlocsomor
Copy link
Contributor

laszlocsomor commented Jan 22, 2018

Description of the problem / feature request:

//src/test/shell/bazel:bazel_bootstrap_distfile_test is very slow on Windows.

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

I added logging between most operations in the test, after it took 48 minutes to run.

With the logging, it took 53 min, but I kept using the machine the whole time so some variance is to be expected. Still, these numbers are noteworthy:

Log:

INFO: Found 1 test target...
DEBUG[Mon Jan 22 18:02:46 WEST 2018]  10 Test start
(...)
DEBUG[Mon Jan 22 18:03:39 WEST 2018]  20 setup complete
DEBUG[Mon Jan 22 18:03:39 WEST 2018]  30 run suite
(...)

** test_bootstrap **************************************************************
DEBUG[Mon Jan 22 18:03:40 WEST 2018]  40 start test
DEBUG[Mon Jan 22 18:03:40 WEST 2018]  50 start unzip
DEBUG[Mon Jan 22 18:05:31 WEST 2018]  60 start find
DEBUG[Mon Jan 22 18:26:02 WEST 2018]  70 start compile.sh
(...)
DEBUG[Mon Jan 22 18:55:27 WEST 2018]  80 done test
(...)
DEBUG[Mon Jan 22 18:03:40 WEST 2018] 90 done rm
PASSED: test_bootstrap

What operating system are you running Bazel on?

Windows 10.

What's the output of bazel info release?

0.10.0 rc4

@laszlocsomor

This comment has been minimized.

Copy link
Contributor

laszlocsomor commented Jan 22, 2018

Since find & chmod is unnecessary on Windows, I'll start with putting that line behind an if.

@laszlocsomor laszlocsomor self-assigned this Jan 23, 2018

bazel-io pushed a commit that referenced this issue Jan 23, 2018

bazel_bootstrap_distfile_test: don't find & chmod
Do not run "find & chmod" on the extracted files,
because:
(a) it's unnecessary, we can delete them in the
    trap statement just fine, and
(b) it takes an impressive 20 minutes on Windows,
    probably because process creation is a lot
    slower on Windows than on Unixes and each
    `chmod` runs as a subprocess of `find`

See #4503

Change-Id: I47d97f00b875716997c197a51602fb6ea7728109
PiperOrigin-RevId: 182905086

bazel-io pushed a commit that referenced this issue Jan 29, 2018

windows,test: add logging to bootstrap test
Add logging to bazel_bootstrap_distfile_test in
case it is running on Windows. The logging will
help collect basic performance stats.

Also remove the %N placeholder from `date` format
string in the log messages, because macOS doesn't
support it.

See #4503

Change-Id: Idf00bf1512d02a793b27e1cc761fbcd630e79618
PiperOrigin-RevId: 183642578
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment