Skip to content

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

Closed

Description

@asw

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.

Activity

  1. stehufntdev commented on Apr 13, 2016

    @stehufntdev

    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.

  2. stehufntdev commented on Apr 13, 2016

    @stehufntdev

    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.

  3. stehufntdev commented on Apr 15, 2016

    @stehufntdev

    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!

  4. asw commented on Apr 15, 2016

    @asw
    Author

    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?

  5. stehufntdev commented on Apr 15, 2016

    @stehufntdev

    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.

  6. russalex commented on May 31, 2016

    @russalex
    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.

  7. benhillis commented on Jun 20, 2016

    @benhillis
    Member

    Closing as a duplicate.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions