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

testnet: Panic when running with address index on. #2944

Closed
JoeGruffins opened this issue May 10, 2022 · 4 comments
Closed

testnet: Panic when running with address index on. #2944

JoeGruffins opened this issue May 10, 2022 · 4 comments

Comments

@JoeGruffins
Copy link
Member

2022-05-10 15:28:05.662 [INF] CHAN: Updated 14446 entries (794446 total)
2022-05-10 15:28:05.662 [INF] CHAN: Done updating block index.  Total entries: 794446 in 14.095s
2022-05-10 15:28:05.662 [INF] CHAN: Done upgrading database in 10m34.671s.
2022-05-10 15:28:05.663 [INF] CHAN: Loading block index...
2022-05-10 15:28:11.567 [INF] STKE: Stake database version 1 loaded
2022-05-10 15:28:11.568 [INF] CHAN: UTXO cache initializing (max size: 150 MiB)...
2022-05-10 15:28:11.569 [INF] CHAN: UTXO cache initialization completed
2022-05-10 15:28:11.569 [INF] CHAN: Blockchain database version info: chain: 12, compression: 1, block index: 3, spend journal: 3
2022-05-10 15:28:11.569 [INF] CHAN: UTXO database version info: version: 2, compression: 1, utxo set: 3
2022-05-10 15:28:11.569 [INF] CHAN: Best known header: height 794060, hash 00000000f3aacfcdeaa6c1f5b19d4bfac5376b70f84a15564d3f13076d821f18
2022-05-10 15:28:11.569 [INF] CHAN: Chain state: height 788199, hash 00000000adda47021bf3b26489acc68b10f49e66b0055dd7bbc3e1ad93a6c41b, total transactions 11369004, work 16436333458924431171, progress 99.26%
2022-05-10 15:28:11.569 [INF] INDX: Transaction index is enabled
2022-05-10 15:28:11.570 [INF] INDX: Address index is enabled
2022-05-10 15:28:11.570 [INF] INDX: address index: recovering from tip 691713 (000000000005707b04e7099cae5a13e841050b7f945826b40eaf5cdca162839b)
2022-05-10 15:28:11.594 [CRT] CHAN: missing spend journal data for 000000000005707b04e7099cae5a13e841050b7f945826b40eaf5cdca162839b
2022-05-10 15:28:11.594 [INF] DCRD: Gracefully shutting down the UTXO database...
2022-05-10 15:28:11.594 [INF] DCRD: Gracefully shutting down the block database...
2022-05-10 15:28:12.084 [INF] DCRD: Shutdown complete
panic: missing spend journal data for 000000000005707b04e7099cae5a13e841050b7f945826b40eaf5cdca162839b [recovered]
        panic: missing spend journal data for 000000000005707b04e7099cae5a13e841050b7f945826b40eaf5cdca162839b

goroutine 1 [running]:
github.com/decred/dcrd/database/v3/ffldb.rollbackOnPanic(0xc0006eee10)
        /home/joe/go/pkg/mod/github.com/decred/dcrd/database/v3@v3.0.0/ffldb/db.go:1891 +0x5b
panic({0x98f9a0, 0xc019403970})
        /usr/lib/go/src/runtime/panic.go:838 +0x207
github.com/decred/dcrd/blockchain/v4.panicf({0xa6eea9?, 0xc009736058?}, {0xc000206d88?, 0xc021c3d7a8?, 0xc000206d40?})
        /home/joe/go/pkg/mod/github.com/decred/dcrd/blockchain/v4@v4.0.1/chain.go:56 +0xa7
github.com/decred/dcrd/blockchain/v4.dbFetchSpendJournalEntry({0xc4bc18?, 0xc0006eee10?}, 0xc00b92e280, 0x1)
        /home/joe/go/pkg/mod/github.com/decred/dcrd/blockchain/v4@v4.0.1/chainio.go:764 +0x333
github.com/decred/dcrd/blockchain/v4.(*ChainQueryerAdapter).PrevScripts(0xc0155e1588, {0xc4bc18, 0xc0006eee10}, 0xc00b92e280)
        /home/joe/go/pkg/mod/github.com/decred/dcrd/blockchain/v4@v4.0.1/chain.go:2197 +0x65
github.com/decred/dcrd/blockchain/v4/indexers.recover.func1({0xc4bc18, 0xc0006eee10})
        /home/joe/go/pkg/mod/github.com/decred/dcrd/blockchain/v4@v4.0.1/indexers/common.go:555 +0xdb
github.com/decred/dcrd/database/v3/ffldb.(*db).Update(0xc0000d3a00?, 0xc011faa320)
        /home/joe/go/pkg/mod/github.com/decred/dcrd/database/v3@v3.0.0/ffldb/db.go:1948 +0x8b
github.com/decred/dcrd/blockchain/v4/indexers.recover({0xc49770?, 0xc0004b0080}, {0xc4bab0, 0xc018eb3f80})
        /home/joe/go/pkg/mod/github.com/decred/dcrd/blockchain/v4@v4.0.1/indexers/common.go:546 +0x571
github.com/decred/dcrd/blockchain/v4/indexers.(*AddrIndex).Init(0xc0004b00c0?, {0xc49770, 0xc0004b0080}, 0xc000234f00)
        /home/joe/go/pkg/mod/github.com/decred/dcrd/blockchain/v4@v4.0.1/indexers/addrindex.go:646 +0xeb
github.com/decred/dcrd/blockchain/v4/indexers.NewAddrIndex(0xc0004b00c0, {0xc4a830?, 0xc0003a4180}, {0xc4bd20, 0xc0155e1588})
        /home/joe/go/pkg/mod/github.com/decred/dcrd/blockchain/v4@v4.0.1/indexers/addrindex.go:1162 +0x235
main.newServer({0xc49770, 0xc0001a2380}, {0xc0004856f0, 0x1, 0x1}, {0xc4a830, 0xc0003a4180}, 0xc0005701c0, 0xc000234f00, {0xc0000288d0, ...})
        /home/joe/git/dcrd/server.go:3557 +0xd25
main.dcrdMain()
        /home/joe/git/dcrd/dcrd.go:207 +0xe6a
main.main()
        /home/joe/git/dcrd/dcrd.go:264 +0x8c
$ dcrd --testnet-V
dcrd version 1.7.2+release.local (Go version go1.18.1 linux/amd64)

Running once with --dropaddrindex does fix the problem after re-indexing. If this is the correct solution please close this issue.

Have not seen on mainnet. I can supply the affected db.

@davecgh
Copy link
Member

davecgh commented May 10, 2022

@dnldd

@dnldd
Copy link
Member

dnldd commented Jun 9, 2022

@JoeGruffins please provide the database, thanks.

@JoeGruffins
Copy link
Member Author

JoeGruffins commented Jul 4, 2022

I have the db ready to send but it's still 10 gb compressed. Not sure the best way. Email?

I noticed --addrindex is actually removed now from master, so... I guess not much point in fixing unless @davecgh wants to make a release 1.7.3?

@dnldd
Copy link
Member

dnldd commented Sep 2, 2022

Opting to go with re-indexing if this issue occurs instead of spending any more time fixing it since the underlying structures have been removed and will not be in the next release.

@davecgh davecgh closed this as completed Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants