summary refs log tree commit diff stats
path: root/results/classifier/gemma3:12b/performance/1763536
blob: a317d5b5015b44746ef304376622950247b948b7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
go build fails under qemu-ppc64le-static (qemu-user)

I am using qemu-user (built static) in a docker container environment.  When running multi-threaded go commands in the container (go build for example) the process may hang, report segfaults or other errors.  I built qemu-ppc64le from the upstream git (master).

I see the problem running on a multi core system with Intel i7 processors.
# cat /proc/cpuinfo | grep "model name"
model name	: Intel(R) Core(TM) i7-2760QM CPU @ 2.40GHz
model name	: Intel(R) Core(TM) i7-2760QM CPU @ 2.40GHz
model name	: Intel(R) Core(TM) i7-2760QM CPU @ 2.40GHz
model name	: Intel(R) Core(TM) i7-2760QM CPU @ 2.40GHz
model name	: Intel(R) Core(TM) i7-2760QM CPU @ 2.40GHz
model name	: Intel(R) Core(TM) i7-2760QM CPU @ 2.40GHz
model name	: Intel(R) Core(TM) i7-2760QM CPU @ 2.40GHz
model name	: Intel(R) Core(TM) i7-2760QM CPU @ 2.40GHz

Steps to reproduce:
1) Build qemu-ppc64le as static and copy into docker build directory named it qemu-ppc64le-static.

2) Add hello.go to docker build dir.

package main
import "fmt"
func main() {
	fmt.Println("hello world")
}

3) Create the Dockerfile from below:

FROM ppc64le/golang:1.10.1-alpine3.
COPY qemu-ppc64le-static /usr/bin/
COPY hello.go /go

4) Build container
$ docker build -t qemutest -f Dockerfile ./go 

5) Run test
$ docker run -it qemutest

/go # /usr/bin/qemu-ppc64le-static --version
qemu-ppc64le version 2.11.93 (v2.12.0-rc3-dirty)
Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers

/go # go version
go version go1.10.1 linux/ppc64le

/go # go build hello.go
fatal error: fatal error: stopm holding locksunexpected signal during runtime execution

panic during panic
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1003528c]

runtime stack:
runtime: unexpected return pc for syscall.Syscall6 called from 0xc42007f500
stack: frame={sp:0xc4203be840, fp:0xc4203be860} stack=[0x4000b7ecf0,0x4000b928f0)

syscall.Syscall6(0x100744e8, 0x3d, 0xc42050c140, 0x20, 0x18, 0x10422b80, 0xc4203be968[signal , 0x10012d88SIGSEGV: segmentation violation, 0xc420594000 code=, 0x00x1 addr=0x0 pc=0x1003528c)
]

runtime stack:
	/usr/local/go/src/syscall/asm_linux_ppc64x.s:61runtime.throw(0x10472d19, 0x13)
 +	/usr/local/go/src/runtime/panic.go:0x6c616 +0x68


runtime.stopm()
	/usr/local/go/src/runtime/proc.go:1939goroutine  +10x158
 [runtime.exitsyscall0semacquire(0xc42007f500)
	/usr/local/go/src/runtime/proc.go:3129 +]:
0x130
runtime.mcall(0xc42007f500)
	/usr/local/go/src/runtime/asm_ppc64x.s:183 +0x58sync.runtime_Semacquire
(0xc4201fab1c)
	/usr/local/go/src/runtime/sema.go:56 +0x38

----
Note the results may differ between attempts,  hangs and other faults sometimes happen.
----
If I run "go: single threaded I don't see the problem, for example:

/go # GOMAXPROCS=1 go build -p 1 hello.go 
/go # ./hello
hello world

I see the same issue with arm64.  I don't think this is a go issue, but don't have a real evidence to prove that.  This problem looks similar to other problem I have seen reported against qemu running multi-threaded applications.