Skip to content
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 test cannot have both --experimental_sandbox_base=/dev/shm and --sandbox_tmpfs_path=/dev/shm #5051

Open
rtsai opened this issue Apr 19, 2018 · 3 comments
Assignees
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) stale Issues or PRs that are stale (no activity for 30 days) team-Documentation Documentation improvements that cannot be directly linked to other team labels team-Local-Exec Issues and PRs for the Execution (Local) team type: documentation (cleanup)

Comments

@rtsai
Copy link

rtsai commented Apr 19, 2018

Description of the problem / feature request:

Configuring both --experimental_sandbox_base=/dev/shm and --sandbox_tmpfs_path=/dev/shm causes the following error:

bazel test ...
ERROR: /home/robtsai/verb/sandbox_base/BUILD:8:1: C++ compilation of rule '//:true_test' failed (Exit 1).
src/main/tools/linux-sandbox-pid1.cc:174: "mount(/dev/shm/bazel-sandbox.551b950f452dff6462d586cb13cc223e/450305183730770813/execroot/listener_example, /dev/shm/bazel-sandbox.551b950f452dff6462d586cb13cc223e/450305183730770813/execroot/listener_example, nullptr, MS_BIND, nullptr)": No such file or directory

Feature requests: what underlying problem are you trying to solve with this feature?

I am trying to improve sandboxing performance by using --experimental_sandbox_base=/dev/shm, but then realized I also have --sandbox_tmpfs_path pointing at the same place.

My understanding is that --experimental_sandbox_base is for the build host, while --sandbox_tmpfs_path is relative to the sandbox

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Sample workspace attached.

sandbox_example.tar.gz

What operating system are you running Bazel on?

Ubuntu 16.04.4 LTS

What's the output of bazel info release?

Happens in both:

  • release 0.7.0
  • release 0.12.0

If bazel info release returns "development version" or "(@non-git)", tell us how you built Bazel.

N/A

What's the output of git remote get-url origin ; git rev-parse master ; git rev-parse HEAD ?

N/A

Have you found anything relevant by searching the web?

No

Any other information, logs, or outputs that you want to share?

@c-parsons c-parsons added P2 We'll consider working on this in future. (Assignee optional) category: sandboxing labels Apr 21, 2018
@jin jin added untriaged team-Local-Exec Issues and PRs for the Execution (Local) team and removed P2 We'll consider working on this in future. (Assignee optional) labels Feb 20, 2019
@jmmv
Copy link
Contributor

jmmv commented Sep 11, 2019

Passing both of these flags pointing to the same location seems like the wrong thing to do, so I understand that what you are requesting here is a better error message? I think that's the only reasonable thing we could do.

@jmmv jmmv added P3 We're not considering working on this, but happy to review a PR. (No assignee) type: documentation (cleanup) and removed category: sandboxing untriaged labels Sep 11, 2019
@rtsai
Copy link
Author

rtsai commented Sep 11, 2019

I think a better error message makes sense.

If I recall (it's been a while), I think I may have been interpreting those options as simply pointing to a mount point (e.g., fast RAM disk) and wanting bazel to figure everything else out for me.

I think what you might be suggesting is that for my use case, I should have either defined two separate RAM disks, or two different subdirectories, for the two options.

@susinmotion susinmotion self-assigned this May 13, 2020
@sgowroji sgowroji added the team-Documentation Documentation improvements that cannot be directly linked to other team labels label Jan 11, 2023
Copy link

Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 90 days unless any other activity occurs. If you think this issue is still relevant and should stay open, please post any comment here and the issue will no longer be marked as stale.

@github-actions github-actions bot added the stale Issues or PRs that are stale (no activity for 30 days) label Mar 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) stale Issues or PRs that are stale (no activity for 30 days) team-Documentation Documentation improvements that cannot be directly linked to other team labels team-Local-Exec Issues and PRs for the Execution (Local) team type: documentation (cleanup)
Projects
None yet
Development

No branches or pull requests

6 participants