Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pebbledb: panic during upgrade w/ Cosmos SDK #126

Closed
melekes opened this issue Jan 25, 2024 · 2 comments
Closed

pebbledb: panic during upgrade w/ Cosmos SDK #126

melekes opened this issue Jan 25, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@melekes
Copy link
Contributor

melekes commented Jan 25, 2024

Refs #112 (comment)

At the upgrade block, the Cosmos SDK will panic without flushing data to disk or closing dbs properly.

Upgrade guide:

1. After seeing `UPGRADE "xxxx" NEED at height....`, restart the current version with `-X github.com/tendermint/tm-db.ForceSync=1`
2. Restart the new version as normal

Example: Upgrading sifchain from v0.14.0 to v0.15.0

# log:
panic: UPGRADE "0.15.0" NEEDED at height: 8170210: {"binaries":{"linux/amd64":"https://github.com/Sifchain/sifnode/releases/download/v0.15.0/sifnoded-v0.15.0-linux-amd64.zip?checksum=0c03b5846c5a13dcc0d9d3127e4f0cee0aeddcf2165177b2f2e0d60dbcf1a5ea"}}
# step1
git reset --hard
git checkout v0.14.0
go mod edit -replace github.com/tendermint/tm-db=github.com/baabeetaa/tm-db@pebble
go mod tidy
go install -tags pebbledb -ldflags "-w -s -X github.com/cosmos/cosmos-sdk/types.DBBackend=pebbledb -X github.com/tendermint/tm-db.ForceSync=1" ./cmd/sifnoded
$HOME/go/bin/sifnoded start --db_backend=pebbledb
# step 2
git reset --hard
git checkout v0.15.0
go mod edit -replace github.com/tendermint/tm-db=github.com/baabeetaa/tm-db@pebble
go mod tidy
go install -tags pebbledb -ldflags "-w -s -X github.com/cosmos/cosmos-sdk/types.DBBackend=pebbledb" ./cmd/sifnoded
$HOME/go/bin/sifnoded start --db_backend=pebbledb
@melekes melekes changed the title pebbledb: pebbledb: panic during upgrade w/ Cosmos SDK Jan 25, 2024
@melekes melekes added the bug Something isn't working label Jan 25, 2024
@melekes
Copy link
Contributor Author

melekes commented Sep 10, 2024

Is anyone still experiencing this issue?

@melekes
Copy link
Contributor Author

melekes commented Sep 10, 2024

I will close this, but please comment if the issue persists.

@melekes melekes closed this as not planned Won't fix, can't repro, duplicate, stale Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant