-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Remove nsenter.c in Go >= 1.10 #1795
Comments
I'm not sure that it'd be reasonable to do it, even with To be frank, I just trust that the C code we have is doing the right thing in a way that I don't think I'll ever be able to trust the Go runtime in the same way. I've had to deal with far too many Go bugs in my time. |
The change prevents spawning from locked threads, and was directly in response to the blog post about namespace issues with go: golang/go#20676 I'd consider this 'wishlist' level priority, given that the C shim seems to be doing fine, but a pure Go alternative should work if issues arise. |
It's unsafe to replace As @cyphar mentioned, it's not possible to ensure that all Go runtime threads will have the same thread-state modifications. Additionally, if you spawn a new goroutine from the locked one, the new goroutine will end up running on a different "non-modified" thread leading to funky results, see https://www.weave.works/blog/linux-namespaces-golang-followup. |
Go will now actually isolate an OS thread when you call LockOSThread, so the C hack shouldn't be necessary anymore: https://golang.org/doc/go1.10#runtime
The text was updated successfully, but these errors were encountered: