binaryholdings / cosmprund

118 stars 73 forks source link

Issue using cosmprund with PebbleDB #21

Open gzukel opened 1 year ago

gzukel commented 1 year ago

Trying to use cosmprund with PebbleDB bacakend and getting the following error. Any help here would be appreciated.

`snapshot-0: # cosmprund prune data/ panic: runtime error: makeslice: len out of range

goroutine 1 [running]: github.com/syndtr/goleveldb/leveldb.(sessionRecord).readBytes(0xc0002511d8, {0x1032a6e, 0xd}, {0x7f746f1ca4a0?, 0xc000563d60}) /go/pkg/mod/github.com/syndtr/goleveldb@v1.0.1-0.20210819022825-2ae1ddf74ef7/leveldb/session_record.go:236 +0xb2 github.com/syndtr/goleveldb/leveldb.(sessionRecord).decode(0xc0002511d8, {0x12d9a80?, 0xc000563d60}) /go/pkg/mod/github.com/syndtr/goleveldb@v1.0.1-0.20210819022825-2ae1ddf74ef7/leveldb/session_record.go:300 +0x4b7 github.com/syndtr/goleveldb/leveldb.(session).recover(0xc0001613b0) /go/pkg/mod/github.com/syndtr/goleveldb@v1.0.1-0.20210819022825-2ae1ddf74ef7/leveldb/session.go:170 +0x4d1 github.com/syndtr/goleveldb/leveldb.Open({0x12ecce0?, 0xc000eb3c70?}, 0x4fe900?) /go/pkg/mod/github.com/syndtr/goleveldb@v1.0.1-0.20210819022825-2ae1ddf74ef7/leveldb/db.go:189 +0xa5 github.com/syndtr/goleveldb/leveldb.OpenFile({0xc000146678?, 0x1030f58?}, 0xc000d4fc48) /go/pkg/mod/github.com/syndtr/goleveldb@v1.0.1-0.20210819022825-2ae1ddf74ef7/leveldb/db.go:225 +0x5d github.com/tendermint/tm-db.NewGoLevelDBWithOpts({0x1030f58?, 0x7f746f4c4c40?}, {0xc000ec28ea?, 0x200000041964d?}, 0x1abd758?) /go/pkg/mod/github.com/tendermint/tm-db@v0.6.7-0.20211116222540-a25e8a84a035/goleveldb.go:32 +0x7c github.com/binaryholdings/cosmos-pruner/cmd.pruneAppState({0x7ffd2b99ae5f?, 0xc000eb0d20?}) /go/cosmprund/cmd/pruner.go:83 +0x92 github.com/binaryholdings/cosmos-pruner/cmd.pruneCmd.func1(0xc000ea0c80?, {0xc000eca280, 0x1, 0x1}) /go/cosmprund/cmd/pruner.go:57 +0xff github.com/spf13/cobra.(Command).execute(0xc000ea0c80, {0xc000eca260, 0x1, 0x1}) /go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:856 +0x67c github.com/spf13/cobra.(Command).ExecuteC(0xc000ea0a00) /go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:974 +0x3bd github.com/spf13/cobra.(Command).Execute(...) /go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:902 github.com/binaryholdings/cosmos-pruner/cmd.Execute() /go/cosmprund/cmd/root.go:91 +0x38 main.main() /go/cosmprund/main.go:8 +0x17`