-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
"Could not copy" (Operation not permitted) when compiling in a docker container #51266
Comments
syscall_326 is Seems the |
I just took a brief look at this. @mattgodbolt The compiler recently started to support @alexcrichton Technically, this bug's cause is misconfiguration of docker. However, to avoid issues like this in the future, it may make sense to add "EPERM" to the fallback error cases here https://github.com/rust-lang/rust/blob/master/src/libstd/sys/unix/fs.rs#L905 What do you think? |
As I think more about it, we should definitely add E_PERM to the fallback error cases. If we have a "real" permission denied (in the sense that file permissions are not sufficient), we would get the error earlier here https://github.com/rust-lang/rust/blob/master/src/libstd/sys/unix/fs.rs#L870 . So there's actually no downside to adding E_PERM to the fallback error cases. I'll file a PR. |
One more note: EPERM isn't even a valid error code for copy_file_range according to http://man7.org/linux/man-pages/man2/copy_file_range.2.html . More documentation on docker + seccomp can be found here: https://docs.docker.com/engine/security/seccomp/ |
Thanks @nicokoch - I'll look to update |
I've confirmed a newer docker fixes the issues too. Thanks so much for the quick responses here! |
fs: copy: Add EPERM to fallback error conditions Fixes #51266
I'm the maintainer of Compiler Explorer, and recently (in the last 2-3 days) the nightly build of Rust has started reporting an error when I try and compile using it from within a Docker container:
The same compile works just fine outside of a container. The
strace
call yields the problem call:It seems whatever "syscall_18446744073709551615" is, it's getting
EPERM
.Cross checking from outside a docker container:
in this case things succeed (although the syscall_326, whatever that is still fails, but with
ENOSYS
).Can anyone shed any light on this as this is outside of my experience! As I say, it only happens on the nightly build, and it has started happening in the last day or two (e.g. sometime around 29th May 2018).
I wonder if some new (unsupported on Ubuntu 16) libc function is being called, and in the docker environment
EPERM
is returned instead ofENOSYS
, which confuses some bailout code inrustc
?Thanks in advance, Matt
(See also compiler-explorer/compiler-explorer#942 )
The text was updated successfully, but these errors were encountered: