Page MenuHomePhabricator

Merge #12367: Fix two fast-shutdown bugs
ClosedPublic

Authored by jasonbcox on May 2 2019, 18:24.

Details

Summary

dd2de47 Fix fast-shutdown crash if genesis block was not loaded (Matt Corallo)
1c9394a Fix fast-shutdown hang on ThreadImport+GenesisWait (Matt Corallo)

Pull request description:

The second commit is a much simpler alternative fix for the issue fixed in #12349. To test I made ShutdownRequested() always StartShutdown() after a certain number of calls, which turned up one other hang, fixed in the first commit.

Tree-SHA512: 86bde6ac4b8b4e2cb99fff87dafeed02c0d9514acee6d94455637fb2da9ffc274b5ad31b0a6b9f5bd7b700ae35395f28ddb14ffc65ddda3619aa28df28a5607d

Backport of Core PR 12367
https://github.com/bitcoin/bitcoin/pull/12367/files
Completes T624
Depends on T625

Test Plan

make check
Testing instructions in the original PR are not very clear. I manually tested early shutdown with various delays on bitcoind and observed no unexpected behavior.

Diff Detail

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

Event Timeline

src/init.cpp
2275 ↗(On Diff #8341)

Note that this was already (erroneously) backported in D1923. My bad for the poor review. We're lucky this didn't cause any issues.

This revision is now accepted and ready to land.May 4 2019, 09:59
This revision was automatically updated to reflect the committed changes.