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

cmd/compile: "truncation is not exact" ICE while compiling docker on ppc64le #32148

Closed
DanielCasali opened this issue May 20, 2019 · 5 comments
Closed
Labels
arch-ppc64x FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@DanielCasali
Copy link

DanielCasali commented May 20, 2019

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

$ go version
[root@powericp compile]# go version
go version go1.12.5 linux/ppc64le

Does this issue reproduce with the latest release?

yes

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

go env Output
$ go env
GOARCH="ppc64le"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="ppc64le"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_ppc64le"
GCCGO="gccgo"
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 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build479939429=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Installed CentOS ppc64le on a virtual machine hosted on a Fedora 30 amd64 qemu-system-ppc-3.1.0-8.fc30.x86_64 and libvirt-5.1.0-5.fc30.x86_64
server installs correctly and everything works, only programs compiled with go seem to be affected.
I could not run a docker container from distribution:

[root@powericp ~]# docker run -i -t alpine /bin/sh
/usr/bin/docker-current: Error response from daemon: oci runtime error: error running hook: exit status 4, stdout: , stderr: fatal error: float32nan
runtime: panic before malloc heap initialized

runtime stack:
fatal error: gentraceback before goexitPC initialization
runtime: panic before malloc heap initialized
panic during panic

runtime stack:
fatal error: gentraceback before goexitPC initialization
runtime: panic before malloc heap initialized
stack trace unavailable.

I decided to recompile docker since this works on a non emulated ppc64le followed:
https://github.com/moby/moby/blob/master/project/PACKAGERS.md
to get a minimal docker build that would run containers on ppc64le.

What did you expect to see?

docker built

What did you see instead?

/usr/local/go/src/runtime/runtime1.go:162:22: internal compiler error: 'check': panic during opt while compiling check:

truncate64Fto32F: truncation is not exact

goroutine 1 [running]:
cmd/compile/internal/ssa.Compile.func1(0xc000728810, 0xc008c5dce0)
        /usr/local/go/src/cmd/compile/internal/ssa/compile.go:45 +0x9c
panic(0x8fdbe0, 0xb49240)
        /usr/local/go/src/runtime/panic.go:522 +0x1c8
cmd/compile/internal/ssa.truncate64Fto32F(0xc7ffffffe0000000, 0xc000000802)
        /usr/local/go/src/cmd/compile/internal/ssa/rewrite.go:444 +0xf4
cmd/compile/internal/ssa.auxTo32F(...)
        /usr/local/go/src/cmd/compile/internal/ssa/rewrite.go:494
cmd/compile/internal/ssa.rewriteValuegeneric_OpEq32F_0(0xc002a582d0, 0xc002a87b01)
        /usr/local/go/src/cmd/compile/internal/ssa/rewritegeneric.go:9494 +0x144
cmd/compile/internal/ssa.rewriteValuegeneric(0xc002a582d0, 0x0)
        /usr/local/go/src/cmd/compile/internal/ssa/rewritegeneric.go:105 +0x15f4
cmd/compile/internal/ssa.applyRewrite(0xc008c5dce0, 0x9b2698, 0x9b2700)
        /usr/local/go/src/cmd/compile/internal/ssa/rewrite.go:80 +0x564
cmd/compile/internal/ssa.opt(0xc008c5dce0)
        /usr/local/go/src/cmd/compile/internal/ssa/opt.go:9 +0x44
cmd/compile/internal/ssa.Compile(0xc008c5dce0)
        /usr/local/go/src/cmd/compile/internal/ssa/compile.go:90 +0x4a8
cmd/compile/internal/gc.buildssa(0xc001b6d760, 0x0, 0x0)
        /usr/local/go/src/cmd/compile/internal/gc/ssa.go:233 +0x790
cmd/compile/internal/gc.compileSSA(0xc001b6d760, 0x0)
        /usr/local/go/src/cmd/compile/internal/gc/pgen.go:299 +0x38
cmd/compile/internal/gc.compile(0xc001b6d760)
        /usr/local/go/src/cmd/compile/internal/gc/pgen.go:278 +0x298
cmd/compile/internal/gc.funccompile(0xc001b6d760)
        /usr/local/go/src/cmd/compile/internal/gc/pgen.go:221 +0xec
cmd/compile/internal/gc.Main(0x9b2498)
        /usr/local/go/src/cmd/compile/internal/gc/main.go:665 +0x3204
main.main()
        /usr/local/go/src/cmd/compile/main.go:51 +0xbc



Please file a bug report including a short program that triggers the error.
https://golang.org/issue/new
@ALTree ALTree changed the title Cannot compile docker on ppc64le cmd/compile: "truncation is not exact" ICE while compiling docker on ppc64le May 20, 2019
@ALTree ALTree added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label May 20, 2019
@ALTree ALTree added this to the Go1.13 milestone May 20, 2019
@DanielCasali
Copy link
Author

Compiler works correctly using qemu 2.11.2. There is probably an issue with qemu version 3.1

@SuperQ
Copy link

SuperQ commented Sep 6, 2019

I'm also seeing this on qemu 4.1 and Go 1.13 when trying to build the Prometheus node_exporter.

@ALTree
Copy link
Member

ALTree commented Sep 6, 2019

@SuperQ This issue is closed. Can you open a new one with a reproducer? Thanks!

@SuperQ
Copy link

SuperQ commented Sep 6, 2019

I saw that this was closed, but by user rollback, not fixing the issue.

Either way, done, #34139.

@TEMTLC
Copy link

TEMTLC commented Apr 3, 2020

#8 22.90 $ make
#8 37.49 GO singularity
#8 37.49 [+] GO_TAGS "containers_image_openpgp sylog imgbuild_engine oci_engine singularity_engine fakeroot_engine apparmor selinux seccomp"
#8 52.82 # runtime
#8 52.82 /usr/lib/golang/src/runtime/runtime1.go:162:22: internal compiler error: 'check': panic during opt while compiling check:
#8 52.82
#8 52.82 truncate64Fto32F: truncation is not exact

@golang golang locked and limited conversation to collaborators Apr 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-ppc64x FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

6 participants