As of #11466 we no longer have any logic to prevent a user from opening a wallet twice in two instances simultaneously. Not only could this break BDB (without the -privdb=false option, which I have really no idea why we even have a tuneable option for that), but we certainly don't have logic to handle such a case gracefully. It was noted in the original PR's description, but somehow was never followed up on before merge.
std::string strLine;
    while (!strDump.eof() && strLine != HEADER_END)
        getline(strDump, strLine); 
    std::string keyHex, valueHex;
    while (!strDump.eof() && keyHex != DATA_END) {
        getline(strDump, keyHex);
        if (keyHex != DATA_END) {
            if (strDump.eof())
                break;
            getline(strDump, valueHex);
            if (valueHex == DATA_END) {
                LogPrintf("CDBEnv::Salvage: WARNING: Number of keys in data does not match number of values.\n");
                break;
            }
            vResult.push_back(make_pair(ParseHex(keyHex), ParseHex(valueHex)));
        }
    }
    if (keyHex != DATA_END) {
        LogPrintf("CDBEnv::Salvage: WARNING: Unexpected end of file while reading salvage output.\n");
        return false;
    }
    return (result == 0);
}
void CDBEnv::CheckpointLSN(const std::string& strFile)