Page MenuHomePhabricator

Revert D4942 locking 'time'

Authored by fpelliccioni on Jan 15 2020, 12:50.


Group Reviewers
Restricted Project

The lifetime of the lock is extended in FinalizeBlockAndInvalidate, according to @markblundeberg 's comment on D4942.

Test Plan
  1. Build with Clang in Debug mode:
CXX=clang++ CC=clang cmake .. -D CMAKE_CXX_FLAGS="-Werror=thread-safety-analysis" -GNinja -DCMAKE_BUILD_TYPE=Debug
ninja check-all
  1. Verify that the compiler has not emitted a thread-safety warning.
  2. Run the node: ./src/bitcoind -regtest
  3. Verify that text similar to "Assertion failed: lock ... not held ..." is not printed on stderr.

Diff Detail

rABC Bitcoin ABC
Lint OK
No Unit Test Coverage
Build Status
Buildable 8953
Build 15879: Default Diff Build & Tests
Build 15878: arc lint + arc unit

Event Timeline

fpelliccioni created this revision.Jan 15 2020, 12:50
Herald added a reviewer: Restricted Project. · View Herald TranscriptJan 15 2020, 12:50
fpelliccioni planned changes to this revision.Jan 15 2020, 12:51
fpelliccioni edited the summary of this revision. (Show Details)
fpelliccioni added a reviewer: markblundeberg.
fpelliccioni edited the summary of this revision. (Show Details)Jan 15 2020, 12:53
deadalnix requested changes to this revision.Jan 15 2020, 13:20

This is still not correct as any number of reorg can occur in between the finalization and the invalidate..

This revision now requires changes to proceed.Jan 15 2020, 13:20
fpelliccioni abandoned this revision.Jan 20 2020, 17:20

The final revert is done in D4946