Error SIGILL: illegal instruction

649 views
Skip to first unread message

Ruslan Mezentsev

unread,
Jun 18, 2011, 6:51:21 PM6/18/11
to golang-nuts
Hi,
I tried to run Hello world in e-book reader Onyx Boox 60:
app@onyx /media/sd$ cat /proc/cpuinfo
Using fallback suid method
Processor: ARMv6-compatible processor rev 4 (v6l)
BogoMIPS: 530.84
Features: swp half thumb fastmult vfp edsp java
CPU implementer: 0x41
CPU architecture: 6TEJ
CPU variant: 0x0
CPU part: 0xb36
CPU revision: 4
Cache type: write-back
Cache clean: cp15 c7 ops
Cache lockdown: format C
Cache format: Harvard
I size: 16 384
I assoc: 4
I line length: 32
I sets: 128
D size: 16 384
D assoc: 4
D line length: 32
D sets: 128

Hardware: Freescale i.MX31L
Revision: 31 020
Serial: 0000000000000000

When I ran the application shows an error:

app @ onyx /media/sd $./5.out
app@onyx /media/sd$ ./5.out
panic: runtime error: SIGILL: illegal instruction

[signal 0x4 code=0x1 addr=0x0 pc=0x54f10]

[0x40040ea4] runtime.panic+0xa0 /home/rmib/Develop/arm/go/src/pkg/
runtime/proc.c:1060
runtime.panic(0xbef48, 0x104de148)
[0x40040ec4] runtime.panicstring+0x98 /home/rmib/Develop/arm/go/src/
pkg/runtime/runtime.c:116
runtime.panicstring(0xc8106, 0x5)
[0x40040ed0] runtime.sigpanic+0x68 /home/rmib/Develop/arm/go/src/pkg/
runtime/linux/thread.c:304
runtime.sigpanic()
[0x40040ef0] math.init·1+0x28 /home/rmib/Develop/arm/go/src/pkg/math/
pow10.go:24
math.init·1()
[0x40040f34] math.init+0x5ac /home/rmib/Develop/arm/go/src/pkg/math/
gamma.go:2990
math.init()
[0x40040fc0] fmt.init+0x80 /home/rmib/Develop/arm/go/src/pkg/fmt/
scan.go:1084
fmt.init()
[0x40040fc8] main.init+0x70 /home/rmib/Develop/TestGo/test.go:7
main.init()
[0x40040fd0] runtime.mainstart+0x8 /home/rmib/Develop/arm/go/src/pkg/
runtime/arm/asm.s:65
runtime.mainstart()
[0x40040fd0] runtime.goexit /home/rmib/Develop/arm/go/src/pkg/runtime/
proc.c:178
runtime.goexit()
----- goroutine created by -----
_rt0_arm+0x7c /home/rmib/Develop/arm/go/src/pkg/runtime/arm/asm.s:52

I build Go with export GOARM=6.
What's wrong?

Anthony Martin

unread,
Jun 18, 2011, 7:22:50 PM6/18/11
to Ruslan Mezentsev, golan...@googlegroups.com
> panic: runtime error: SIGILL: illegal instruction
>
> [signal 0x4 code=0x1 addr=0x0 pc=0x54f10]

> [0x40040ef0] math.init·1+0x28 /home/rmib/Develop/arm/go/src/pkg/math/
> pow10.go:24
> math.init·1()

The panic indicates that it's an illegal opcode but
the offending line in src/pkg/math/pow10.go looks
like it would simply be a store instruction.

If you send me the source file and the 5.out, I'll
look into it for you.

Also, what version of Go are you using?

Thanks,
Anthony

Ruslan Mezentsev

unread,
Jun 18, 2011, 7:38:49 PM6/18/11
to golang-nuts
Anthony, I'm using the current release (release.r57.2 8306). Source +
bin:
http://dl.dropbox.com/u/4688159/TestGo.tar.gz
Thanks.

a...@google.com

unread,
Jun 18, 2011, 8:13:41 PM6/18/11
to golan...@googlegroups.com
You might want to also give it a try at the latest weekly tag:
  hg pull
  hg update weekly
and rebuild.

Andrew

Ruslan Mezentsev

unread,
Jun 18, 2011, 8:44:56 PM6/18/11
to golang-nuts
In version weekly.2011-06-16 8787:

app@onyx /media/sd$ ./5.out
panic: runtime error: SIGILL: illegal instruction

[signal 0x4 code=0x1 addr=0x0 pc=0x2f8bc]

