Closed nak3 closed 7 years ago
mod
$ ./bin/torusctl init $ ./bin/torusctl ring manual-change --type=mod $ ./bin/torusctl ring get Ring: Mod Replication:2 Peers:
$ ./bin/torusd --peer-address=http://127.0.0.1:4000 --auto-join --size=10GiB
$ ./bin/torusctl volume create-block testVol 1GiB $ sudo ./bin/torusblk nbd testVol
mkfs
# mkfs.ext4 /dev/nbd0
$ ./bin/torusd --peer-address=http://127.0.0.1:4000 --auto-join --size=10GiB 2016-12-11 00:16:02.134144 I | torus: creating metadata service: etcd 2016-12-11 00:16:02.138125 I | torus: creating blockstore: mfile 2016-12-11 00:16:02.138345 I | storage: loading block index... 2016-12-11 00:16:02.138709 I | storage: done loading block index panic: runtime error: slice bounds out of range
goroutine 99 [running]: panic(0xa01680, 0xc420010180) /usr/local/go/src/runtime/panic.go:500 +0x1a1 github.com/coreos/torus/distributor.(Distributor).GetBlock(0xc42030e6c0, 0x7f31b7c74fe8, 0xc4203e2540, 0x10000000002, 0x5, 0x1, 0x0, 0x0, 0x0, 0x0, ...) /home/knakayam/.go/src/github.com/coreos/torus/distributor/storage.go:37 +0x953 github.com/coreos/torus.(INodeStore).GetINode(0xc42013b7a0, 0x7f31b7c74fe8, 0xc4203e2540, 0x2, 0x5, 0x1, 0xc4203c0860, 0x0) /home/knakayam/.go/src/github.com/coreos/torus/inode.go:94 +0x11c github.com/coreos/torus/block.(blockvolGC).PrepVolume(0xc420317780, 0xc4203d3bc0, 0x0, 0x0) /home/knakayam/.go/src/github.com/coreos/torus/block/gc_block_vol.go:70 +0x3fc github.com/coreos/torus/gc.(controller).PrepVolume(0xc42013b7c0, 0xc4203d3bc0, 0x0, 0x0) /home/knakayam/.go/src/github.com/coreos/torus/gc/gc.go:49 +0x5e github.com/coreos/torus/distributor/rebalance.(rebalancer).PrepVolume(0xc420158ba0, 0xc4203d3bc0, 0x2, 0x2) /home/knakayam/.go/src/github.com/coreos/torus/distributor/rebalance/rebalancer.go:59 +0x3e github.com/coreos/torus/distributor.(Distributor).rebalanceTicker(0xc42030e6c0, 0xc420158c00) /home/knakayam/.go/src/github.com/coreos/torus/distributor/rebalance.go:55 +0x147 created by github.com/coreos/torus/distributor.newDistributor /home/knakayam/.go/src/github.com/coreos/torus/distributor/distributor.go:69 +0x540
version
steps to reproduce
1. Setup ring type
mod
.2. Run only 1 peer
3. Create test volume and attach it to nbd
4. Write to the volume (e.g
mkfs
)actual result
goroutine 99 [running]: panic(0xa01680, 0xc420010180) /usr/local/go/src/runtime/panic.go:500 +0x1a1 github.com/coreos/torus/distributor.(Distributor).GetBlock(0xc42030e6c0, 0x7f31b7c74fe8, 0xc4203e2540, 0x10000000002, 0x5, 0x1, 0x0, 0x0, 0x0, 0x0, ...) /home/knakayam/.go/src/github.com/coreos/torus/distributor/storage.go:37 +0x953 github.com/coreos/torus.(INodeStore).GetINode(0xc42013b7a0, 0x7f31b7c74fe8, 0xc4203e2540, 0x2, 0x5, 0x1, 0xc4203c0860, 0x0) /home/knakayam/.go/src/github.com/coreos/torus/inode.go:94 +0x11c github.com/coreos/torus/block.(blockvolGC).PrepVolume(0xc420317780, 0xc4203d3bc0, 0x0, 0x0) /home/knakayam/.go/src/github.com/coreos/torus/block/gc_block_vol.go:70 +0x3fc github.com/coreos/torus/gc.(controller).PrepVolume(0xc42013b7c0, 0xc4203d3bc0, 0x0, 0x0) /home/knakayam/.go/src/github.com/coreos/torus/gc/gc.go:49 +0x5e github.com/coreos/torus/distributor/rebalance.(rebalancer).PrepVolume(0xc420158ba0, 0xc4203d3bc0, 0x2, 0x2) /home/knakayam/.go/src/github.com/coreos/torus/distributor/rebalance/rebalancer.go:59 +0x3e github.com/coreos/torus/distributor.(Distributor).rebalanceTicker(0xc42030e6c0, 0xc420158c00) /home/knakayam/.go/src/github.com/coreos/torus/distributor/rebalance.go:55 +0x147 created by github.com/coreos/torus/distributor.newDistributor /home/knakayam/.go/src/github.com/coreos/torus/distributor/distributor.go:69 +0x540