Page MenuHomePhabricator

Add a lock on cs_main while modifying the config in setexcessiveblock
ClosedPublic

Authored by jasonbcox on Jun 11 2020, 22:10.

Details

Summary

Modifying the config in one thread while validation may be occurring
in another can lead to unexpected behavior. Other calls to config.Set*() calls only
exist in init.cpp so no other locks should be necessary.

Revealed by this TSAN failure: https://build.bitcoinabc.org/repository/download/BitcoinABC_ResourceIntensiveBuilds_BitcoinAbcMasterTsan/76935:id/sanitizer_logs.tar.gz%21/ubsan.log.8739

Test Plan

ninja check check-functional
TSAN still fails though. It appears that there is a locking issue in the wallet.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable