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

failed to create new OS thread (have 2 already; errno=22) #22

Closed
KurtStam opened this issue May 19, 2017 · 6 comments
Closed

failed to create new OS thread (have 2 already; errno=22) #22

KurtStam opened this issue May 19, 2017 · 6 comments
Labels

Comments

@KurtStam
Copy link

KurtStam commented May 19, 2017

I'm trying to run the following code:

package main

import "fmt"

func main() {  
    fmt.Println("Hello, world!")
}
# GOARCH=arm go build ./hello.go
# qemu-arm-static ./hello 

Which works with v2.7 and older.

/tmp/qemu-arm-static2.7 ./hello
Hello, world!

However, on v2.8 and newer I'm seeing

/tmp/qemu-arm-static2.8.0 ./hello
runtime: failed to create new OS thread (have 2 already; errno=22)
fatal error: newosproc

runtime stack:
runtime.throw(0xf6458, 0x9)
	/usr/lib/golang/src/runtime/panic.go:547 +0x78
runtime.newosproc(0x10328000, 0x10337fe0)
	/usr/lib/golang/src/runtime/os1_linux.go:149 +0x180
runtime.newm(0x1103fc, 0x0)
	/usr/lib/golang/src/runtime/proc.go:1516 +0x12c
runtime.main.func1()
	/usr/lib/golang/src/runtime/proc.go:125 +0x24
runtime.systemstack(0x155e00)
	/usr/lib/golang/src/runtime/asm_arm.s:247 +0x80
runtime.mstart()
	/usr/lib/golang/src/runtime/proc.go:1051

goroutine 1 [running]:
runtime.systemstack_switch()
	/usr/lib/golang/src/runtime/asm_arm.s:192 +0x4 fp=0x103247ac sp=0x103247a8
runtime.main()
	/usr/lib/golang/src/runtime/proc.go:126 +0x5c fp=0x103247d4 sp=0x103247ac
runtime.goexit()
	/usr/lib/golang/src/runtime/asm_arm.s:990 +0x4 fp=0x103247d4 sp=0x103247d4

I'm running on go version
go version go1.6.3 linux/amd64

on centos 7.3.1611

@legacycode
Copy link

Hi, we do have the exact same error on our project at openhab/openhab-docker#90. This issue started about 29 days ago. You can view our build log at https://travis-ci.org/openhab/openhab-docker/builds

The error message is the same as above


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

fatal error: newosproc

runtime stack:

runtime.throw(0xda35e, 0x9)

	/usr/local/go/src/runtime/panic.go:566 +0x78

runtime.newosproc(0x10422000, 0x10431fe0)

	/usr/local/go/src/runtime/os_linux.go:160 +0x1b0

runtime.newm(0xe77b4, 0x0)

	/usr/local/go/src/runtime/proc.go:1572 +0x12c

runtime.main.func1()

	/usr/local/go/src/runtime/proc.go:126 +0x24

runtime.systemstack(0x133900)

	/usr/local/go/src/runtime/asm_arm.s:247 +0x80

runtime.mstart()

	/usr/local/go/src/runtime/proc.go:1079

goroutine 1 [running]:

runtime.systemstack_switch()

	/usr/local/go/src/runtime/asm_arm.s:192 +0x4 fp=0x1041c7ac sp=0x1041c7a8

runtime.main()

	/usr/local/go/src/runtime/proc.go:127 +0x5c fp=0x1041c7d4 sp=0x1041c7ac

runtime.goexit()

	/usr/local/go/src/runtime/asm_arm.s:998 +0x4 fp=0x1041c7d4 sp=0x1041c7d4

You can find the full broken build at: https://travis-ci.org/openhab/openhab-docker/jobs/239208416

It would be very nice, if you could fix this issue :-)

@moul
Copy link
Member

moul commented Jun 8, 2017

@KurtStam, @legacycode: can you give a new try ?

@legacycode
Copy link

legacycode commented Jun 8, 2017

@moul: For me the problem still exists. Pls refer to:

https://travis-ci.org/openhab/openhab-docker/jobs/240616622

with image build 16 hours ago:

https://hub.docker.com/r/multiarch/qemu-user-static/tags/

@lafin
Copy link
Contributor

lafin commented Jun 8, 2017

@legacycode how long time do you have this issue? I met similar problem during build the go binaries on arm architectures after qemu 2.8 release.

@legacycode
Copy link

@lafin i am not really sure, when this issue started. In our build history i can see the beginning of error messages 28 days ago. Please refer to:

https://travis-ci.org/openhab/openhab-docker/builds

@KurtStam
Copy link
Author

KurtStam commented Jun 8, 2017

@moul, I'm also still seeing the issue:

/tmp/qemu-arm-static2.9.1 hello
runtime: failed to create new OS thread (have 2 already; errno=22)
fatal error: newosproc

runtime stack:
runtime.throw(0xf6458, 0x9)
/usr/lib/golang/src/runtime/panic.go:547 +0x78
runtime.newosproc(0x10328000, 0x10337fe0)
/usr/lib/golang/src/runtime/os1_linux.go:149 +0x180
runtime.newm(0x1103fc, 0x0)
/usr/lib/golang/src/runtime/proc.go:1516 +0x12c
runtime.main.func1()
/usr/lib/golang/src/runtime/proc.go:125 +0x24
runtime.systemstack(0x155e00)
/usr/lib/golang/src/runtime/asm_arm.s:247 +0x80
runtime.mstart()
/usr/lib/golang/src/runtime/proc.go:1051

goroutine 1 [running]:
runtime.systemstack_switch()
/usr/lib/golang/src/runtime/asm_arm.s:192 +0x4 fp=0x103247ac sp=0x103247a8
runtime.main()
/usr/lib/golang/src/runtime/proc.go:126 +0x5c fp=0x103247d4 sp=0x103247ac
runtime.goexit()
/usr/lib/golang/src/runtime/asm_arm.s:990 +0x4 fp=0x103247d4 sp=0x103247d4

Like I said above it seems to have been introduced with version 2.8.

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

No branches or pull requests

4 participants