AppEngine Go runtime for Mac OS X 64-bit

218 views
Skip to first unread message

Dmitry Matyukhin

unread,
Aug 28, 2016, 11:45:39 AM8/28/16
to Google App Engine
I tried to use Go Runtime for AppEngine for Mac. Since, there is a 64-bit version, I installed that one.

However, whenever I tried to run anything, it was always crashing. For example, this happens when I did "goapp get google.golang.org/appengine"

# net
fatal error: unexpected signal during runtime execution
[signal 0xb code=0x1 addr=0x1161be989d12 pc=0xf0eb]

runtime stack:
runtime.throw(0x497380, 0x2a)
        /private/var/folders/9y/ppk2fnqj5lscwqw_l6lhdrx8005bt1/T/appengine/go_appengine/goroot/src/runtime/panic.go:547 +0x90
runtime.sigpanic()
        /private/var/folders/9y/ppk2fnqj5lscwqw_l6lhdrx8005bt1/T/appengine/go_appengine/goroot/src/runtime/sigpanic_unix.go:12 +0x5a
runtime.unlock(0x988540)
        /private/var/folders/9y/ppk2fnqj5lscwqw_l6lhdrx8005bt1/T/appengine/go_appengine/goroot/src/runtime/lock_sema.go:107 +0x14b
runtime.(*mheap).alloc_m(0x988540, 0x1, 0x21, 0xec2ff0)
        /private/var/folders/9y/ppk2fnqj5lscwqw_l6lhdrx8005bt1/T/appengine/go_appengine/goroot/src/runtime/mheap.go:492 +0x314
runtime.(*mheap).alloc.func1()
        /private/var/folders/9y/ppk2fnqj5lscwqw_l6lhdrx8005bt1/T/appengine/go_appengine/goroot/src/runtime/mheap.go:502 +0x41
runtime.systemstack(0x7fff5fbfe348)
        /private/var/folders/9y/ppk2fnqj5lscwqw_l6lhdrx8005bt1/T/appengine/go_appengine/goroot/src/runtime/asm_amd64.s:307 +0xab
runtime.(*mheap).alloc(0x988540, 0x1, 0x10000000021, 0xed8f)
        /private/var/folders/9y/ppk2fnqj5lscwqw_l6lhdrx8005bt1/T/appengine/go_appengine/goroot/src/runtime/mheap.go:503 +0x63
runtime.(*mcentral).grow(0x98a680, 0x0)
        /private/var/folders/9y/ppk2fnqj5lscwqw_l6lhdrx8005bt1/T/appengine/go_appengine/goroot/src/runtime/mcentral.go:209 +0x93
runtime.(*mcentral).cacheSpan(0x98a680, 0xec2ff0)
        /private/var/folders/9y/ppk2fnqj5lscwqw_l6lhdrx8005bt1/T/appengine/go_appengine/goroot/src/runtime/mcentral.go:89 +0x47d
runtime.(*mcache).refill(0xafa000, 0x21, 0xec2ff0)
        /private/var/folders/9y/ppk2fnqj5lscwqw_l6lhdrx8005bt1/T/appengine/go_appengine/goroot/src/runtime/mcache.go:119 +0xcc
runtime.mallocgc.func2()
        /private/var/folders/9y/ppk2fnqj5lscwqw_l6lhdrx8005bt1/T/appengine/go_appengine/goroot/src/runtime/malloc.go:642 +0x2b
runtime.systemstack(0x979d00)
        /private/var/folders/9y/ppk2fnqj5lscwqw_l6lhdrx8005bt1/T/appengine/go_appengine/goroot/src/runtime/asm_amd64.s:291 +0x79
runtime.mstart()
        /private/var/folders/9y/ppk2fnqj5lscwqw_l6lhdrx8005bt1/T/appengine/go_appengine/goroot/src/runtime/proc.go:1051

goroutine 1 [running]:
runtime.systemstack_switch()
        /private/var/folders/9y/ppk2fnqj5lscwqw_l6lhdrx8005bt1/T/appengine/go_appengine/goroot/src/runtime/asm_amd64.s:245 fp=0xc8241ed290 sp=0xc8241ed288
