charliecloud icon indicating copy to clipboard operation
charliecloud copied to clipboard

running commands that use ch-run as root fails with non-obvious seccomp error

Open scothalverson opened this issue 1 year ago • 1 comments

I built Charliecloud with fakeroot support via seccomp, and unintentionally ran a ch-image build command on a Dockerfile with apt-get commands. This failed with the following error:

error: ch-run was not built with seccomp(2) support

Thinking I had built Charliecloud incorrectly, I rebuilt verifying seccomp support, but got the same error. After a quick debug with @reidpr he pointed out that running as root was the problem. This makes sense in hindsight, and was definitely a bad practice on my part. Nonetheless, an error message that conveyed that I should not run this command as root rather than one that suggested I did not have seccomp support would be helpful in case anyone else does this in the future.

scothalverson avatar Sep 20 '24 15:09 scothalverson

ch-run directly was also unhelpful, per debug session:

# ch-run --feature=seccomp
ch-run[3563719]: error: please report this bug (ch-run.c:635)

I believe this was under sudo(8).

reidpr avatar Sep 20 '24 19:09 reidpr