-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: panic on linux/mips64le during build with Go 1.6.2 in QEMU #15416
Comments
@eswierk @cherrymui |
Can't reproduce it on my machine. Do you see it only on when building rpm? It seems you have a working go1.6.2 from /usr/lib/golang. If you rebuild it, does it work? |
@cherrymui test it again the original golang 1.6.2 can compile ok, but with your patch for externel cgo link support, it report such an error on qemu emulated mips64el machine. On my physical machine it nerver report the error and works well. So many thx to you. Could you debug it out? |
@cherrymui maybe the new relocation does not adapt to the qemu emulated machine? |
It sounds like this is a QEMU problem. Leaving for Go 1.8. |
@vanloswang is this still a problem with newer versions of Go? |
@rsc I will test it with fedora 24 mips64le and golang 1.7.3 during this weekend. |
@rsc Go 1.7.3 have the same issue on Fedora mips64le platform. The error msg is as following: # go env
panic: regexp: Compile(`((https?|ftp|file|gopher|mailto|news|nntp|telnet|wais|prospero)://[a-zA-Z0-9_@\-]+([.:][a-zA-Z0-9_@\-]+)*/?[a-zA-Z0-9_?%#~&/\-+=()]+([:.,][a-zA-Z0-9_?%#~&/\-+=()]+)*)|([\pL_][\pL_0-9]*)`): error parsing regexp: invalid escape sequence: `\-`
goroutine 1 [running]:
panic(0x4ebe80, 0xc42000e560)
/root/go-linux-mips64le-bootstrap/src/runtime/panic.go:500 +0x4c4
regexp.MustCompile(0x58b990, 0xb9, 0x57b49e)
/root/go-linux-mips64le-bootstrap/src/regexp/regexp.go:237 +0x17c
go/doc.init()
/root/go-linux-mips64le-bootstrap/src/go/doc/comment.go:59 +0x110
go/build.init()
/root/go-linux-mips64le-bootstrap/src/go/build/zcgo.go:33 +0xcc
main.init()
/root/go-linux-mips64le-bootstrap/src/cmd/go/zosarch.go:43 +0xdc |
That regexp compiles and matches file for me in Go 1.4, Go 1.6, Go 1.7, and Go tip. I'm unable to reproduce. |
@bradfitz This issue is on qemu emulated mips64le platform, not real machine. It works well on real machines. |
If it works on the real machine but not under qemu-ser, then
I'm inclined to say it's a bug in qemu's user emulation (unless
proved otherwise).
Go programs are multithreaded, and they're quite hard to emulate
correctly. We have hit numerous bugs in qemu-user on other
platforms in the past and qemu-user is never a supported platform
for Go anyway.
|
Closing. Reopen if there's a repro on a real machine. |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.6.2 linux/mips64le
What operating system and processor architecture are you using (
go env
)?GOARCH="mips64le"
GOBIN=""
GOEXE=""
GOHOSTARCH="mips64le"
GOHOSTOS="linux"
GOOS="linux"
GOPATH=""
GORACE=""
GOROOT="/usr/lib/golang"
GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_mips64le"
GO15VENDOREXPERIMENT="1"
CC="gcc"
GOGCCFLAGS="-fPIC -fmessage-length=0"
CXX="g++"
CGO_ENABLED="0"
What did you do?
Just compile golang on fedora 23 mips64el, which is based on QEMU melta 5KEc.
What did you expect to see?
Compile success.
What did you see instead?
rpmbuild --define "golang_arches mips64el" -bb golang-1.6.2.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.s5c1s4
umask 022
cd /root/rpmbuild/BUILD
cd /root/rpmbuild/BUILD
rm -rf go
/usr/bin/gzip -dc /root/rpmbuild/SOURCES/go1.6.2.tar.gz
/usr/bin/tar -xof -
STATUS=0
'[' 0 -ne 0 ']'
cd go
/usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.LjhtJ8
umask 022
cd /root/rpmbuild/BUILD
cd go
uname -a
Linux fedora-mips64el 4.4.0-0.rc4.git0.1.mips.fc23.mips64el cmd/cgo: fails with gcc 4.4.1 #1 Fri Dec 18 08:53:44 GMT 2015 mips64 mips64 mips64 GNU/Linux
cat /proc/cpuinfo
system type : MIPS Malta
machine : mti,malta
processor : 0
cpu model : MIPS 5KE V0.0
BogoMIPS : 2801.66
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
extra interrupt vector : yes
hardware watchpoint : yes, count: 1, address/irw mask: [0x0ff8]
isa : mips1 mips2 mips3 mips4 mips5 mips32r1 mips32r2 mips64r1 mips64r2
ASEs implemented :
shadow register sets : 1
kscratch registers : 0
package : 0
core : 0
VCED exceptions : not available
VCEI exceptions : not available
MemTotal: 2015436 kB
MemFree: 380420 kB
MemAvailable: 1864000 kB
Buffers: 91896 kB
Cached: 1305964 kB
SwapCached: 0 kB
Active: 682032 kB
Inactive: 781152 kB
Active(anon): 65596 kB
Inactive(anon): 136 kB
Active(file): 616436 kB
Inactive(file): 781016 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 63112 kB
Writeback: 0 kB
AnonPages: 65336 kB
Mapped: 49764 kB
Shmem: 412 kB
Slab: 160164 kB
SReclaimable: 107032 kB
SUnreclaim: 53132 kB
KernelStack: 1248 kB
PageTables: 1284 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 1007716 kB
Committed_AS: 213152 kB
VmallocTotal: 1069547512 kB
VmallocUsed: 0 kB
VmallocChunk: 0 kB
AnonHugePages: 18432 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
~/rpmbuild/BUILD/go/src ~/rpmbuild/BUILD/go
Building Go bootstrap tool.
cmd/distBuilding Go toolchain using /usr/lib/golang.
bootstrap/internal/obj
bootstrap/internal/obj/arm
bootstrap/internal/obj/arm64
bootstrap/internal/obj/mips
bootstrap/internal/obj/ppc64
bootstrap/internal/obj/x86
bootstrap/asm/internal/arch
bootstrap/asm/internal/flags
bootstrap/asm/internal/lex
bootstrap/asm/internal/asm
bootstrap/asm
bootstrap/compile/internal/big
bootstrap/internal/gcprog
bootstrap/compile/internal/gc
bootstrap/compile/internal/amd64
bootstrap/compile/internal/arm
bootstrap/compile/internal/arm64
bootstrap/compile/internal/mips64
bootstrap/compile/internal/ppc64
bootstrap/compile/internal/x86
bootstrap/compile
bootstrap/link/internal/ld
bootstrap/link/internal/amd64
bootstrap/link/internal/arm
bootstrap/link/internal/arm64
bootstrap/link/internal/mips64
bootstrap/link/internal/ppc64
bootstrap/link/internal/x86
bootstrap/link
Building go_bootstrap for host, linux/mips64le.
runtime/internal/sys
runtime/internal/atomic
runtime
encoding
errors
internal/race
internal/syscall/windows/sysdll
math
sort
sync/atomic
unicode
unicode/utf16
unicode/utf8
sync
container/heap
internal/singleflight
io
syscall
hash
hash/adler32
strings
bytes
strconv
bufio
path
regexp/syntax
reflect
encoding/base64
crypto
crypto/sha1
internal/syscall/windows/registry
internal/syscall/windows
time
regexp
os
encoding/binary
path/filepath
fmt
os/signal
/ioutil
os/exec
debug/dwarf
go/token
flag
log
text/template/parse
net/url
compress/flate
encoding/json
go/scanner
go/ast
compress/zlib
text/template
debug/elf
debug/macho
go/parser
go/doc
go/build
cmd/go
Building packages and commands for linux/mips64le.
panic: regexp: Compile(
((https?|ftp|file|gopher|mailto|news|nntp|telnet|wais|prospero)://[a-zA-Z0-9_@\-]+([.:][a-zA-Z0-9_@\-]+)*/?[a-zA-Z0-9_?%#~&/\-+=()]+([:.,][a-zA-Z0-9_?%#~&/\-+=()]+)*)|([\pL_][\pL_0-9]*)
): error parsing regexp: invalid escape sequence:\-
goroutine 1 [running]:
panic(0x3434c0, 0xc82000e5a0)
/usr/lib/golang/src/runtime/panic.go:481 +0x4b8
regexp.MustCompile(0x4bb7e0, 0xb9, 0x4655e0)
/usr/lib/golang/src/regexp/regexp.go:232 +0x17c
go/doc.init()
/usr/lib/golang/src/go/doc/comment.go:59 +0x108
go/build.init()
/usr/lib/golang/src/go/build/syslist.go:8 +0xc4
main.init()
/usr/lib/golang/src/cmd/go/zdefaultcc.go:6 +0xdc
error: Bad exit status from /var/tmp/rpm-tmp.LjhtJ8 (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.LjhtJ8 (%build)
The text was updated successfully, but these errors were encountered: