Bazel crashes instead of printing an error message when the --remote_http_cache
value is bad.
bazel build :all --remote_http_cache
Linux
bazel info release?0.15.0
bazel info release returns "development version" or "(@non-git)", tell us how you built Bazel.git remote get-url origin ; git rev-parse master ; git rev-parse HEAD ?Here is the stack trace:
java.lang.RuntimeException: java.lang.NullPointerException
at com.google.devtools.build.lib.remote.SimpleBlobStoreFactory.createRest(SimpleBlobStoreFactory.java:46)
at com.google.devtools.build.lib.remote.SimpleBlobStoreFactory.create(SimpleBlobStoreFactory.java:63)
at com.google.devtools.build.lib.remote.RemoteModule.beforeCommand(RemoteModule.java:167)
at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.execExclusively(BlazeCommandDispatcher.java:273)
at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.exec(BlazeCommandDispatcher.java:199)
at com.google.devtools.build.lib.server.GrpcServerImpl.executeCommand(GrpcServerImpl.java:855)
at com.google.devtools.build.lib.server.GrpcServerImpl.access$2100(GrpcServerImpl.java:111)
at com.google.devtools.build.lib.server.GrpcServerImpl$2.lambda$run$0(GrpcServerImpl.java:924)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
at com.google.devtools.build.lib.remote.blobstore.http.HttpBlobStore.
at com.google.devtools.build.lib.remote.SimpleBlobStoreFactory.createRest(SimpleBlobStoreFactory.java:42)
... 10 more
ERROR: bazel crash in async thread:
java.lang.RuntimeException: java.lang.NullPointerException
at com.google.devtools.build.lib.remote.SimpleBlobStoreFactory.createRest(SimpleBlobStoreFactory.java:46)
at com.google.devtools.build.lib.remote.SimpleBlobStoreFactory.create(SimpleBlobStoreFactory.java:63)
at com.google.devtools.build.lib.remote.RemoteModule.beforeCommand(RemoteModule.java:167)
at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.execExclusively(BlazeCommandDispatcher.java:273)
at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.exec(BlazeCommandDispatcher.java:199)
at com.google.devtools.build.lib.server.GrpcServerImpl.executeCommand(GrpcServerImpl.java:855)
at com.google.devtools.build.lib.server.GrpcServerImpl.access$2100(GrpcServerImpl.java:111)
at com.google.devtools.build.lib.server.GrpcServerImpl$2.lambda$run$0(GrpcServerImpl.java:924)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
at com.google.devtools.build.lib.remote.blobstore.http.HttpBlobStore.
at com.google.devtools.build.lib.remote.SimpleBlobStoreFactory.createRest(SimpleBlobStoreFactory.java:42)
... 10 more
Once --remote_http_cache is set to a value in .bazelrc, one cannot override the setting
and turn off use of the remote cache with a command line argument. I would expect that
--remote_http_cache="" might disable the remote cache, but it does not.
I'm experiencing the same thing, is there no way to turn off the remote cache once it has been enabled in bazelrc?
That surely sounds like an annoying bug. I'll make sure that it gets fixed.
Great to hear this will be fixed! If I may, I wanted to chime in with a specific use case: I occasionally want to use --disk_cache instead of the remote, but the two options are mutually exclusive. It would be great to have nullable options or to be able to unset them from overriding configs which I believe this feature will be fixed.
@vmrob @brown
FYI: There was a fix that disables remote cache in case am empty value provided, see #7650.
It is part of 0.25 release.
Most helpful comment
I'm experiencing the same thing, is there no way to turn off the remote cache once it has been enabled in bazelrc?