Page MenuHomePhabricator

Merge #12681: Fix ComputeTimeSmart test failure with -DDEBUG_LOCKORDER

Authored by jasonbcox on Tue, May 7, 21:06.



33eb9071b9 Fix ComputeTimeSmart test failure with -DDEBUG_LOCKORDER (Russell Yanofsky)

Pull request description:

Failure looks like:

Entering test case "ComputeTimeSmart"
test_bitcoin: sync.cpp:100: void potential_deadlock_detected(const std::pair<void*, void*>&, const LockStack&, const LockStack&): Assertion `false' failed.
unknown location(0): fatal error in "ComputeTimeSmart": signal: SIGABRT (application abort requested)
wallet/test/wallet_tests.cpp(566): last checkpoint

Reproducible with:

./configure --enable-debug
make -C src test/test_bitcoin && src/test/test_bitcoin --log_level=test_suite --run_test=wallet_tests/ComputeTimeSmart

Seems to be caused by acquiring `cs_main` inside `CWallet::ComputeTimeSmart` in #11041.

I think this may be causing timeouts on travis like:

Tree-SHA512: b263cd122ea9c88204d1d8e7e35291c71ea6319f05114c5009235a75dbd0f669bc0394f44afeed0d9eb08c2a956cd7c08f1ac4ef28616932fef9b43eaac5521b

Backport of Core PR 12681

Test Plan

make check

Diff Detail

rABC Bitcoin ABC
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

jasonbcox created this revision.Tue, May 7, 21:06
Herald added a reviewer: Restricted Project. · View Herald TranscriptTue, May 7, 21:06
Fabien accepted this revision.Wed, May 8, 08:06
This revision is now accepted and ready to land.Wed, May 8, 08:06
This revision was automatically updated to reflect the committed changes.