src/main/tools/linux-sandbox-pid1.cc:88: "mount": Operation not permitted

213 views
Skip to first unread message

xiaol...@gmail.com

unread,
Dec 11, 2016, 8:27:13 AM12/11/16
to bazel-discuss
When trying to build anything with the new sandbox and Ubuntu 12.04.5 LTS (GNU/Linux 3.2.0-29-generic x86_64),it fails with src/main/tools/linux-sandbox-pid1.cc:88: "mount": Operation not permitted.

root@LeiServer:~/lab# bazel run :random_agent --define headless=false -- --length=10000 --width=640 --height=480
....................
INFO: Found 1 target...
ERROR: /root/lab/BUILD:50:1: C++ compilation of rule '//:lburg' failed: linux-sandbox failed: error executing command /root/.cache/bazel/_bazel_root/223621a6357e7409f6ff6977f7adb92d/execroot/lab/_bin/linux-sandbox ... (remaining 40 argument(s) skipped).
src/main/tools/linux-sandbox-pid1.cc:88: "mount": Operation not permitted
Target //:random_agent failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 32.896s, Critical Path: 2.12s
ERROR: Build failed. Not running target.


bazel version
Build label: 0.4.2
Build target: bazel-out/local-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Wed Dec 7 18:47:11 2016 (1481136431)
Build timestamp: 1481136431
Build timestamp as int: 1481136431

Philipp Wollermann

unread,
Dec 11, 2016, 10:06:57 AM12/11/16
to xiaol...@gmail.com, bazel-discuss
Hi xiaolvyelei,

the kernel of Ubuntu 12.04 LTS is too old to support sandboxing (the old sandbox also shouldn't have worked).

Unfortunately it seems to fail in a way that the auto-detection of whether sandboxing works or not is broken and wrongly assumes that it should work. Mhm! I'll have to fix this.

The solution in your case is to disable sandboxing in your ~/.bazelrc via "build --spawn_strategy=standalone".

Hope that helps,
Philipp


--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/3c2b51fd-ed63-4a4b-85bc-1955f0f6bd95%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages