core: Postgres block insert issue for block 46631
When running a fresh postgres sync with backend:latest the backend hangs and keeps restarting at block 46631.
Probably related to some recent changes. It´s the block with the first NFTs created it seems.
`I0226 09:05:44.548962 1 server.go:1147] Server._handleBlock: Received block ( 46631 / 107387 ) from Peer [ Remote Address : 35.232.92.5:17000 PeerID=1 ] panic: runtime error: invalid memory address or nil pointer dereference [recovered] panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x49 pc=0xb1b525]
goroutine 56 [running]: github.com/go-pg/pg/v10.(*Tx).RunInTransaction.func1() /root/go/pkg/mod/github.com/go-pg/pg/v10@v10.10.0/tx.go:91 +0x86 panic({0x10a56c0, 0x1e8a660}) /usr/lib/go/src/runtime/panic.go:1038 +0x215 github.com/deso-protocol/core/lib.(*Postgres).InsertTransactionsTx(0xc0016054b8, 0xc0016054c8, {0xc016be2000, 0xae4, 0xc0037c7c c0}, 0xc004e97780) /deso/src/core/lib/postgres.go:1092 +0x1b65 github.com/deso-protocol/core/lib.(*Postgres).UpsertBlockAndTransactions.func1(0x0) /deso/src/core/lib/postgres.go:1336 +0x98 github.com/go-pg/pg/v10.(*Tx).RunInTransaction(0xc0016eb280, {0x1730468, 0xc00003a280}, 0xc016cb4230) /root/go/pkg/mod/github.com/go-pg/pg/v10@v10.10.0/tx.go:95 +0xa5 github.com/go-pg/pg/v10.(*baseDB).RunInTransaction(0xc017fda798, {0x1730468, 0xc00003a280}, 0xc010586ea0) /root/go/pkg/mod/github.com/go-pg/pg/v10@v10.10.0/tx.go:74 +0x51 github.com/deso-protocol/core/lib.(*Postgres).UpsertBlockAndTransactions(0xc000168e10, 0xc010586ea0, 0xc017c22000) /deso/src/core/lib/postgres.go:1324 +0x5c github.com/deso-protocol/core/lib.(*Blockchain).ProcessBlock(0xc00082ebb0, 0xc010586ea0, 0xe5) /deso/src/core/lib/blockchain.go:1935 +0x191c github.com/deso-protocol/core/lib.(*Server)._handleBlock(0xc000fd80c0, 0xc001bb6d80, 0xc010586ea0) /deso/src/core/lib/server.go:1193 +0x3e5 github.com/deso-protocol/core/lib.(*Server)._handlePeerMessages(0xc000fd80c0, 0xc001bb6d80) /deso/src/core/lib/server.go:1494 +0x18d github.com/deso-protocol/core/lib.(*Server).messageHandler(0xc000fd80c0) /deso/src/core/lib/server.go:1534 +0x19c created by github.com/deso-protocol/core/lib.(*Server).Start /deso/src/core/lib/server.go:1710 +0xb1 `
Will check what is causing it.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 2
- Comments: 19 (19 by maintainers)
Thanks will test tomorrow. Appreciate it. Shameless plug: nftz.zone v2 is out. More here all possible because of Postgres sweetness! @lazynina @diamondhands0
current stable - so that is 2.0.7 i think @mvanhalen
For info @mvanhalen @lazynina - My PG node crashed yesterday - but after restarting just now its stuck at 108741. Looks like time of crash yesterday is same as time this block 108731 was mined.
I restarted with new stable image
2dc0ed73a08f
- but still stuck with this error.As this seems to be a new issue ill raise it as a separate one.
@lazynina @mvanhalen i created this a while ago for dharmesh to run postgres + backend locally
github.com/desodev/prodeso
@mvanhalen - I’ll share how I run things locally tomorrow. Can you let me know what didn’t work for you? And assuming you want a local Postgres setup, correct?
@mvanhalen - I’m looking now, apologies for not seeing this issue earlier.