-
Notifications
You must be signed in to change notification settings - Fork 18k
syscall: CLONE_NEWTIME can't be used with SysProcAttr.Cloneflags #49779
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
Comments
The |
Sounds right, but if |
I looked into this and am unsure how to proceed because Some helpful background on time namespaces that might help someone looking at this:
|
See also #51246. |
We don't have a good way to rebuild the files in syscall. We don't worry about it because the syscall package is frozen (http://golang.org/s/go1.4-syscall). For purposes of this work it would be OK to manually copy the required constants and types from golang.org/x/sys/unix. |
Change https://go.dev/cl/474356 mentions this issue: |
I looked into this and it looks like there's a bug in Linux' clone3 syscall which will lead to |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Run a command with Cloneflags unix.CLONE_NEWTIME and check if the process is in a different time namespace from its parent.
What did you expect to see?
The process is in an isolated time namespace from its parent.
What did you see instead?
The process is in the same time namespace as its parent.
forkAndExecInChild uses SYS_CLONE but CLONE_NEWTIME can be used only with the clone3() system call.
https://github.com/golang/go/blob/go1.17.3/src/syscall/exec_linux.go#L218
torvalds/linux@769071a
The text was updated successfully, but these errors were encountered: