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: cannot run go file using qemu-arm when I disable core 0 in docker #37945

Closed
eastson opened this issue Mar 19, 2020 · 3 comments
Closed
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@eastson
Copy link

eastson commented Mar 19, 2020

What version of Go are you using (go version)?

$ go version
go version go1.12.6 linux/arm

Does this issue reproduce with the latest release?

Yes. I have tested it with g1.14.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GOARCH="arm"
GOBIN=""
GOCACHE="/home/quickbuild/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="arm"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/quickbuild/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/lib/golang"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_arm"
GCCGO="gccgo"
GOARM="7"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -marm -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build242285369=/tmp/go-build -gno-record-gcc-switches"

What did you do?

package main
func main(){
for i:=0; i<1000; i++ {
println("Hello world")
}
}

What did you expect to see?

Hello world
Hello world
Hello world
... (997 times more)

What did you see instead?


bash-3.2# go run test.go
fatal error: schedule: holding locks
panic during panic
SIGILL: illegal instruction
PC=0xc9ec4c m=3 sigcode=2

goroutine 122 [runnable]:
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault (core dumped)
bash-3.2#

Hello!
I figure out that sometimes simple go application is not working.
I am using docker + qemu-arm + go( for armv7l).

These are version info below.

root@VDBS1535:~# docker -v
Docker version 17.09.1-ce, build 19e2cf6

bash-3.2# qemu-arm --version
qemu-arm version 2.7.0, Copyright (c) 2003-2016 Fabrice Bellard and the QEMU Project developers

This issue is come only when I disable core 0 using a command below.
please check "--cpuset-cpus=1-55" option.

sudo docker run --privileged -d -i -t --cpuset-cpus=1-55 --mount type=bind,source="/home/dw83kim/mnt",destination="/mnt" --network host --name="ubuntu_core1" ubuntu:xenial-20200212

@bcmills
Copy link
Contributor

bcmills commented Mar 19, 2020

We currently lack a QEMU builder (#1508), and per http://golang.org/wiki/PortingPolicy, supported platforms require builders. Therefore, the QEMU platform is not supported.

Also note that QEMU has known bugs that may cause Go programs to fail (#33746).

Please let us know if the issue is reproducible using a supported OS on a physical ARM platform.

@bcmills bcmills added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Mar 19, 2020
@bcmills bcmills changed the title cannot run go file using qemu-arm when I disable core 0 in docker runtime: cannot run go file using qemu-arm when I disable core 0 in docker Mar 19, 2020
@bcmills bcmills added this to the Unplanned milestone Mar 19, 2020
@eastson
Copy link
Author

eastson commented Apr 1, 2020

Hello guys

Thanks for your rapid reply.

It took long time to test this issue.
Fortunately the issue is fixed.

Please check it below.
https://bugs.launchpad.net/qemu/+bug/1868055

Thanks!

@ALTree
Copy link
Member

ALTree commented Jun 18, 2021

Fixed, closing.

@ALTree ALTree closed this as completed Jun 18, 2021
@golang golang locked and limited conversation to collaborators Jun 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

4 participants