Looks like I get further in the init on this particular device if I use GOARM=5 as seen below:unexpected fault address 0xaa2a0fatal error: fault[signal 0xb code=0x2 addr=0xaa2a0 pc=0xaa2a0]
unexpected fault address 0xa8e24
fatal error: fault
[signal 0xb code=0x2 addr=0xa8e24 pc=0xa8e24]
goroutine 1 [running, locked to thread]:
runtime.gothrow(0xcc9f8, 0x5)
/usr/local/go/src/runtime/panic.go:503 +0x84 fp=0x10335eb4 sp=0x10335ea8
runtime.sigpanic()
/usr/local/go/src/runtime/sigpanic_unix.go:29 +0x2a4 fp=0x10335edc sp=0x10335eb4
sync/atomic.LoadUint32(0x126b78, 0x0)
?:0 fp=0x10335ee0 sp=0x10335ee0
syscall.Getenv(0xd, 0x1030a060, 0x72ccc, 0xcecf0, 0x8)
/usr/local/go/src/syscall/env_unix.go:72 +0x54 fp=0x10335f0c sp=0x10335ee0
syscall.Getenv(0x10335f60, 0x30315500, 0x1030a060, 0x5e064, 0x10338010)
/usr/local/go/src/syscall/env_unix.go:72 +0x54 fp=0x10335f38 sp=0x10335f0c
goroutine 2 [runnable]:
runtime.forcegchelper()
/usr/local/go/src/runtime/proc.go:90 fp=0x103187ec sp=0x103187ec
runtime.goexit()
/usr/local/go/src/runtime/asm_arm.s:1322 +0x4 fp=0x103187ec sp=0x103187ec
created by runtime.init·4
/usr/local/go/src/runtime/proc.go:87 +0x34
goroutine 3 [runnable]:
runtime.bgsweep()
/usr/local/go/src/runtime/mgc0.go:82 fp=0x1031bfec sp=0x1031bfec
runtime.goexit()
/usr/local/go/src/runtime/asm_arm.s:1322 +0x4 fp=0x1031bfec sp=0x1031bfec
created by gc
/usr/local/go/src/runtime/mgc0.c:1386
000a8dfc <sync/atomic.AddUint32>:
a8dfc: 04 e0 add $0xe0,%al
a8dfe: 2d e5 08 20 9d sub $0x9d2008e5,%eax
a8e03: e5 0c in $0xc,%eax
a8e05: 40 inc %eax
a8e06: 9d popf
a8e07: e5 00 in $0x0,%eax
a8e09: 00 92 e5 00 10 a0 add %dl,-0x5fefff1b(%edx)
a8e0f: e1 04 loope a8e15 <sync/atomic.AddUint32+0x19>
a8e11: 10 81 e0 e1 ff ff adc %al,-0x1e20(%ecx)
a8e17: eb fa jmp a8e13 <sync/atomic.AddUint32+0x17>
a8e19: ff (bad)
a8e1a: ff (bad)
a8e1b: 3a 10 cmp (%eax),%dl
a8e1d: 10 8d e5 04 f0 9d adc %cl,-0x620ffb1b(%ebp)
a8e23: e4 04 in $0x4,%al
000a8e24 <sync/atomic.LoadUint32>:
a8e24: 04 e0 add $0xe0,%al
a8e26: 2d e5 08 20 9d sub $0x9d2008e5,%eax
a8e2b: e5 00 in $0x0,%eax
a8e2d: 00 92 e5 00 10 a0 add %dl,-0x5fefff1b(%edx)
a8e33: e1 d9 loope a8e0e <sync/atomic.AddUint32+0x12>
a8e35: ff (bad)
a8e36: ff (bad)
a8e37: eb fb jmp a8e34 <sync/atomic.LoadUint32+0x10>
a8e39: ff (bad)
a8e3a: ff (bad)
a8e3b: 3a 0c 10 cmp (%eax,%edx,1),%cl
a8e3e: 8d (bad)
a8e3f: e5 04 in $0x4,%eax
a8e41: f0 9d lock popf
a8e43: e4 f6 in $0xf6,%al
000a8e44 <sync/atomic.LoadUintptr>:
a8e44: f6 ff idiv %bh
a8e46: ff (bad)
a8e47: ea ff ff ff ea 04 e0 ljmp $0xe004,$0xeaffffff
When I use GOARM=7 I get the panic always in a different place than GOARM=5 which was the last I posted. GOARM=7 looks like the first post:
unexpected fault address 0xa8e24
fatal error: fault
[signal 0xb code=0x2 addr=0xa8e24 pc=0xa8e24]
unexpected fault address 0xaa2a0fatal error: fault[signal 0xb code=0x2 addr=0xaa2a0 pc=0xaa2a0]
goroutine 1 [running, locked to thread]:
runtime.gothrow(0xd29f8, 0x5) /usr/local/go/src/runtime/panic.go:503 +0x84 fp=0x10335f1c sp=0x10335f10runtime.sigpanic() /usr/local/go/src/runtime/sigpanic_unix.go:29 +0x2a4 fp=0x10335f44 sp=0x10335f1ctime.init() /usr/local/go/src/time/zoneinfo_unix.go:84 fp=0x10335f48 sp=0x10335f48fmt.init() /usr/local/go/src/fmt/scan.go:1169 +0x64 fp=0x10335f94 sp=0x10335f48fmt.init() /usr/local/go/src/fmt/scan.go:1169 +0x64 fp=0x10335fe0 sp=0x10335f94runtime.main() /usr/local/go/src/runtime/proc.go:46 +0x88 fp=0x10336004 sp=0x10335fe0
goroutine 2 [runnable]:runtime.forcegchelper() /usr/local/go/src/runtime/proc.go:90 fp=0x103187ec sp=0x103187ecruntime.goexit() /usr/local/go/src/runtime/asm_arm.s:1322 +0x4 fp=0x103187ec sp=0x103187eccreated by runtime.init·4 /usr/local/go/src/runtime/proc.go:87 +0x34
goroutine 3 [runnable]:runtime.bgsweep() /usr/local/go/src/runtime/mgc0.go:82 fp=0x1031bfec sp=0x1031bfecruntime.goexit() /usr/local/go/src/runtime/asm_arm.s:1322 +0x4 fp=0x1031bfec sp=0x1031bfeccreated by gc /usr/local/go/src/runtime/mgc0.c:1386
Binary using GOARM=5 is at http://temp-host.com/download.php?file=hp61ll
When running with GOTRACEBACK=2 I don't see but a couple "created by" lines:
unexpected fault address 0xaa2a0fatal error: fault[signal 0xb code=0x2 addr=0xaa2a0 pc=0xaa2a0]
I know these devices have page size changes. And the /proc/version file shows:Linux version 3.10.39 (kman@kmachine) (gcc version 4.6.4 (Linaro GCC branch-4.6.4. Marvell GCC Dev 201310-2126.3d181f66 64K MAXPAGESIZE ALIGN) ) #26 SMP ...which has the word align in it... :( I'll see if I can't get some details from the vendors.
CC_FOR_TARGET="<toolchain gcc> -fPIC" ... ./make.bash
I am just shooting in the dark here but is it perhaps within go like it maybe was for powerpc? https://github.com/golang/go/commit/f9fdc887ae71ebcf26c980f2f15ace2efec94881Reaaaally hoping I won't be going back to javaland !
The kernel is set to a 64K page size for performance reasons. In order to accomplish this, we had to change the linker so that the elf tables of all binaries are 64K aligned. So, binaries will run on a 4K kernel, but 4K aligned binaries from a standard distro (actually they are 32K aligned), will not run.
Well that totally fixes everything! I even tried a little example that utilizes cgo to make sure that works too.I very much appreciate this workaround, and may I ask where if anywhere the -R is documented so I can better arm myself in the future?
Hey minux,Trying to call some of the image package functions, I am getting "cannot map pages in arena address space". Does this have anything to do with using -ldflags "-R 65536"? Granted the box doesn't have a lot of memory, but shouldn't it start paging when it runs out?
On Apr 23, 2015 21:08, <jonathan...@gmail.com> wrote:
>
> I have not had any more issues with our weird devices on ARM for go1.4, that's good :) Sorry to beat a dead horse here but will this needing to change PhysPageSize and give the linker option be fixed for go1.5? I don't see any references to PhysPageSize in gotip or any PageSize reference that has a meaningful number, so I am thinking the answer is yes.
There is issue 10180 for the non-4K page size problem. I intend to get it fixed for Go 1.5.