Page MenuHomePhabricator

Merge #12681: Fix ComputeTimeSmart test failure with -DDEBUG_LOCKORDER
ClosedPublic

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

Details

Summary

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: https://travis-ci.org/bitcoin/bitcoin/jobs/353005676#L2692

Tree-SHA512: b263cd122ea9c88204d1d8e7e35291c71ea6319f05114c5009235a75dbd0f669bc0394f44afeed0d9eb08c2a956cd7c08f1ac4ef28616932fef9b43eaac5521b

Backport of Core PR 12681
https://github.com/bitcoin/bitcoin/pull/12681/files

Test Plan

make check
test_runner.py

Diff Detail

Repository
rABC Bitcoin ABC
Branch
pr12681
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 5734
Build 9530: Bitcoin ABC Buildbot (legacy)
Build 9529: arc lint + arc unit