Repository: FeatureBaseDB/featurebase

Issue #591: Runtime error: makeslice: len out of range
Created: 2017-05-31T10:39:22Z
Hi,
I tried to use pilosa with uint64 values, however it seems that the server stops working after I index a large value. I followed getting started tutorial with the following steps:
$ curl localhost:10101/index/repository  -X POST  -d '{"options": {"columnLabel": "repo_id"}}'
{}
$ curl localhost:10101/index/repository/frame/stargazer  -X POST -d '{"options": {"rowLabel": "stargazer_id",  "timeQuantum": "YMD", "inverseEnabled": true}}'
{}
$ curl localhost:10101/index/repository/frame/language  -X POST -d '{"options": {"rowLabel": "language_id", "inverseEnabled": true}}'
{}

Imported data from the tutorial, played with all works fine. But if I run:
$ curl localhost:10101/index/repository/query -X POST -d 'SetBit(frame="stargazer", repo_id=77777, stargazer_id=6018148517796380732)'
{"results":[true]}
$ curl localhost:10101/index/repository/query -X POST -d 'Bitmap(frame="stargazer", stargazer_id=6018148517796380732)'
curl: (52) Empty reply from server

And the server prints the following error:
2017/05/31 10:18:51 http: panic serving 127.0.0.1:46892: runtime error: makeslice: len out of range
goroutine 16 [running]:
net/http.(*conn).serve.func1(0xc420e51b80)
	/usr/local/go/src/net/http/server.go:1491 +0x12a
panic(0xa41ae0, 0xc428682d00)
	/usr/local/go/src/runtime/panic.go:458 +0x243
github.com/pilosa/pilosa.(*Executor).Execute(0xc420258690, 0xde71c0, 0xc420876840, 0xc4208766fc, 0xa, 0xc4254dd860, 0xc428682cf8, 0x1, 0x1, 0xc428682c20, ...)
	/Users/cody/gopath/src/github.com/pilosa/pilosa/executor.go:97 +0x1ba
github.com/pilosa/pilosa.(*Handler).handlePostQuery(0xc4201dc100, 0xde62c0, 0xc420ad7930, 0xc4208f1950)
	/Users/cody/gopath/src/github.com/pilosa/pilosa/handler.go:204 +0x34b
github.com/pilosa/pilosa.(*Handler).(github.com/pilosa/pilosa.handlePostQuery)-fm(0xde62c0, 0xc420ad7930, 0xc4208f1950)
	/Users/cody/gopath/src/github.com/pilosa/pilosa/handler.go:93 +0x48
net/http.HandlerFunc.ServeHTTP(0xc4201d9ef0, 0xde62c0, 0xc420ad7930, 0xc4208f1950)
	/usr/local/go/src/net/http/server.go:1726 +0x44
github.com/pilosa/pilosa/vendor/github.com/gorilla/mux.(*Router).ServeHTTP(0xc4201f00a0, 0xde62c0, 0xc420ad7930, 0xc4208f1950)
	/Users/cody/gopath/src/github.com/pilosa/pilosa/vendor/github.com/gorilla/mux/mux.go:114 +0x10d
github.com/pilosa/pilosa.(*Handler).ServeHTTP(0xc4201dc100, 0xde62c0, 0xc420ad7930, 0xc4208f1770)
	/Users/cody/gopath/src/github.com/pilosa/pilosa/handler.go:129 +0x4d
net/http.serverHandler.ServeHTTP(0xc42011e700, 0xde62c0, 0xc420ad7930, 0xc4208f1770)
	/usr/local/go/src/net/http/server.go:2202 +0x7d
net/http.(*conn).serve(0xc420e51b80, 0xde7100, 0xc4253b8400)
	/usr/local/go/src/net/http/server.go:1579 +0x4b7
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2293 +0x44d

And all consecutive Bitmap queries fail with the same error.
Information about your environment (OS/architecture, CPU, RAM, cluster/solo, configuration, etc.)
I tried this on solo version on OS X using binary release, Docker, Amazon AWS instance with Amazon Linux AMI release 2017.03, 4.4.35-33.55.amzn1.x86_64, 16GB ram using binary release. Same result everywhere.
P.S. It seems like an awesome product! Thanks.

Duplicate issue #1147: Unable to retrieve very lage columnID's
Created: 2018-02-25T10:37:53Z
When inserting a bit at columnid: 9,223,372,036,854,775,806 .   (INT64 max - 1)
And then try to retrieve the row, we get a panic in pilosa:
PANIC: runtime error: makeslice: len out of range
goroutine 82 [running]:
runtime/debug.Stack(0xc420060000, 0x1f4, 0xbfec40)
/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
github.com/pilosa/pilosa.(*Handler).ServeHTTP.func1(0xc067e0, 0xc420060000, 0xc420137340)
/go/src/github.com/pilosa/pilosa/handler.go:158 +0x91
panic(0xab38a0, 0xbfec40)
/usr/local/go/src/runtime/panic.go:505 +0x229
github.com/pilosa/pilosa.(*Executor).Execute(0xc4201f0820, 0xc07320, 0xc42056c180, 0xc4201b400c, 0x4, 0xc42043d300, 0x0, 0x0, 0x0, 0xc420024568, ...)
/go/src/github.com/pilosa/pilosa/executor.go:100 +0x156
github.com/pilosa/pilosa.(*Handler).handlePostQuery(0xc420137340, 0xc067e0, 0xc420060000, 0xc4201c4300)
/go/src/github.com/pilosa/pilosa/handler.go:267 +0x2f4
github.com/pilosa/pilosa.(*Handler).(github.com/pilosa/pilosa.handlePostQuery)-fm(0xc067e0, 0xc420060000, 0xc4201c4300)
/go/src/github.com/pilosa/pilosa/handler.go:131 +0x48
net/http.HandlerFunc.ServeHTTP(0xc420234eb0, 0xc067e0, 0xc420060000, 0xc4201c4300)
/usr/local/go/src/net/http/server.go:1947 +0x44
github.com/pilosa/pilosa/vendor/github.com/gorilla/mux.(*Router).ServeHTTP(0xc42001c420, 0xc067e0, 0xc420060000, 0xc4201c4300)
/go/src/github.com/pilosa/pilosa/vendor/github.com/gorilla/mux/mux.go:150 +0xed
github.com/pilosa/pilosa.(*Handler).ServeHTTP(0xc420137340, 0xc067e0, 0xc420060000, 0xc4201c4000)
/go/src/github.com/pilosa/pilosa/handler.go:166 +0xdd
net/http.serverHandler.ServeHTTP(0xc420158000, 0xc067e0, 0xc420060000, 0xc4201c4000)
/usr/local/go/src/net/http/server.go:2694 +0xbc
net/http.(*conn).serve(0xc420160320, 0xc07260, 0xc420140200)
/usr/local/go/src/net/http/server.go:1830 +0x651
created by net/http.(*Server).Serve
/usr/local/go/src/net/http/server.go:2795 +0x27b
This can be reproduced easily via the webui:
:create index test
:use index test
:create frame test2
SetBit(frame=test2, rowID=0, columnID=9223372036854775806)
Bitmap(frame=test2, rowID=0)

Closing comment (2018-02-26T14:37:14Z): @maartenheremans Thanks for the very clear bug report - this is actually a duplicate of #591 and some follow-on work is discussed in #593.
The short story is that for both row and column ids in Pilosa, you should strive to use sequential ids. There is some work in progress to remove this restriction, and to allow one to use arbitrary strings for row and column ids, but it is still early.
I'll try to find a good place to make this restriction more clear in our documentation - let us know if there is anything else we can help with!