runtime.mallocgc(0x500, 0x0, 0x3, 0xc825f0c400)
        /private/var/folders/9y/ppk2fnqj5lscwqw_l6lhdrx8005bt1/T/appengine/go_appengine/goroot/src/runtime/malloc.go:643 +0x869 fp=0xc8241ed368 sp=0xc8241ed290
runtime.rawmem(0x500, 0x200)
        /private/var/folders/9y/ppk2fnqj5lscwqw_l6lhdrx8005bt1/T/appengine/go_appengine/goroot/src/runtime/malloc.go:809 +0x32 fp=0xc8241ed390 sp=0xc8241ed368
runtime.growslice(0x3b2760, 0xc825f0c400, 0x400, 0x400, 0x401, 0x0, 0x0, 0x0)
        /private/var/folders/9y/ppk2fnqj5lscwqw_l6lhdrx8005bt1/T/appengine/go_appengine/goroot/src/runtime/slice.go:95 +0x233 fp=0xc8241ed400 sp=0xc8241ed390
cmd/internal/obj.Symgrow(0xc8200b4000, 0xc8221d5b80, 0x401)
        /private/var/folders/9y/ppk2fnqj5lscwqw_l6lhdrx8005bt1/T/appengine/go_appengine/goroot/src/cmd/internal/obj/data.go:50 +0x237 fp=0xc8241ed4c0 sp=0xc8241ed400
cmd/internal/obj/x86.span6(0xc8200b4000, 0xc8221d5b80)
        /private/var/folders/9y/ppk2fnqj5lscwqw_l6lhdrx8005bt1/T/appengine/go_appengine/goroot/src/cmd/internal/obj/x86/asm6.go:1962 +0x9b9 fp=0xc8241ed650 sp=0xc8241ed4c0
cmd/internal/obj.Flushplist(0xc8200b4000)
        /private/var/folders/9y/ppk2fnqj5lscwqw_l6lhdrx8005bt1/T/appengine/go_appengine/goroot/src/cmd/internal/obj/objfile.go:300 +0x32e fp=0xc8241ed870 sp=0xc8241ed650
cmd/internal/obj.Writeobjdirect(0xc8200b4000, 0xc82039c600)
        /private/var/folders/9y/ppk2fnqj5lscwqw_l6lhdrx8005bt1/T/appengine/go_appengine/goroot/src/cmd/internal/obj/objfile.go:114 +0x21 fp=0xc8241ed888 sp=0xc8241ed870
cmd/compile/internal/gc.dumpobj()
        /private/var/folders/9y/ppk2fnqj5lscwqw_l6lhdrx8005bt1/T/appengine/go_appengine/goroot/src/cmd/compile/internal/gc/obj.go:88 +0xe5f fp=0xc8241edac0 sp=0xc8241ed888
cmd/compile/internal/gc.Main()
        /private/var/folders/9y/ppk2fnqj5lscwqw_l6lhdrx8005bt1/T/appengine/go_appengine/goroot/src/cmd/compile/internal/gc/lex.go:495 +0x2225 fp=0xc8241edde0 sp=0xc8241edac0
cmd/compile/internal/amd64.Main()
        /private/var/folders/9y/ppk2fnqj5lscwqw_l6lhdrx8005bt1/T/appengine/go_appengine/goroot/src/cmd/compile/internal/amd64/galign.go:127 +0x58d fp=0xc8241ede48 sp=0xc8241edde0
main.main()
        /private/var/folders/9y/ppk2fnqj5lscwqw_l6lhdrx8005bt1/T/appengine/go_appengine/goroot/src/cmd/compile/main.go:32 +0x395 fp=0xc8241edf20 sp=0xc8241ede48
runtime.main()
        /private/var/folders/9y/ppk2fnqj5lscwqw_l6lhdrx8005bt1/T/appengine/go_appengine/goroot/src/runtime/proc.go:188 +0x2b0 fp=0xc8241edf70 sp=0xc8241edf20