[0x40040f0c] runtime.panic+0xa0 /home/rmib/Develop/arm/go/src/pkg/
runtime/proc.c:1060
runtime.panic(0xd3138, 0x104ef2c0)
[0x40040f2c] runtime.panicstring+0x98 /home/rmib/Develop/arm/go/src/
pkg/runtime/runtime.c:116
runtime.panicstring(0xde9de, 0x0)
[0x40040f38] runtime.sigpanic+0x68 /home/rmib/Develop/arm/go/src/pkg/
runtime/linux/thread.c:304
runtime.sigpanic()
[0x40040f3c] math.init·1+0x28 /home/rmib/Develop/arm/go/src/pkg/math/
pow10.go:24
math.init·1()
[0x40040f70] math.init+0x5ac /home/rmib/Develop/arm/go/src/pkg/math/
sqrt_decl.go:7
math.init()
[0x40040fc4] fmt.init+0x74 /home/rmib/Develop/arm/go/src/pkg/fmt/
scan.go:1103
fmt.init()
[0x40040fc8] main.init+0x70 /home/rmib/Develop/TestGo/test.go:7
main.init()
[0x40040fd0] runtime.mainstart+0x8 /home/rmib/Develop/arm/go/src/pkg/
runtime/arm/asm.s:65
runtime.mainstart()
[0x40040fd0] runtime.goexit /home/rmib/Develop/arm/go/src/pkg/runtime/
proc.c:178
runtime.goexit()
----- goroutine created by -----
_rt0_arm+0x7c /home/rmib/Develop/arm/go/src/pkg/runtime/arm/asm.s:52

Dave Cheney

unread,
Jun 18, 2011, 9:46:47 PM6/18/11
to Ruslan Mezentsev, golang-nuts
Hi Ruslan,

If you haven't already, could you try rebuilding your go tree with
GOARM=5 set. I'm not an expert on the differences on the various arm
flavours but I suspect that from the compilers point of view v6 is
closer to v5 and it is to v7.

Cheers

Dave

Ruslan Mezentsev

unread,
Jun 19, 2011, 10:15:34 AM6/19/11
to golang-nuts
When GOARM = 5 is the same error. I installed the gdb server on the e-
book.
Disassemble command print:

Dump of assembler code for function math.init · 1:
...
0x0002f8b8 <math.init·1+36>: add r0, r0, r1
0x0002f8bc <math.init·1+40>: vmov.f64 d0, # 112; 0x70
0x0002f8c0 <math.init·1+44>: vstr d0, [r0]
...
In 0x0002f8bc illegal opcode? ([signal 0x4 code = 0x1 addr = 0x0 pc =
0x2f8bc])

Ruslan Mezentsev

unread,
Jun 19, 2011, 11:25:59 AM6/19/11
to golang-nuts
Sorry, to set GOARM = 5 works, Hello world print to screen. Thank you
all.

fango

unread,
Jun 19, 2011, 7:41:12 PM6/19/11
to golang-nuts
vmov.f64 d0, # 112

Now it's very clear. Thanks for tracing it down.

This inst `vmov immediate` is not available on vfp2, which is for
ARMv5/6. Go ARM has only two flavors - soft or hardware floating
point, and in latter case, it is vfp3 (ARMv7). The other inst not in
vfp2 is `vcvt - convert floating point to fix point`.

By default GO Arm builds for vfp, only if you specify GOARM=5, it
generates instructions for softfp, which works but of course the VFP
on your ARM11 is not in use.

Btw, I noticed `linux arm5` was gone since 10Jun from godashboard.
Does that mean, in the near future, only one ARM will be left?

Cheers,
Fango

a...@google.com

unread,
Jun 19, 2011, 8:06:00 PM6/19/11
to golan...@googlegroups.com
On Monday, 20 June 2011 09:41:12 UTC+10, fango wrote:
Btw, I noticed `linux arm5` was gone since 10Jun from godashboard.
Does that mean, in the near future, only one ARM will be left?

No, it just means that the builder was taken down (that particular machine didn't have enough ram to run the tests). We still support GOARM=5. If anyone has a suitable ARM5 system they can donate to the cause, we'd appreciate another ARM5 builder.

Andrew 

Dave Cheney

unread,
Jun 19, 2011, 8:02:17 PM6/19/11
to fango, golang-nuts
Hi,

I run the arm5 builder which is offline at the moment due to a
conflict with the OOM killer (the physical host has less than 128mb of
ram available). I continue to actively test the arm5 builds, but at
the moment I can't run the builder reliably without generating an
unacceptable amount of false positives.

Cheers

Dave

Russ Cox

unread,
Jun 20, 2011, 1:21:13 PM6/20/11
to golan...@googlegroups.com
> No, it just means that the builder was taken down (that particular machine
> didn't have enough ram to run the tests). We still support GOARM=5. If
> anyone has a suitable ARM5 system they can donate to the cause, we'd
> appreciate another ARM5 builder.

I have one and will start it running.

Reply all
Reply to author
Forward
0 new messages