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
Reexec causes infinite loop, if built without CGO_ENABLED #1435
Comments
I would prefer the build failing or an error message to be printed instead of it being a noop. If it is a noop something somewhere down the line will fail and the error message will not lead the user to the root cause of the problem. |
if the code in |
@hesch isn't the code in |
we could probably use go exec to create the user namespace instead of the child doing the |
@giuseppe I was also pretty confused at first how this is even supposed to work. There exists no implementation in pure go. It needs the C-Code to call |
@hesch I agree, that should be easier than creating the namespaces directly from the new process |
What would you say is the best solution here? We could
|
Recently I opened this issue containers/buildah#4370 in the buildah repo and found the culprit. While building, I didn't specify
CGO_ENABLED=1
. This causes an infinite loop of forks, because this is never called:storage/pkg/unshare/unshare_cgo.go
Lines 6 to 11 in 89878da
Steps to reproduce:
main.go:
Compile this with
CGO_ENABLED=0 go build -o main main.go
=> Executing the binary leads to an infinite loop (and is akin to a fork bomb)
The text was updated successfully, but these errors were encountered: