`RewindBlockIndex` reads `chainActive` (via `ChainActive()`) without holding `cs_main`:

https://github.com/bitcoin/bitcoin/blob/b2a6b0216192b6e8428f1a80b47f5178fccb961a/src/validation.cpp#L4314-L4331

(Please note that callers of `RewindBlockIndex` are _not_ allowed to hold `cs_main` since `RewindBlockIndex` indirectly calls `LimitValidationInterfaceQueue`.)
{
    AssertLockHeld(cs_main);
    if (::ChainActive().Tip() && ::ChainActive().Tip()->GetBlockHash() == pcoinsTip->GetBestBlock()) return true;
    if (pcoinsTip->GetBestBlock().IsNull() && mapBlockIndex.size() == 1) {
        
        
        LogPrintf("%s: Connecting genesis block...\n", __func__);
        CValidationState state;
        if (!ActivateBestChain(state, chainparams)) {
            LogPrintf("%s: failed to activate chain (%s)\n", __func__, FormatStateMessage(state));
            return false;
        }
    }
    
    CBlockIndex* pindex = LookupBlockIndex(pcoinsTip->GetBestBlock());
    if (!pindex) {
        return false;
    }
    ::ChainActive().SetTip(pindex);
    g_chainstate.PruneBlockIndexCandidates();
    LogPrintf("Loaded best chain: hashBestChain=%s height=%d date=%s progress=%f\n",
        ::ChainActive().Tip()->GetBlockHash().ToString(), ::ChainActive().Height(),
        FormatISO8601DateTime(::ChainActive().Tip()->GetBlockTime()),
        GuessVerificationProgress(chainparams.TxData(), ::ChainActive().Tip()));
    return true;
}
CVerifyDB::CVerifyDB()