-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Insufficient system resources exist to complete the requsted service. #8676
Comments
/cc @meisterT |
Can you try with an explicit argument for |
Great idea! I didn't think about it. Unfortunately I will test it on Monday. |
Unfortunately PS H:\> bazel --host_jvm_args=-Xmx4g info
FATAL: ExecuteProgram(C:\Users\krzyskar/_bazel_krzyskar/install/388981886003af3376cd5aa448ae98ff/_embedded_binaries/embe
dded_tools/jdk/bin/java.exe) failed: ERROR: src/main/native/windows/process.cc(184): CreateProcessW("C:\Users\krzyskar\_
bazel_krzyskar\install\388981886003af3376cd5aa448ae98ff\_embedded_binaries\embedded_tools\jdk\bin\java.exe" -XX:+HeapDu
mpOnOutOfMemoryError -XX:HeapDumpPath=c:\\\users\\\krzy(...)): Insufficient system resources exist to complete the reque
sted service. krzyskar@COMPUTERNAME MINGW64 /c/projects
$ bazel --host_jvm_args=-Xmx4g info
FATAL: ExecuteProgram(C:\Users\krzyskar/_bazel_krzyskar/install/388981886003af3376cd5aa448ae98ff/_embedded_binaries/embedded_tools/jdk/bin/java.exe) failed: ERROR: src/main/native/windows/process.cc(184): CreateProcessW("C:\Users\krzyskar\_bazel_krzyskar\install\388981886003af3376cd5aa448ae98ff\_embedded_binaries\embedded_tools\jdk\bin\java.exe" -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=c:\\\users\\\krzy(...)): Insufficient system resources exist to complete the requested service. I tried also setting the initial memory allocation pool without luck PS H:\> bazel --host_jvm_args=-Xms2G --host_jvm_args=-Xmx16G info
FATAL: ExecuteProgram(C:\Users\krzyskar/_bazel_krzyskar/install/388981886003af3376cd5aa448ae98ff/_embedded_binaries/embe
dded_tools/jdk/bin/java.exe) failed: ERROR: src/main/native/windows/process.cc(184): CreateProcessW("C:\Users\krzyskar\_
bazel_krzyskar\install\388981886003af3376cd5aa448ae98ff\_embedded_binaries\embedded_tools\jdk\bin\java.exe" -XX:+HeapDu
mpOnOutOfMemoryError -XX:HeapDumpPath=c:\\\users\\\krzy(...)): Insufficient system resources exist to complete the reque
sted service. More info: PS H:\> C:\Users\krzyskar\_bazel_krzyskar\install\388981886003af3376cd5aa448ae98ff\_embedded_binaries\embedded_tools\jdk
\bin\java.exe -version
openjdk version "11.0.2" 2019-01-15 LTS
OpenJDK Runtime Environment Zulu11.29+3-CA (build 11.0.2+7-LTS)
OpenJDK 64-Bit Server VM Zulu11.29+3-CA (build 11.0.2+7-LTS, mixed mode) |
Update
0.27.1 is not working as well. Is it possible to use "external" JDK? |
You can point Bazel to a different JDK with |
Thank you @meisterT . I should check out the doc first.
Interesting thing.
|
To my own surprise, I can repro this!
I'll try to investigate. |
More info:
CreateProcess fails with ERROR_NO_SYSTEM_RESOURCES. And https://bugzilla.mozilla.org/show_bug.cgi?id=1460995 seems very relevant:
|
And that is indeed the problem! Here: bazel/src/main/native/windows/process.cc Lines 166 to 187 in 6d0b14b
EXTENDED_STARTUPINFO_PRESENT , and use a STARTUPINFOW instead of STARTUPINFOEXW and let the subprocess inherit none of the handles, bazel run works. (And also prints to the console.)
|
On Windows 7, the subprocess cannot inherit console handles via the attribute list (CreateProcessW fails with ERROR_NO_SYSTEM_RESOURCES). However, if we: - don't specify STARTF_USESTDHANDLES in STARTUPINFOW::dwFlags, and - set CreateProcessW:bInheritHandles to FALSE, then we disallow inheriting the current process' open and inheritable handles. Confusingly though, if on top of that we: - don't specify CREATE_NEW_CONSOLE nor DETACHED_PROCESS in CreateProcessW, and then, in this special case, the subprocess *does* inherit the console handles, but nothing else (i.e. none of the inheritable, open file handles for example). This is arguably confusing but seems to work and do exactly what we need: for the subprocess to inherit the console handles and nothing else. bazelbuild#8676
On Windows 7, the subprocess cannot inherit console handles via the attribute list (CreateProcessW fails with ERROR_NO_SYSTEM_RESOURCES). However, if we: - don't specify STARTF_USESTDHANDLES in STARTUPINFOW::dwFlags, and - set CreateProcessW:bInheritHandles to FALSE, then we disallow inheriting the current process' open and inheritable handles. However, if on top of that we also: - don't specify CREATE_NEW_CONSOLE nor DETACHED_PROCESS in CreateProcessW:dwCreationFlags, then, in this special case, the subprocess *does* inherit the console handles, but nothing else (i.e. none of the inheritable, open file handles for example). This is rather confusing, but seems to work and do exactly what we need: for the subprocess to inherit the console handles and nothing else. #8676 Closes #8793. PiperOrigin-RevId: 256546818
On Windows 7, the subprocess cannot inherit console handles via the attribute list (CreateProcessW fails with ERROR_NO_SYSTEM_RESOURCES). However, if we: - don't specify STARTF_USESTDHANDLES in STARTUPINFOW::dwFlags, and - set CreateProcessW:bInheritHandles to FALSE, then we disallow inheriting the current process' open and inheritable handles. However, if on top of that we also: - don't specify CREATE_NEW_CONSOLE nor DETACHED_PROCESS in CreateProcessW:dwCreationFlags, then, in this special case, the subprocess *does* inherit the console handles, but nothing else (i.e. none of the inheritable, open file handles for example). This is rather confusing, but seems to work and do exactly what we need: for the subprocess to inherit the console handles and nothing else. bazelbuild#8676 Closes bazelbuild#8793. PiperOrigin-RevId: 256546818
Fixed by #8793 |
On Windows 7, the subprocess cannot inherit console handles via the attribute list (CreateProcessW fails with ERROR_NO_SYSTEM_RESOURCES). However, if we: - don't specify STARTF_USESTDHANDLES in STARTUPINFOW::dwFlags, and - set CreateProcessW:bInheritHandles to FALSE, then we disallow inheriting the current process' open and inheritable handles. However, if on top of that we also: - don't specify CREATE_NEW_CONSOLE nor DETACHED_PROCESS in CreateProcessW:dwCreationFlags, then, in this special case, the subprocess *does* inherit the console handles, but nothing else (i.e. none of the inheritable, open file handles for example). This is rather confusing, but seems to work and do exactly what we need: for the subprocess to inherit the console handles and nothing else. bazelbuild#8676 Closes bazelbuild#8793. PiperOrigin-RevId: 256546818
Description of the problem / feature request:
Bazel installed by scoop or downlaoded binary crashes on run.
Prerequisites + curl + versions/python27 installed.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
What operating system are you running Bazel on?
What's the output of
bazel info release
?Have you found anything relevant by searching the web?
https://stackoverflow.com/questions/56564539/how-do-i-give-bazel-more-resources
Temporary solution:
Install bazel@0.25.0, 0.26.0 is not working as well.
The text was updated successfully, but these errors were encountered: