aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/worker/WorkerFactory.java
Commit message (Collapse)AuthorAge
* Add the workspace name to the sandbox path for sandboxed workers.Gravatar philwo2017-08-18
| | | | PiperOrigin-RevId: 165571541
* When a worker can no longer be used, because one or more of its files on ↵Gravatar philwo2017-08-17
| | | | | | | disk have changed since it was launched, print *which* files have changed. RELNOTES: Improved logging when workers have to be restarted due to its files having changed. PiperOrigin-RevId: 165419664
* worker: Do not check if the process is still alive prior to using it.Gravatar philwo2017-04-28
| | | | | | | | | | | | | | | This might sound strange at first, but the reasoning is this: A worker should never simply exit. Bazel controls the lifetime of its subprocesses, so a worker quitting is considered a failure (also because it cannot be distinguished from a crash). With that set, we can improve two things: - Bazel will now only notice that a worker crashed / quit when it tries to use one during a build. This is also the only time when we can print error messages to the user. Earlier we might have noticed that a worker crashed during validation, but had no mechanism to alert the user to this, because this wasn't necessarily during a build. - This also fixes a race condition where a worker is still alive during validation, then quits, then the WorkerSpawnStrategy tries to send a WorkRequest, which fails, triggering an IOException. This fixes the flaky test test_worker_restarts_after_exit (which is now called test_build_fails_when_worker_exits). Part of #2855. RELNOTES: Bazel will no longer gracefully restart workers that crashed / quit, instead this triggers a build failure. PiperOrigin-RevId: 154470257
* Add support for sandboxing persistent workers.Gravatar Philipp Wollermann2016-09-28
| | | | | -- MOS_MIGRATED_REVID=134523222
* workers: Improve verbose messages when workers are restarted. Prevent ↵Gravatar Philipp Wollermann2016-05-24
| | | | | | | | | | | | | | | | | killing of broken workers in the background, when no build is currently running, because we can only alert the user about what's going on while a build is currently running. If you're a developer, this will probably help you when debugging a new worker. Some messages you might see with --worker_verbose specified: INFO: Worker configuration has changed, restarting worker pool... WARNING: Javac worker (id 6) can no longer be used, because its files have changed on disk [13ce6c10546243b6b4ea2334dd3f8a55705e4c078cedd0e746d7ad7cee082e9a -> 9731223c50bab5c1f20d60d1a4967cf2726840727b6a639b6f6425547a9b4a10]. WARNING: Javac worker (id 4) can no longer be used, because its process terminated itself or got killed. -- MOS_MIGRATED_REVID=123093071
* Fix #837: worker_verbose flag has no effect.Gravatar Philipp Wollermann2016-05-19
| | | | | | | Due to reusing an old Reporter instead of grabbing the current one for each build, verbose messages were lost and not printed to the console. Also adds a test for this feature. -- MOS_MIGRATED_REVID=122639383
* workers: Restart worker processes when their binary has changed since they ↵Gravatar Philipp Wollermann2015-11-05
| | | | | | | were launched. -- MOS_MIGRATED_REVID=107050157
* Rationalize copyright headersGravatar Damien Martin-Guillerez2015-09-25
| | | | | | | | | | | The headers were modified with `find . -type f -exec 'sed' '-Ei' 's|Copyright 201([45]) Google|Copyright 201\1 The Bazel Authors|' '{}' ';'` And manual edit for not Google owned copyright. Because of the nature of ijar, I did not modified the header of file owned by Alan Donovan. The list of authors were extracted from the git log. It is missing older Google contributors that can be added on-demand. -- MOS_MIGRATED_REVID=103938715
* workers: Put all tests in bazel_worker_test.sh. Add a testbed that makes it ↵Gravatar Philipp Wollermann2015-09-21
| | | | | | | easy to test details of how the worker strategy behaves in corner cases. -- MOS_MIGRATED_REVID=103541927
* workers: A multitude of bug fixes and improved logging.Gravatar Philipp Wollermann2015-09-14
| | | | | | | | | | | | | | | | | | | | | | | I know this should have been split up, but I was a bit on fire today and did it all in one go ^^; Fixes spurious "Stream closed: Stream closed" errors, by noticing dead workers and retrying with a fresh one. (Configurable with the --worker_max_retries flag.) Fixes an "IllegalArgumentException" when a non-worker compatible Spawn is given to the strategy. We fall back to StandaloneSpawnStrategy now. Redirect the stderr of worker processes to separate log files in a common sub-directory and print a message that tells you about the location on worker start-up for easier debugging. The log can be found in <output_base>/worker-logs/*.log. Adds the mnemonic of the Spawn to log messages and the log filename. Adds verbose messages on worker start-up and shutdown. (Enable it with --worker_verbose!) Shuts down the worker pool after a build finished by default, until we sort out one last remaining correctness issue. This also conserves resources, though makes incremental builds a bit slower. Want the maximum performance anyway? Try --experimental_workers_keep_running. Adds stack traces to errors that are caused by buggy workers to aid development. Fixes weird dupli..tripli..quadruple error messages ("Compiling failed: Stream closed: Stream closed: Stream closed: Stream closed."). -- MOS_MIGRATED_REVID=102983853
* Code cleanupGravatar Laurent Le Brun2015-09-03
| | | | | -- MOS_MIGRATED_REVID=102239051
* Implement persistent worker processes and a spawn strategy that uses them.Gravatar Philipp Wollermann2015-06-10
This will be used by the persistent JavaBuilder, which improves performance of Java compilation by 4x due to profiting from JVM JIT optimizations and not having to relaunch the JVM for every spawn. It is completely generic though, so as long as a tool (ProGuard? Dexer? Whatever.) conforms to the Worker process protocol, it can use the new spawn strategy. -- MOS_MIGRATED_REVID=95527132