The Algod fails to start

The algod on mainnet fails with the below errors

Error 1:
File: catchpointtracker.go
Function: github.com/algorand/go-algorand/ledger.(*catchpointTracker).accountsUpdateBalances
Line: 1002
Time: 2023-07-31T18:01:25.611872Z
Message: Failed to delete resource hash '01d4f1090124721c021d95f6cc7e00a8131e58c6cc9a3e94bd26b5cc6a7bb11018605a96' from merkle trie for account NEX7N2U36UHBTRHJA4T3WEOOGYMPXL56ICNO4CCJAJBYFJSA7PZJU33H7U

Error 2:
File: catchpointtracker.go
Function: github.com/algorand/go-algorand/ledger.(*catchpointTracker).accountsUpdateBalances
Line: 1018
Time: 2023-07-31T18:01:25.611948Z
Message:
[Stack] goroutine 334 [running]:
runtime/debug.Stack()
        runtime/debug/stack.go:24 +0x65
github.com/algorand/go-algorand/logging.logger.Errorf({0xc0001a49a0, 0xc0000104f8}, {0x13e22b9, 0x4b}, {0xc07ab5fa40, 0x2, 0x2})
        github.com/algorand/go-algorand/logging/log.go:231 +0x69
github.com/algorand/go-algorand/ledger.(*catchpointTracker).accountsUpdateBalances(0xc002770728, {{0xc04872a000, 0x3592, 0x210aa}, 0xc04137b860, {0x0, 0x0, 0x0}}, {{0xc05a23a000, 0xbfbd, ...}, ...}, ...)
        github.com/algorand/go-algorand/ledger/catchpointtracker.go:1018 +0xeb3
github.com/algorand/go-algorand/ledger.(*catchpointTracker).commitRound(0xc002770728, {0x1bcafe8, 0xc04137a180}, {0x1bec108, 0xc07f3ea000}, 0xc033ac5700)
        github.com/algorand/go-algorand/ledger/catchpointtracker.go:549 +0x47f
github.com/algorand/go-algorand/ledger.(*trackerRegistry).commitRound.func1({0x1bcafe8, 0xc04137a180}, {0x1bec108, 0xc07f3ea000})
        github.com/algorand/go-algorand/ledger/tracker.go:563 +0x137
github.com/algorand/go-algorand/ledger/store/trackerdb/sqlitedriver.(*trackerSQLStore).TransactionContext.func1({0x1bcafe8, 0xc04137a180}, 0x51c3e6)
        github.com/algorand/go-algorand/ledger/store/trackerdb/sqlitedriver/store_sqlite_impl.go:106 +0x31
github.com/algorand/go-algorand/util/db.(*Accessor).AtomicContext.func1({0x1bcafe8, 0xc04137a180}, 0x1b45be0)
        github.com/algorand/go-algorand/util/db/dbutil.go:242 +0x6d
github.com/algorand/go-algorand/util/db.(*Accessor).AtomicContext(0xc00088a2e0, {0x1bcaf78, 0xc00003c060}, 0xc063d42030, {0x0, 0x0, 0x0})
        github.com/algorand/go-algorand/util/db/dbutil.go:293 +0xba6
github.com/algorand/go-algorand/ledger/store/trackerdb/sqlitedriver.(*trackerSQLStore).TransactionContext(0xc00088a2c0, {0x1bcaf78, 0xc00003c060}, 0xc04137a060)
        github.com/algorand/go-algorand/ledger/store/trackerdb/sqlitedriver/store_sqlite_impl.go:105 +0x8d
github.com/algorand/go-algorand/ledger/store/trackerdb/sqlitedriver.(*trackerSQLStore).Transaction(0xc002770918, 0xc033ac5700)
        github.com/algorand/go-algorand/ledger/store/trackerdb/sqlitedriver/store_sqlite_impl.go:101 +0x2a
github.com/algorand/go-algorand/ledger.(*trackerRegistry).commitRound(0xc0027709c0, 0xc033ac5700)
        github.com/algorand/go-algorand/ledger/tracker.go:556 +0x3bf
github.com/algorand/go-algorand/ledger.(*trackerRegistry).commitSyncer(0xc0027709c0, 0xc0000ee7e0)
        github.com/algorand/go-algorand/ledger/tracker.go:480 +0x11a
created by github.com/algorand/go-algorand/ledger.(*trackerRegistry).initialize
        github.com/algorand/go-algorand/ledger/tracker.go:308 +0x299

Error 3:
File: catchpointtracker.go
Function: github.com/algorand/go-algorand/ledger.(*catchpointTracker).accountsUpdateBalances
Line: 1018
Time: 2023-07-31T18:01:25.611977Z
Message: Attempted to add duplicate resource hash '01d4f10f01ca0f9f85d68caecd62fda119d2c689af62da0596154ef9298e836cbcaf14fd' to merkle trie for account NEX7N2U36UHBTRHJA4T3WEOOGYMPXL56ICNO4CCJAJBYFJSA7PZJU33H7U

Warning 1:
Callee: github.com/algorand/go-algorand/ledger/store/trackerdb/sqlitedriver.(*trackerSQLStore).TransactionContext.func1
Caller: github.com/algorand/go-algorand/ledger/store/trackerdb/sqlitedriver/store_sqlite_impl.go:101
File: dbutil.go
Function: github.com/algorand/go-algorand/util/db.(*Accessor).AtomicContext
Line: 314
Time: 2023-07-31T18:01:25.613120Z
Message: dbatomic: tx surpassed expected deadline by 4.691444799s
Readonly: false

Warning 2:
File: tracker.go
Function: github.com/algorand/go-algorand/ledger.(*trackerRegistry).commitRound
Line: 577
Time: 2023-07-31T18:01:25.613167Z

Repeated instances of failed to delete hash and attempted to add duplicate hash!

Anyone encountered this before? Is the data corrupted? Any way to recover other than sync from scratch?

Based on the provided log, it appears that there are three errors and two warnings in the Algorand Go-Algorand codebase:

Errors:

  1. Error 1:
  1. Error 2:
  1. Error 3:

Warnings:

  1. Warning 1:
  1. Warning 2:

Unfortunately, the log messages don’t provide specific details about the root cause of the errors or the exact nature of the warnings. To understand these issues better and troubleshoot them, you may need to inspect the relevant code sections and examine the surrounding context in the codebase. Additionally, debugging tools and logging mechanisms can be used to provide more detailed information about the errors and warnings during runtime.