Skip to content

cmd/compile: illegal instruction on s390x #16637

@malinindmitry

Description

@malinindmitry

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?
go version go1.7rc5 linux/amd64
  1. What operating system and processor architecture are you using (go env)?
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH=""
GORACE=""
GOROOT="/root/s390x_1.7rc5/go"
GOTOOLDIR="/root/s390x_1.7rc5/go/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build390085214=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
  1. What did you do?
export GOROOT=/root/s390x_1.7rc5/go
export GOROOT_BOOTSTRAP=/root/s390x_1.7rc5/go
GOOS=linux GOARCH=s390x ./bootstrap.bash

copy go-linux-s390x-bootstrap.tbz to the s390x server:

linux02:~/s390x_1.7rc5/go-linux-s390x-bootstrap/bin # uname -a
Linux linux02 3.0.101-0.47.71-default #1 SMP Thu Nov 12 12:22:22 UTC 2015 (b5b212e) s390x s390x s390x GNU/Linux
linux02:~/s390x_1.7rc5/go-linux-s390x-bootstrap/bin # lscpu
Architecture:          s390x
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Big Endian
CPU(s):                2
On-line CPU(s) list:   0,1
Thread(s) per core:    1
Core(s) per socket:    1
Socket(s) per book:    1
Book(s):               2
Vendor ID:             IBM/S390
BogoMIPS:              3246.00
Hypervisor:            z/VM 6.3.0
Hypervisor vendor:     IBM
Virtualization type:   full
Dispatching mode:      horizontal

extract archive and run go.

  1. What did you expect to see?
Runnable go binary file.
  1. What did you see instead?
linux02:~/s390x_1.7rc5/go-linux-s390x-bootstrap/bin # ./go
Illegal instruction

or with gdb:

linux02:~/s390x_1.7rc5/go-linux-s390x-bootstrap/bin # gdb ./go
GNU gdb (GDB) SUSE (7.5.1-0.7.29)
Copyright (C) 2012 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 "s390x-suse-linux".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /root/s390x_1.7rc5/go-linux-s390x-bootstrap/bin/go...done.
warning: File "/root/s390x_1.7rc5/go-linux-s390x-bootstrap/src/runtime/runtime-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
    add-auto-load-safe-path /root/s390x_1.7rc5/go-linux-s390x-bootstrap/src/runtime/runtime-gdb.py
line to your configuration file "/root/.gdbinit".
To completely disable this security protection add
    set auto-load safe-path /
line to your configuration file "/root/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
    info "(gdb)Auto-loading safe path"
(gdb) run
Starting program: /root/s390x_1.7rc5/go-linux-s390x-bootstrap/bin/go 

Program received signal SIGILL, Illegal instruction.
_rt0_s390x_linux () at /root/s390x_1.7rc5/go-linux-s390x-bootstrap/src/runtime/rt0_linux_s390x.s:16
16      BR main(SB)
(gdb)

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions