go-redis-pmem runtime error while running against memtier-benchmark
Opened this issue · 0 comments
jerrinsg commented
Running go-redis-pmem with memtier benchmark is resulting in the following runtime error:
./app
First time initialization
Go-redis is ready to accept connections
Dictionary used / size: 4079 / 1024 ,Resize table to: 4096
panic: runtime error: index out of range [115] with length 0
memtier_benchmark --ratio=1:0 --data-size-range=32-1000 --random-data --clients=5 —threads=5 --distinct-client-seed --requests=50000 --hide-histogram --pipeline=128 —randomize
goroutine 60 [running]:
github.com/vmware-samples/go-redis-pmem/redis.(*dict).lockShard(0xc006308000, 0x1, 0x73)
/home/jerrin/gocode/src/github.com/vmware-samples/go-redis-pmem/redis/dictionary.go:368 +0x15a
github.com/vmware-samples/go-redis-pmem/redis.(*dict).lockKey(0xc006308000, 0xc001979b10, 0xf, 0xf)
/home/jerrin/gocode/src/github.com/vmware-samples/go-redis-pmem/redis/dictionary.go:309 +0xba
github.com/vmware-samples/go-redis-pmem/redis.(*redisDb).lockKeyWrite(0xc006304000, 0xc001979b10, 0xf, 0xf)
/home/jerrin/gocode/src/github.com/vmware-samples/go-redis-pmem/redis/db.go:129 +0x85
github.com/vmware-samples/go-redis-pmem/redis.setGeneric(0xc000420240, 0x0, 0xc001979b10, 0xf, 0xf, 0xc0019209c0, 0xb1, 0xb1, 0x0, 0x0, ...)
/home/jerrin/gocode/src/github.com/vmware-samples/go-redis-pmem/redis/t_string.go:94 +0x7a
github.com/vmware-samples/go-redis-pmem/redis.setCommand(0xc000420240)
/home/jerrin/gocode/src/github.com/vmware-samples/go-redis-pmem/redis/t_string.go:61 +0x316
github.com/vmware-samples/go-redis-pmem/redis.(*client).processCommand(0xc000420240)
/home/jerrin/gocode/src/github.com/vmware-samples/go-redis-pmem/redis/server.go:425 +0x10d
github.com/vmware-samples/go-redis-pmem/redis.(*client).processInput(0xc000420240)
/home/jerrin/gocode/src/github.com/vmware-samples/go-redis-pmem/redis/server.go:317 +0x9c
github.com/vmware-samples/go-redis-pmem/redis.(*server).handleClient(0xc0001a0590, 0xc000296008)
/home/jerrin/gocode/src/github.com/vmware-samples/go-redis-pmem/redis/server.go:272 +0x5f
created by github.com/vmware-samples/go-redis-pmem/redis.(*server).Start
/home/jerrin/gocode/src/github.com/vmware-samples/go-redis-pmem/redis/server.go:199 +0x199
panic: runtime error: index out of range [1109] with length 0
Error seems to be during lock acquisition inside a txn{} block:
364 func (d *dict) lockShard(t, s int) {
365 // ReadOnly commands will aquire readOnly tx and read locks, otherwise
366 // WLock is aquired.
367 txn("undo") {
368 d.tab[t].bucketlock[s].Lock() // <<<<<<<<<< ERROR SEEN HERE
369 }
370 }
This error is seen while running with the txn{} version of go-redis-pmem. It is not seen with the Log3 version of go-redis-pmem. Assigning to Mohit to take a look.