Comcast/rulio

Get this to work on ARM

Opened this issue · 1 comments

ARM Processor: The Raspberry Pi 3 uses a Broadcom BCM2837 SoC with a 1.2 GHz 64-bit quad-core ARM Cortex-A53 processor, with 512 KB shared L2 cache.

compile like so env GOOS=linux GOARCH=arm go build -ldflags "-s"
added fact via curl -s -d 'fact={"have":"tacos"}' "$ENDPOINT/api/loc/facts/add?location=$LOCATION"

Panic:

2016/09/21 05:10:03.633048 server.go:2161: http: panic serving 192.168.1.107:52556: runtime error: invalid memory address or nil pointer dereference
goroutine 38 [running]:
net/http.(*conn).serve.func1(0x10e813c0)
    /Users/zeushammer/go/src/net/http/server.go:1389 +0x9c
panic(0x6da970, 0x10d24030)
    /Users/zeushammer/go/src/runtime/panic.go:443 +0x448
sync/atomic.addUint64(0x10f6ca84, 0x1, 0x0, 0x1, 0x0)
    /Users/zeushammer/go/src/sync/atomic/64bit_arm.go:31 +0x68
github.com/Comcast/rulio/core.Inc(0x10f6ca84, 0x1, 0x0)
    /Users/zeushammer/gocode/src/github.com/Comcast/rulio/core/util.go:236 +0x2c
github.com/Comcast/rulio/core.(*Location).addFact(0x10f6ca50, 0x10e21300, 0x0, 0x0, 0x10f08ae0, 0x0, 0x0, 0x0, 0x0)
    /Users/zeushammer/gocode/src/github.com/Comcast/rulio/core/location.go:485 +0x53c
github.com/Comcast/rulio/core.(*Location).AddFact(0x10f6ca50, 0x10e21300, 0x0, 0x0, 0x10f08ae0, 0x0, 0x0, 0x0, 0x0)
    /Users/zeushammer/gocode/src/github.com/Comcast/rulio/core/location.go:469 +0x944
github.com/Comcast/rulio/sys.(*System).AddFact(0x10e04c30, 0x10e21300, 0x10ec8fe1, 0x4, 0x0, 0x0, 0x10ecb8d0, 0x10, 0x0, 0x0, ...)
    /Users/zeushammer/gocode/src/github.com/Comcast/rulio/sys/system.go:919 +0x11ec
github.com/Comcast/rulio/service.(*Service).ProcessRequest(0x10ecaa80, 0x10e21300, 0x10f08680, 0x76ee2708, 0x10e21280, 0x0, 0x0, 0x0)
    /Users/zeushammer/gocode/src/github.com/Comcast/rulio/service/service.go:895 +0x353c
github.com/Comcast/rulio/service.(*HTTPService).ServeHTTP(0x10ebf7c0, 0x76ee2690, 0x10e21280, 0x10dff880)
    /Users/zeushammer/gocode/src/github.com/Comcast/rulio/service/httpd.go:453 +0x948
net/http.serverHandler.ServeHTTP(0x10e30820, 0x76ee2690, 0x10e21280, 0x10dff880)
    /Users/zeushammer/go/src/net/http/server.go:2081 +0x190
net/http.(*conn).serve(0x10e813c0)
    /Users/zeushammer/go/src/net/http/server.go:1472 +0xee4
created by net/http.(*Server).Serve
    /Users/zeushammer/go/src/net/http/server.go:2137 +0x3bc
{"_at":"/Users/zeushammer/gocode/src/github.com/Comcast/rulio/service/httpd.go:503","app.id":"rulesys","appId":"main","comp":"misc","conn":{},"corelev":"info","ctxLocation":"none","level":65824,"local":{"IP":"192.168.1.123","Port":8001,"Zone":""},"op":"service.Server","origin":"sys","remote":{"IP":"192.168.1.107","Port":52556,"Zone":""},"state":4}```

What Go version(s)?