-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Bazel sandboxing not supported WSL #4619
Comments
I'm not surprised that the I can't see where this exception could come from in our code and can't find the string "Sandbox is not supported" either :( We'll have to try to reproduce it. @neilbalch Could you try your build with |
How interesting. When I get home today, I will try that command. |
oops, didn't realize what the "Close and Comment" button did. |
Nope, @philwo same error:
|
@philwo And you said you can't reproduce this error on another WSL installation? |
@neilbalch This is a custom patch we have at robotics. If you pull the latest version, we have upgraded bazel and switched to using a hard-coded spawn strategy per @philwo 's advice in another ticket. The code isn't really set up to build outside the sandbox. |
@neilbalch, How are you grabbing the latest version of Bazel and trying that? We've got a hermetic Bazel set up so it is versioned with the repo, not with your host. |
@AustinSchuh I was trying both |
@neilbalch Looks like we haven't dropped that patch yet, but did also add Philipp's suggested workaround (--spawn_strategy=linux-sandbox). I'll ditch it next time we upgrade. Please remove |
@AustinSchuh Other than errors with the
The errors in |
After talking with @brian-peloton, it seems likely that the issues with WSL and sandboxing support stem from an improper implementation of unshare. Is this mendable by us or is this a limitation that must be resolved by the WSL team? |
No, I haven't tried yet to reproduce it myself. I just couldn't see where that error might come from, from looking through the sandboxing code. But @AustinSchuh said that you were running a custom version of Bazel, so that explains it :)
I was about to write a long reply regarding why this could never work in WSL and that I won't be able to work on this in the short-term, but that's pretty exciting! If someone wants to give it a try, I'm happy to review pull requests for this. For now, I would recommend to try building without sandboxing ( |
@philwo We are passing in |
That's interesting. My past experience with WSL was trying unshare on the command line and seeing lots of failures, but it sounds like they're working on that. Might be worth looking into in that case. |
I'll close this, as I won't have any time to look into it in the next months. If someone wants to contribute patches that improve support for WSL, I'd be happy to review them, though. |
Description of the problem / feature request:
Feature requests: what underlying problem are you trying to solve with this feature?
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
?What's the output of
git remote get-url origin ; git rev-parse master ; git rev-parse HEAD
?The two elipsis above are there to hide the server address. The proper remote shows up in reality.
Have you found anything relevant by searching the web?
I have tried to search other places on the web, but I haven't found anything like this yet.
The text was updated successfully, but these errors were encountered: