Closed tawmaz closed 2 years ago
Last lines of debug.log
2021-12-05T22:17:43Z init message: Loading banlist...
2021-12-05T22:17:43Z init message: Starting network threads...
2021-12-05T22:17:43Z net thread start
2021-12-05T22:17:43Z dnsseed thread start
2021-12-05T22:17:43Z addcon thread start
2021-12-05T22:17:43Z opencon thread start
2021-12-05T22:17:43Z msghand thread start
2021-12-05T22:17:43Z init message: Done loading
2021-12-05T22:17:43Z New outbound peer connected: version: 70015, blocks=1469802, peer=1
2021-12-05T22:17:54Z Loading addresses from DNS seeds (could take a while)
2021-12-05T22:17:54Z 0 addresses found from DNS seeds
2021-12-05T22:17:54Z dnsseed thread exit
2021-12-05T22:17:55Z New outbound peer connected: version: 70015, blocks=1469803, peer=2
2021-12-05T22:18:00Z New outbound peer connected: version: 70015, blocks=1469802, peer=3
2021-12-05T22:18:03Z New outbound peer connected: version: 70015, blocks=1469803, peer=4
2021-12-05T22:18:04Z New outbound peer connected: version: 70015, blocks=1469803, peer=6
2021-12-05T22:18:05Z New outbound peer connected: version: 70015, blocks=1469803, peer=7
2021-12-05T22:18:06Z New outbound peer connected: version: 70015, blocks=1469803, peer=8
2021-12-05T22:18:09Z New outbound peer connected: version: 70015, blocks=1469802, peer=5
2021-12-05T22:18:36Z New outbound peer connected: version: 70015, blocks=1469698, peer=0
2021-12-05T22:32:23Z Imported mempool transactions from disk: 0 succeeded, 0 failed, 0 expired, 0 already there
2021-12-05T22:32:23Z Staker thread started for
2021-12-05T22:36:53Z New outbound peer connected: version: 70015, blocks=1469824, peer=9
2021-12-05T22:37:23Z Timeout downloading block adeb8e970780cf937b88b99492d58c952b92960c169f6c29b99d63c1d37359ef from peer=0, disconnecting
2021-12-05T22:38:51Z --- Block validated: 1016945 BH: 6113c937e8e567b1130d9041946c2efc4751bcbb33b18fbf40e7211a6b30b4cf
At block height 1016946 it appears there is a social consensus checkpoint of TX 97e3df91e7632820735931453616ed5257da21a97c85a0bc38554e706b8ba098. Immediately after we attempt to access relayTx->GetType, however relayTx is NULL causing the segmentation fault.
Testing a fix where we check relayOk before dereferencing relayTx
I hit a segmentation fault while attempting to sync 20.12 built from commit 78fb244cd0a8775287b9ed7a1c0f535e9d80c67f and including recent update to checkpoints/main.sqllite described in the SocialConsensus issue. The issue occurs on my setup after social consensus validation of block 1016945.
The segmentation fault occurs when Transaction::GetType() is called when object "this" is null and uninitialized.
Faulting code is this: https://github.com/pocketnetteam/pocketnet.core/blob/feature/sqlite/src/pocketdb/models/base/Transaction.cpp#L45 called from this: https://github.com/pocketnetteam/pocketnet.core/blob/feature/sqlite/src/pocketdb/consensus/Helper.cpp#L216
Call stack: