influxdata / flux

Flux is a lightweight scripting language for querying databases (like InfluxDB) and working with data. It's part of InfluxDB 1.7 and 2.0, but can be run independently of those.
https://influxdata.com
MIT License
767 stars 153 forks source link

ARM64 Panic #938

Open davidgs opened 5 years ago

davidgs commented 5 years ago

When running 2.0Alpha on Armbian aarch64 linux I get the following panic when attempting to select a bucket in Chronograf.

2019-01-31T01:39:05.653826Z info Execute source panic {"log_id": "0DKOfND0000", "service": "storage-reads", "error": "runtime error: invalid memory address or nil pointer dereference"} goroutine 951 [running]: runtime/debug.Stack(0x40000c8a20, 0x1147e00, 0xf4fb58) /usr/local/go/src/runtime/debug/stack.go:24 +0x88 github.com/influxdata/flux/execute.(*executionState).do.func1.1(0x4001c31a80) /go/pkg/mod/github.com/influxdata/flux@v0.17.0/execute/executor.go:260 +0x170 panic(0xd3e720, 0x1ecaf00) /usr/local/go/src/runtime/panic.go:513 +0x18c github.com/apache/arrow/go/arrow/memory.Set(0x40024bd500, 0x40, 0x40, 0x7fa43b5600) /go/pkg/mod/github.com/apache/arrow/go/arrow@v0.0.0-20190107214733-134081bea48d/memory/memory.go:25 +0x40 github.com/apache/arrow/go/arrow/array.(*bufferBuilder).resize(0x4002a4a960, 0xc) /go/pkg/mod/github.com/apache/arrow/go/arrow@v0.0.0-20190107214733-134081bea48d/array/bufferbuilder.go:82 +0xac github.com/apache/arrow/go/arrow/array.(*BinaryBuilder).Resize(0x4000e25200, 0x2) /go/pkg/mod/github.com/apache/arrow/go/arrow@v0.0.0-20190107214733-134081bea48d/array/binarybuilder.go:150 +0x38 github.com/apache/arrow/go/arrow/array.(*BinaryBuilder).Resize-fm(0x2) /go/pkg/mod/github.com/apache/arrow/go/arrow@v0.0.0-20190107214733-134081bea48d/array/binarybuilder.go:144 +0x28 github.com/apache/arrow/go/arrow/array.(*builder).reserve(0x4000e25200, 0x1, 0x4002727ca0) /go/pkg/mod/github.com/apache/arrow/go/arrow@v0.0.0-20190107214733-134081bea48d/array/builder.go:138 +0x64 github.com/apache/arrow/go/arrow/array.(*BinaryBuilder).Reserve(0x4000e25200, 0x1) /go/pkg/mod/github.com/apache/arrow/go/arrow@v0.0.0-20190107214733-134081bea48d/array/binarybuilder.go:144 +0x48 github.com/influxdata/flux/arrow.NewString(0x4001aaa690, 0x1, 0x1, 0x4001aa6ae0, 0x1) /go/pkg/mod/github.com/influxdata/flux@v0.17.0/arrow/string.go:12 +0x38 github.com/influxdata/flux/execute.(*stringColumnBuilder).Copy(0x4001e93780, 0x6, 0x6) /go/pkg/mod/github.com/influxdata/flux@v0.17.0/execute/table.go:1855 +0x1d8 github.com/influxdata/flux/execute.(*ColListTableBuilder).Table(0x4002727ea0, 0x5, 0x0, 0x0, 0x0) /go/pkg/mod/github.com/influxdata/flux@v0.17.0/execute/table.go:1189 +0x98 github.com/influxdata/influxdb/query/stdlib/influxdata/influxdb.(*BucketsDecoder).Decode(0x4001e934c0, 0x0, 0x0, 0x0, 0x4000a33940) /go/src/github.com/influxdata/influxdb/query/stdlib/influxdata/influxdb/buckets.go:97 +0x3e0 github.com/influxdata/flux/execute.(*sourceIterator).Do(0x4001e93500, 0x4002727f80, 0x0, 0x779600) /go/pkg/mod/github.com/influxdata/flux@v0.17.0/execute/source_iterator.go:50 +0x94 github.com/influxdata/flux/execute.(*sourceIterator).Run(0x4001e93500, 0x115d860, 0x4003659920) /go/pkg/mod/github.com/influxdata/flux@v0.17.0/execute/source_iterator.go:71 +0x3c github.com/influxdata/flux/execute.(*executionState).do.func1(0x4001c31a80, 0x115d860, 0x4003659920, 0x114df60, 0x4001e93500) /go/pkg/mod/github.com/influxdata/flux@v0.17.0/execute/executor.go:265 +0x60 created by github.com/influxdata/flux/execute.(*executionState).do /go/pkg/mod/github.com/influxdata/flux@v0.17.0/execute/executor.go:246 +0x88

stuartcarnie commented 5 years ago

The current solution is to specify -tags='noasm' when building InfluxDB for non-x86 architectures. In future, these tags should not be required.

jsternberg commented 5 years ago

@stuartcarnie do you know if there's an Arrow issue we can track with this?

stuartcarnie commented 5 years ago

@jsternberg not that I am aware of. A bug should be created that specifies

for architectures other than x86, the default behavior should inject the standard Go implementations rather than requiring the noasm build tag

timhallinflux commented 4 years ago

@davidgs -- has this been resolved? (i.e. do you mind giving it another shot?)

davidgs commented 4 years ago

I believe this was resolved in influx by this PR: https://github.com/influxdata/influxdb/pull/13542

I'll test to make sure and if not I'll make a similar PR to flux.

github-actions[bot] commented 5 days ago

This issue has had no recent activity and will be closed soon.