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

Automatic PROOT_NO_SECCOMP #934

Closed
dtrudg opened this issue Aug 3, 2022 · 2 comments
Closed

Automatic PROOT_NO_SECCOMP #934

dtrudg opened this issue Aug 3, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@dtrudg
Copy link
Member

dtrudg commented Aug 3, 2022

Is your feature request related to a problem? Please describe.

In certain circumstances, proot may not operate correctly. E.g. newest RHEL 7 kernels, without setting the env var PROOT_NO_SECCOMP.

Describe the solution you'd like

Following on from #879 we should aim to streamline the process of using proot by setting the environment variable PROOT_NO_SECCOMP if an initial execution of proot fails.

We could either:

  • use a canary execution with proot, e.g. running /bin/true through proot before we run def file scripts, to ascertain whether PROOT_NO_SECCOMP should be used -or-
  • just retry executing with PROOT_NO_SECCOMP if the def file script execution fails with an appropriate error code.

The first (canary) approach is encouraged, as it avoids the def file execution returning an error that could be confused for a proot failure.

We should not set PROOT_NO_SECCOMP by default, as seccomp support provides significant performance improvements for proot.

Additional context

See #879 (comment) for some discussion.

See the changes in PR #879 in the build code for the location in which proot is used, and this PROOT_NO_SECCOMP handling needs to take effect.

@dtrudg dtrudg added enhancement New feature or request good first issue Good for newcomers labels Aug 3, 2022
@dtrudg dtrudg added this to the SingularityCE 3.11 milestone Aug 3, 2022
@dtrudg dtrudg changed the title Automative PROOT_NO_SECCOMP Automatic PROOT_NO_SECCOMP Aug 3, 2022
@dtrudg
Copy link
Member Author

dtrudg commented Oct 6, 2022

It appears the issue is a regression in latest proot, as it should auto detect whether to use seccomp or not - proot-me/proot#336

@dtrudg
Copy link
Member Author

dtrudg commented Dec 9, 2022

Since this is clearly a regression in proot, not a SingularityCE problem, and is tracked in their repo, I'm going to drop this from the 3.11 milestone, and will list the issue in errata.

We have quite a lot of code that is checking function of external binaries in brittle ways, and I'm keen not to add any more at this time. If it becomes a very large issue then it could be reconsidered for a 3.11.x patch release.

@dtrudg dtrudg self-assigned this Dec 9, 2022
@dtrudg dtrudg closed this as completed Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant