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

run failed: illegal instruction (core dumped) on Centos7 ARM64 #45823

Closed
yylt opened this issue Apr 28, 2021 · 5 comments
Closed

run failed: illegal instruction (core dumped) on Centos7 ARM64 #45823

yylt opened this issue Apr 28, 2021 · 5 comments
Labels
arch-arm64 FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@yylt
Copy link

yylt commented Apr 28, 2021

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

go version go1.15.6 linux/arm64

Does this issue reproduce with the latest release?

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

go env Output
```
$ go env
GO111MODULE="on"
GOARCH="arm64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/root/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/root/go"
GOPRIVATE=""
GOPROXY="https://goproxy.cn,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_arm64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
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-build484690779=/tmp/go-build -gno-record-gcc-switches"
```

What did you do?

complie success, but failed when run binary file

# ./manager -h
SIGILL: illegal instruction
PC=0x1430e0 m=0 sigcode=1
instruction bytes: 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0

goroutine 1 [running, locked to thread]:
encoding/binary.init()
        /usr/local/go/src/encoding/binary/varint.go:103 fp=0x400010ddf0 sp=0x400010ddf0 pc=0x1430e0
runtime.doInit(0x1cf52a0)
        /usr/local/go/src/runtime/proc.go:5652 +0x9c fp=0x400010de30 sp=0x400010ddf0 pc=0x53dcc
...

# gdb --args manager -h
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-100.el7.centos.es
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "aarch64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /root/tt/manager...done.
warning: Missing auto-load scripts referenced in section .debug_gdb_scripts
of file /root/tt/manager
Use `info auto-load python [REGEXP]' to list them.
(gdb) r
Starting program: /root/tt/manager -h
warning: Macro %el6 needs whitespace before body
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0xffff9792f1f0 (LWP 48306)]
[New Thread 0xffff9711f1f0 (LWP 48308)]
[New Thread 0xffff960bf1f0 (LWP 48311)]
[New Thread 0xffff9690f1f0 (LWP 48310)]
[New Thread 0xffff958af1f0 (LWP 48323)]

Program received signal SIGILL, Illegal instruction.
encoding/binary.init () at /usr/local/go/src/encoding/binary/varint.go:103
103     /usr/local/go/src/encoding/binary/varint.go: No such file or directory.
Missing separate debuginfos, use: debuginfo-install glibc-2.17-292.el7.centos.es.aarch64
(gdb)  x/i $pc
=> 0x1430e0 <encoding/binary.init>:     .inst   0x00000000 ; undefined

What did you expect to see?

build failed

What did you see instead?

build success, but run failed

@davecheney
Copy link
Contributor

Does this issue reproduce with the latest release?

@yylt
Copy link
Author

yylt commented Apr 28, 2021

Does this issue reproduce with the latest release?

meet this bug only once, and it is hard to reproduce

we will try use latest release(v1.16.3), and which version you recommend? thank you

@davecheney
Copy link
Contributor

Please upgrade to 1.16.3 (or later)

@seankhliao seankhliao added arch-arm64 WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Apr 28, 2021
@randall77
Copy link
Contributor

Can you disassemble the encoding/binary.init function in your binary and post the results?
I find it surprising that there's an all-zero instruction in there.

@gopherbot
Copy link

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@golang golang locked and limited conversation to collaborators May 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-arm64 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

5 participants