-
Notifications
You must be signed in to change notification settings - Fork 20.5k
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
Geth DB corruption for gcmode=archive #16607
Comments
I can confirm that we had several Unfortunately the logs rolled over because it kept trying to restart, so I don't have the original panic, but do have the panic that occurs when trying to restart:
If there's anything I can capture from the chaindata that would help pinpoint what caused this please let me know. |
We're seeing the same issue. The panic itself seems to be caused by a trivial bug in the leveldb code: https://github.com/ethereum/go-ethereum/blob/master/vendor/github.com/syndtr/goleveldb/leveldb/util.go#L30 |
Thanks @tstranex for finding the fix! If anyone needs a branch with his fix vendored in you can use this one, it's just 1.8.6 with leveled vendored from his PR, and an update to the version.go to correctly identify it as patched. https://github.com/ryanschneider/go-ethereum/tree/leveldb-patch-186 Hopefully 1.8.7 gets released ASAP, even if the leveled team is slow to accept the PR. /cc @karalabe and @holiman I guess this also means |
Hi there,
3 days ago all my Geth instances (6 of them) running in gcmode=archive were corrupted. Nodes that were running with fastmode=full were unaffected.
I was unable to just restart Geth, so I restored it from a backup and let it catch up with the chain. Unfortunately, after 2 days of syncing, I got the same bug.
PS: I also tried syncing with an older Geth version (i.e v.1.8.1 and 1.7.3) without any luck.
System information
Geth version: 1.8.6 and older
OS & Version: Linux
Commit hash : (if
develop
)(128GB RAM with 32cores and 4TB ssd)
Expected behaviour
Geth should sync
Actual behaviour
Geth crashes
Backtrace
INFO [04-30|02:48:56] Imported new chain segment blocks=15 txs=1689 mgas=97.669 elapsed=8.217s mgasps=11.886 number=5528514 hash=0c644d…c6a4d8 cache=0.00B
panic: runtime error: index out of range [recovered]
panic: runtime error: index out of range [recovered]
panic: runtime error: index out of range
goroutine 15 [running]:
github.com/ethereum/go-ethereum/vendor/github.com/syndtr/goleveldb/leveldb.(*DB).mCompaction.func1(0xc82582df28, 0xc4202c84e0)
/home/travis/gopath/src/github.com/ethereum/go-ethereum/vendor/github.com/syndtr/goleveldb/leveldb/db_compaction.go:741 +0xf1
panic(0xdd05a0, 0x17601a0)
/home/travis/.gimme/versions/go1.10.linux.amd64/src/runtime/panic.go:505 +0x229
github.com/ethereum/go-ethereum/vendor/github.com/syndtr/goleveldb/leveldb.(*DB).compactionTransact.func1(0x108d780, 0xcc4c83b150, 0xc4202c84e0, 0xc581c5f0b0, 0xc)
/home/travis/gopath/src/github.com/ethereum/go-ethereum/vendor/github.com/syndtr/goleveldb/leveldb/db_compaction.go:158 +0x1a9
panic(0xdd05a0, 0x17601a0)
/home/travis/.gimme/versions/go1.10.linux.amd64/src/runtime/panic.go:505 +0x229
github.com/ethereum/go-ethereum/vendor/github.com/syndtr/goleveldb/leveldb.shortenb(0x100d14b2d84, 0x4, 0xc82582d4a8)
/home/travis/gopath/src/github.com/ethereum/go-ethereum/vendor/github.com/syndtr/goleveldb/leveldb/util.go:30 +0x136
github.com/ethereum/go-ethereum/vendor/github.com/syndtr/goleveldb/leveldb.(*version).computeCompaction(0xc5835aa0a0)
/home/travis/gopath/src/github.com/ethereum/go-ethereum/vendor/github.com/syndtr/goleveldb/leveldb/version.go:395 +0x47a
github.com/ethereum/go-ethereum/vendor/github.com/syndtr/goleveldb/leveldb.(*versionStaging).finish(0xc82582d7a0, 0xc6c5006000)
/home/travis/gopath/src/github.com/ethereum/go-ethereum/vendor/github.com/syndtr/goleveldb/leveldb/version.go:510 +0x893
github.com/ethereum/go-ethereum/vendor/github.com/syndtr/goleveldb/leveldb.(*version).spawn(0xc866248410, 0xc6c5006000, 0xc866248410)
/home/travis/gopath/src/github.com/ethereum/go-ethereum/vendor/github.com/syndtr/goleveldb/leveldb/version.go:279 +0x63
github.com/ethereum/go-ethereum/vendor/github.com/syndtr/goleveldb/leveldb.(*session).commit(0xc4200f9600, 0xc6c5006000, 0x0, 0x0)
/home/travis/gopath/src/github.com/ethereum/go-ethereum/vendor/github.com/syndtr/goleveldb/leveldb/session.go:195 +0x7e
github.com/ethereum/go-ethereum/vendor/github.com/syndtr/goleveldb/leveldb.(*DB).compactionCommit.func1(0xc581c5f0c0, 0xc5835aa001, 0xc581c5f0c0)
/home/travis/gopath/src/github.com/ethereum/go-ethereum/vendor/github.com/syndtr/goleveldb/leveldb/db_compaction.go:263 +0x37
github.com/ethereum/go-ethereum/vendor/github.com/syndtr/goleveldb/leveldb.(*compactionTransactFunc).run(0xcc4c83b150, 0xc581c5f0c0, 0x108d780, 0xcc4c83b150)
/home/travis/gopath/src/github.com/ethereum/go-ethereum/vendor/github.com/syndtr/goleveldb/leveldb/db_compaction.go:241 +0x33
github.com/ethereum/go-ethereum/vendor/github.com/syndtr/goleveldb/leveldb.(*DB).compactionTransact(0xc4202c84e0, 0xc581c5f0b0, 0xc, 0x108d780, 0xcc4c83b150)
/home/travis/gopath/src/github.com/ethereum/go-ethereum/vendor/github.com/syndtr/goleveldb/leveldb/db_compaction.go:185 +0x162
github.com/ethereum/go-ethereum/vendor/github.com/syndtr/goleveldb/leveldb.(*DB).compactionTransactFunc(0xc4202c84e0, 0xc581c5f0b0, 0xc, 0xc5835a4340, 0x0)
/home/travis/gopath/src/github.com/ethereum/go-ethereum/vendor/github.com/syndtr/goleveldb/leveldb/db_compaction.go:252 +0x88
github.com/ethereum/go-ethereum/vendor/github.com/syndtr/goleveldb/leveldb.(*DB).compactionCommit(0xc4202c84e0, 0xf097a3, 0x5, 0xc6c5006000)
/home/travis/gopath/src/github.com/ethereum/go-ethereum/vendor/github.com/syndtr/goleveldb/leveldb/db_compaction.go:262 +0x11e
github.com/ethereum/go-ethereum/vendor/github.com/syndtr/goleveldb/leveldb.(*DB).memCompaction(0xc4202c84e0)
/home/travis/gopath/src/github.com/ethereum/go-ethereum/vendor/github.com/syndtr/goleveldb/leveldb/db_compaction.go:322 +0x4a5
github.com/ethereum/go-ethereum/vendor/github.com/syndtr/goleveldb/leveldb.(*DB).mCompaction(0xc4202c84e0)
/home/travis/gopath/src/github.com/ethereum/go-ethereum/vendor/github.com/syndtr/goleveldb/leveldb/db_compaction.go:755 +0x81
created by github.com/ethereum/go-ethereum/vendor/github.com/syndtr/goleveldb/leveldb.openDB
/home/travis/gopath/src/github.com/ethereum/go-ethereum/vendor/github.com/syndtr/goleveldb/leveldb/db.go:149 +0x649
The text was updated successfully, but these errors were encountered: