Bazel 0.4.3
OS X El Capitan 10.11.6
Building tensorflow, command: bazel build ...
java.lang.IllegalStateException: java.io.IOException: getconf failed
at com.google.devtools.build.lib.sandbox.SandboxModule.executorInit(SandboxModule.java:42)
at com.google.devtools.build.lib.buildtool.ExecutionTool.<init>(ExecutionTool.java:191)
at com.google.devtools.build.lib.buildtool.BuildTool.buildTargets(BuildTool.java:146)
at com.google.devtools.build.lib.buildtool.BuildTool.processRequest(BuildTool.java:344)
at com.google.devtools.build.lib.runtime.commands.BuildCommand.exec(BuildCommand.java:65)
at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.execExclusively(BlazeCommandDispatcher.java:517)
at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.exec(BlazeCommandDispatcher.java:332)
at com.google.devtools.build.lib.runtime.CommandExecutor.exec(CommandExecutor.java:49)
at com.google.devtools.build.lib.server.GrpcServerImpl.executeCommand(GrpcServerImpl.java:733)
at com.google.devtools.build.lib.server.GrpcServerImpl.access$1500(GrpcServerImpl.java:101)
at com.google.devtools.build.lib.server.GrpcServerImpl$4$1.run(GrpcServerImpl.java:800)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: getconf failed
at com.google.devtools.build.lib.sandbox.DarwinSandboxedStrategy.getConfStr(DarwinSandboxedStrategy.java:140)
at com.google.devtools.build.lib.sandbox.DarwinSandboxedStrategy.create(DarwinSandboxedStrategy.java:112)
at com.google.devtools.build.lib.sandbox.SandboxActionContextProvider.create(SandboxActionContextProvider.java:69)
at com.google.devtools.build.lib.sandbox.SandboxModule.executorInit(SandboxModule.java:40)
... 13 more
Caused by: com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 71
at com.google.devtools.build.lib.shell.Command.waitForProcessToComplete(Command.java:884)
at com.google.devtools.build.lib.shell.Command.access$000(Command.java:117)
at com.google.devtools.build.lib.shell.Command$2.get(Command.java:721)
at com.google.devtools.build.lib.shell.Command.execute(Command.java:281)
at com.google.devtools.build.lib.shell.Command.execute(Command.java:257)
at com.google.devtools.build.lib.sandbox.DarwinSandboxedStrategy.getConfStr(DarwinSandboxedStrategy.java:138)
... 16 more
java.lang.IllegalStateException: java.io.IOException: getconf failed
at com.google.devtools.build.lib.sandbox.SandboxModule.executorInit(SandboxModule.java:42)
at com.google.devtools.build.lib.buildtool.ExecutionTool.<init>(ExecutionTool.java:191)
at com.google.devtools.build.lib.buildtool.BuildTool.buildTargets(BuildTool.java:146)
at com.google.devtools.build.lib.buildtool.BuildTool.processRequest(BuildTool.java:344)
at com.google.devtools.build.lib.runtime.commands.BuildCommand.exec(BuildCommand.java:65)
at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.execExclusively(BlazeCommandDispatcher.java:517)
at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.exec(BlazeCommandDispatcher.java:332)
at com.google.devtools.build.lib.runtime.CommandExecutor.exec(CommandExecutor.java:49)
at com.google.devtools.build.lib.server.GrpcServerImpl.executeCommand(GrpcServerImpl.java:733)
at com.google.devtools.build.lib.server.GrpcServerImpl.access$1500(GrpcServerImpl.java:101)
at com.google.devtools.build.lib.server.GrpcServerImpl$4$1.run(GrpcServerImpl.java:800)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: getconf failed
at com.google.devtools.build.lib.sandbox.DarwinSandboxedStrategy.getConfStr(DarwinSandboxedStrategy.java:140)
at com.google.devtools.build.lib.sandbox.DarwinSandboxedStrategy.create(DarwinSandboxedStrategy.java:112)
at com.google.devtools.build.lib.sandbox.SandboxActionContextProvider.create(SandboxActionContextProvider.java:69)
at com.google.devtools.build.lib.sandbox.SandboxModule.executorInit(SandboxModule.java:40)
... 13 more
Caused by: com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 71
at com.google.devtools.build.lib.shell.Command.waitForProcessToComplete(Command.java:884)
at com.google.devtools.build.lib.shell.Command.access$000(Command.java:117)
at com.google.devtools.build.lib.shell.Command$2.get(Command.java:721)
at com.google.devtools.build.lib.shell.Command.execute(Command.java:281)
at com.google.devtools.build.lib.shell.Command.execute(Command.java:257)
at com.google.devtools.build.lib.sandbox.DarwinSandboxedStrategy.getConfStr(DarwinSandboxedStrategy.java:138)
... 16 more
Do we still have the machine where this happened? Is this reproducible all the time, or did it happen only once?
I currently don't have an idea why a call to getconf would fail. From the man page, it should never fail given the variable names we ask of it :(
I just ran into this, for future searchers: running bazel shutdown fixed the issue. I can't figure out what I did to cause it, but it seems like the bazel server had been running for a while.
I just had this error (v0.23):
ERROR: Failed to initialize sandbox: getconf failed
I had just logged out and logged in, so the Bazel daemon existed, but session state would have changed, if that matters. I hadn't seen this message, I didn't try shutdown, I had to kill with Activity Monitor, the process wasn't being killed with kill -9.
This repros. I logged out and in again, and again got getconf failed. This time I ran shutdown and it fixed it.
@kastiglione That sounds like a different bug. Can you please file a new issue with your information regarding that? I'm happy to give this a look.
@philwo created here: https://github.com/bazelbuild/bazel/issues/7692
Most helpful comment
I just ran into this, for future searchers: running
bazel shutdownfixed the issue. I can't figure out what I did to cause it, but it seems like the bazel server had been running for a while.