runtime.goexit()
        /private/var/folders/9y/ppk2fnqj5lscwqw_l6lhdrx8005bt1/T/appengine/go_appengine/goroot/src/runtime/asm_amd64.s:1998 +0x1 fp=0xc8241edf78 sp=0xc8241edf70

And then I spotted "asm_amd64.s" in the stacktrace which made me double check the installation. So Google provides 32-bit version for x86 and 64-bit version for AMD. But there are no Macs with AMD processors!

After installing 32-bit version everything works well. 

Adam (Cloud Platform Support)

unread,
Aug 29, 2016, 4:40:29 PM8/29/16
to Google App Engine
AMD64 is actually the standard used by both Intel and AMD, and is just another name for 'x86-64' or 'x64'. It's so named because AMD first developed the architecture which Intel later adopted. Rest assured, we would not release an SDK for a 'darwin_amd64' architecture if it didn't exist! 

As for the reason it's crashing on your system, it's likely that you just have an older 32-bit version of Go installed. As of Go 1.5, 'darwin-amd64' is the only supported architecture. You can confirm your version and architecture by typing 'go version' from the command prompt.

Otherwise, if you have a very old 2008 or prior Mac with a 1st gen Core processor, your Mac is 32-bit only.

Dmitry Matyukhin

unread,
Aug 30, 2016, 11:35:50 AM8/30/16
to Google App Engine
Adam, thanks for clarification.

I just tried to install it on another machine - MacBook Pro and I can confirm that 64-bit works. The problem was happening on 12-inch MacBook which is also 64-bit, but I'll double check the version of go that is installed.

Dmitry Matyukhin

unread,
Aug 30, 2016, 3:29:46 PM8/30/16
to Google App Engine
Just double checked on my MacBook (12" with Intel Core M),

$goapp version
go version go1.6.2 (appengine-1.9.40) darwin/amd64

Initially `go` wasn't installed at all, but 32-bit goapp SDK worked. So I installed it with brew and got:
$go version
go version go1.7 darwin/amd64

It still crashes.

$ system_profiler SPHardwareDataType
Hardware:

    Hardware Overview:

      Model Name: MacBook
      Model Identifier: MacBook8,1
      Processor Name: Intel Core M
      Processor Speed: 1.3 GHz
      Number of Processors: 1
      Total Number of Cores: 2
      L2 Cache (per Core): 256 KB
      L3 Cache: 4 MB
      Memory: 8 GB
      Boot ROM Version: MB81.0164.B18
      SMC Version (system): 2.25f87
      Serial Number (system): C02PM0NFGCN2
      Hardware UUID: 433DD06F-1BCF-5AA8-884C-FA7B668C0B82

According to Intel, it is a 64-bit processor.

Adam (Cloud Platform Support)

unread,
Sep 2, 2016, 7:00:34 PM9/2/16
to Google App Engine
Interesting. This may be worth a cross post to the google-appengine issue tracker to see if someone with a similarly spec'd Mac can reproduce it.

Dmitry Matyukhin

unread,
Sep 10, 2016, 4:23:07 PM9/10/16
to Google App Engine
It seems that the problem is in the new macOS Sierra. I just installed the GM on my main laptop, where appengine used to work and I get exactly the same crash. And I just realised that the other laptop where it was crashing, also had macOS Sierra.

Just searched on the issue tracker and there is already a report - https://code.google.com/p/googleappengine/issues/detail?id=13198 and the crash log look the same.

Matthew Davie

unread,
Sep 20, 2016, 1:53:27 PM9/20/16
to Google App Engine
I've had the same issue on 3 different machines that had installed Sierra. Hopefully GAE 1.9.42 can address this, as 1.9.40 will not compile because it doesn't use Go 1.7.x.

Jose Bagatelli

unread,
Oct 2, 2016, 11:05:41 PM10/2/16
to Google App Engine
This is an issue with MacOs Sierra. Even tough some people are working on fixing this in GAE, is more likely that Apple needs to provide a patch in the MacOs Sierra. Check this thread for updates on the issue.
Reply all
Reply to author
Forward
0 new messages