| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change ensures that the server process is terminated before the
client process terminates, when evaluating a command that shuts down
the server.
When completing such a command, the server communicates to the client
that the server will terminate itself by setting a termination_expected
bit in the final RunResponse message. The client then waits up to 60s
for the server process to actually terminate. If it does not, then the
client SIGKILLs the server.
Also makes the gRPC server stop accepting new commands before the
shutdown command completes.
Drive-by fix to comments on Search{Un,Null}aryOption.
RELNOTES: Commands that shut down the server (like "shutdown") now ensure that the server process has terminated before the client process terminates.
PiperOrigin-RevId: 161537480
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Under macOS, the default soft resource limits for open files and concurrent
processes are pretty low, but their corresponding hard defaults are
reasonable. Because the soft limits are low, Bazel sometimes fails during
large builds -- not because of Bazel itself, but because the executed
actions do "too much work" or because the --jobs setting was high enough
to cause all parallel tasks to exceed the limits.
Instead of trying to fix the actions themselves, start by trying to raise
the system limits as a best-effort operation. And, given that this code
is fairly portable, try to do it on all POSIX systems and not just macOS.
Note that, for non-macOS systems, this might still not do what's promised
in all circumstances because I'm currently only implementing
GetExplicitSystemLimit on macOS.
RELNOTES: None.
PiperOrigin-RevId: 161401482
|
|
|
|
|
|
|
|
| |
Instead, let's reuse the cross-platform {Get,Set,Unset}Env() functions
when possible.
Change-Id: I40b4ff09c66fe238d5b3d70e49f91705cea64b0c
PiperOrigin-RevId: 160870850
|
|
|
|
|
|
|
|
|
| |
file and not the server.
This is so that the server does as few things as possible before exec() (preferably, nothing) so that we don't accidentally call malloc() which would make it possible to deadlock if the server spawned multiple threads before ExecuteDaemon().
RELNOTES: None.
PiperOrigin-RevId: 155603273
|
|
|
|
|
|
|
|
|
| |
It provides a single and clean way to output warning messages,
and replaces the fprintf(stderr, "Warning: ...\n") or
fprintf(stderr, "WARNING: ...\n") calls.
Change-Id: I2f8a8f659085b9e57a08b5208a8b8f683a7cd72c
PiperOrigin-RevId: 155386233
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce a platform-specific file handle type
(HANDLE on Windows, int on Linux/Darwin/FreeBSD)
so we can get rid of the read_func and write_func
functions, since they are always the same
everywhere.
Also include file_platform.h in file.h, since they
are logically the same file (file_platform.h is
just the platform-specific part of file.h).
--
PiperOrigin-RevId: 148892736
MOS_MIGRATED_REVID=148892736
|
|
|
|
|
|
|
|
|
| |
This is only used in blaze_util_linux so move the
method there.
--
PiperOrigin-RevId: 142652521
MOS_MIGRATED_REVID=142652521
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move blaze::ReadFile and blaze::WriteFile to
file.h and file_platform.h (thus into the
blaze_util namespace), and update references.
This allows us to implement these methods in a
platform-specific way.
Also move UnlinkPath.
See https://github.com/bazelbuild/bazel/issues/2107
--
MOS_MIGRATED_REVID=140328273
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit repurposes file_posix.cc to be the
POSIX API file handling implementation, and adds
file_windows.cc for the Win32 API implementations.
Furthermore it introduces file_platform.h that
declares the interface.
Subsequent changes will replace POSIX API calls in
the rest of the C++ code with these abstract
methods.
Motivation: our code is so littered with
POSIX-isms that we need an abstraction layer if we
hope to compile it with MSVC.
--
MOS_MIGRATED_REVID=138615822
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously they returned nanoseconds but all call
sites converted those to milliseconds.
This is not only a simplification of the semantics
and renaming of the methods to make the returned
units and the purpose clear, but also preparation
for the Windows/MSVC implementations of these
methods.
--
MOS_MIGRATED_REVID=138383956
|
|
|
|
|
|
|
|
|
|
|
|
| |
Subsequent commits will move methods out of
src/main/cpp/blaze_util.cc and into file.h or
file_<platform>.cc. Many of those methods heavily
rely on the POSIX API, and we need to reimplement
them against the Win32 API to compile Bazel on
Windows using MSVC.
--
MOS_MIGRATED_REVID=135128504
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This method is only used by blaze_util_linux.cc so
instead of porting it to Windows, I'm moving it to
a separate library.
As part of this change I'm creating separate
libraries for other sources in //src/main/cpp/util
as well, so their dependencies are clearly defined
in the BUILD file, plus we can port them one by
one.
This is part of the effort of compiling Bazel on
Windows with the MSVC toolchain.
--
MOS_MIGRATED_REVID=134636777
|
|
|
|
|
|
|
|
|
| |
verifying the identity of the process killed on interrupt.
When the server dies, the client follows soon after, so this is kind of OK.
--
MOS_MIGRATED_REVID=133110872
|
|
|
|
|
|
|
|
| |
- Use an explicit cast to void to tell the compiler that we are intentionally ignoring return values.
- Delete the unused function GetPeerProcessId()
--
MOS_MIGRATED_REVID=132970162
|
|
|
|
|
|
|
|
|
| |
- Don't call setrlimit() (it was needed to make 32-bit JVMs work with >3GB heaps)
- Remove a non-functional way to tweak the Linux scheduler
- Cosmetic fixes
--
MOS_MIGRATED_REVID=132653426
|
|
|
|
|
|
|
| |
It is not really actionable and doesn't warn the user against real breakages, so there isn't much point.
--
MOS_MIGRATED_REVID=132541684
|
|
|
|
|
|
|
| |
KillServerProcess() so that we don't call malloc() in signal handlers.
--
MOS_MIGRATED_REVID=132232499
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Increase the ping timeout on connect from five to ten seconds. This gives
servers which may be suffering from gc pressure or other ailments extra time to
respond.
On the other end, wait for orphaned servers to really die before proceeding.
This prevents race conditions around the delivery of SIGKILL and the starting
of the new server.
This may make us fail slower when the server is having hard times, however it
should give us better determinism, and these conditions should be rare.
--
MOS_MIGRATED_REVID=130118918
|
|
|
|
|
|
|
|
|
|
|
| |
Darwin.
This is equivalent to what Xcode does with the directories that it generates as part its builds.
fix for https://github.com/bazelbuild/bazel/issues/1514
--
MOS_MIGRATED_REVID=127927131
|
|
|
|
|
|
|
|
| |
Closes #1419.
--
Reviewed-on: https://github.com/bazelbuild/bazel/pull/1419
MOS_MIGRATED_REVID=127326203
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=127319649
|
|
|
|
|
|
|
|
|
| |
handler in the client.
This makes Ctrl-C work on Windows somewhat: in particular, in non-batch mode and while no actions are running.
--
MOS_MIGRATED_REVID=125318172
|
|
|
|
|
|
|
|
|
| |
doesn't exist.
It may be an old version that doesn't know how to write them yet.
--
MOS_MIGRATED_REVID=121462577
|
|
|
|
|
|
|
|
|
|
|
| |
actually a server process.
This should be implemented for other OSes, too, but OS X seems to lack a procfs and it's not clear how to discover anything about a process based on its PID and of course, Windows is a wholly different cup of tea.
More work for #930.
--
MOS_MIGRATED_REVID=121262673
|
|
|
|
|
|
| |
--
Reviewed-on: https://github.com/bazelbuild/bazel/pull/571
MOS_MIGRATED_REVID=107471259
|
|
|
|
|
|
|
|
|
| |
back to getpwuid())
Also a minor compatibility fix in a sed invocation.
--
MOS_MIGRATED_REVID=106291639
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
std::to_string is not avcaliable on mingw.
--
MOS_MIGRATED_REVID=98923935
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
port.cc implements sys_ioprio_set() function, but was not including the
header that declares it.
Also included port.h in blaze_util_linux.cc for iwyu, since that file is
using sys_ioprio_set().
--
Change-Id: Ie6130df9ed72e8125d07f72455fc53a03afedbc1
Reviewed-on: https://bazel-review.googlesource.com/#/c/1321/
MOS_MIGRATED_REVID=93868707
|
|
|
|
|
|
|
|
|
| |
Now that our toolchain supports stdint.h, we don't need to provide our
custom types ourselves through numbers.h.
--
Change-Id: I01de083e735e5cd64bcca723b19c55b9429632b7
MOS_MIGRATED_REVID=92840495
|
|
|
|
|
|
|
|
|
|
|
|
| |
The header only uses std::string, std::vector, int and char types, and
thus all these headers do not need to be included there.
If necessary, they should be included in the relevant source files
instead.
--
Change-Id: Id1849a0f427016dcf732fe6bfc673e599e8d4b14
MOS_MIGRATED_REVID=92192506
|
|
|
|
|
|
|
|
| |
This is so util/ files do not depend on anything from higer level.
--
Change-Id: I522be6722851f25e79d9c2b85275856cbbd978de
MOS_MIGRATED_REVID=91882837
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=91681168
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Looks like in the transition it was forgotten to be moved to the new
location.
As an effect of this change it was discovered that file.cc had an
dependency back on blaze_util.cc (from client binary for die/pdie functions).
In order to fix that dependency we have had to move die/pdie functions into
util library (added errors.(cc|h)) for this.
Tested on Linux with the following command lines:
$ ./compile.sh
$ ./output/bazel build //src/main/cpp:all
$ ./output/bazel build //src:bazel
$ ./bootstrap_test.sh all
--
Change-Id: I70fb1b6189dc5af31f816332d76efe380ef26302
MOS_MIGRATED_REVID=90987514
|
|
|
|
|
|
|
|
| |
This should avoid making unnecessary string copies.
--
Change-Id: I655f348ddeb3df47264a899a10d36086d2c2b596
MOS_MIGRATED_REVID=90614260
|
|
|
|
|
|
|
|
|
|
| |
Also Fallback the default ouput root to /var/tmp if $HOME is not set
under Linux. If $HOME environment variable was not set, Bazel would
crash with a std::logic_error. Using getpwuid() make Bazel more
resilient to wrong environment.
--
MOS_MIGRATED_REVID=89292008
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=89144546
|
|
--
MOE_MIGRATED_REVID=85702957
|