Skip to content
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

"runtime: failed to create new OS thread" with docker-machine, compiled golang apps, etc. #158

Closed
asw opened this issue Apr 12, 2016 · 8 comments

Comments

@asw
Copy link

asw commented Apr 12, 2016

If I grab docker-engine from https://github.com/docker/machine/releases/ and try to run it I receive an error like this:

runtime: failed to create new OS thread (have 2 already; errno=22)
fatal error: newosproc
...

I also have the same issue with Go applications I've cross-compiled on Windows.

@stehufntdev
Copy link
Collaborator

Thanks for reporting the issue. Can you please share out an strace of the failing binaries? Based on the error there is likely an unsupported clone flag, but it could be something else.

@asw
Copy link
Author

asw commented Apr 13, 2016

Not a problem! Here is a gist of the strace of the latest docker-machine binary from (https://github.com/docker/machine/releases/): https://gist.github.com/asw/67d7f30c808cacce14e450e59b24598e

@stehufntdev
Copy link
Collaborator

Thanks, appreciate the help! Looks like an unsupported clone flag combination:

391 clone(child_stack=0x7ff5dff15fc0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD) = -1 EINVAL (Invalid argument)
392 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
393 write(2, "runtime: failed to create new OS"..., 46runtime: failed to create new OS thread (have ) = 46

Thanks for catching and reporting it, I'll open a bug on our end.

@stehufntdev
Copy link
Collaborator

After improving the clone flag support, docker-machine makes a little more progress but reports other failures shortly after.

Please give us feedback on the docker-machine request on the uservoice page so we can prioritize. Thanks for trying out WSL!

@asw
Copy link
Author

asw commented Apr 15, 2016

Thank you for the response. Does this help Go programs. Can we go run/go build or run a cross-compiled hello world (https://tour.golang.org/welcome/1) perhaps? How long would it be before we receive these updates?

@stehufntdev
Copy link
Collaborator

With the clone flag support, I was able to run a cross-compiled "hello world" go binary. Compiling the binary is hitting unimplemented surface area, the fallocate syscall seems to be the main blocker there.

The clone flags updates should be out soon for insiders, unclear exactly when since it depends on the release schedule. Please also give the go feedback on the the uservoice page so we can prioritize.

@russalex
Copy link
Contributor

Running cross-compiled "hello world" go binaries is working on build 14352. This does unblock running "docker" to connect to the docker engine running on another machine.

The docker-engine itself is being tracked in #85.

@benhillis
Copy link
Member

Closing as a duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants