Always return true if AppInitMain got to the end #11831

pull TheBlueMatt wants to merge 1 commits into bitcoin:master from TheBlueMatt:2017-12-startup-exit-return-code-race changing 1 files +1 −1
  1. TheBlueMatt commented at 3:41 PM on December 5, 2017: contributor

    This should fix a rare zapwallettxes failure on travis, but also avoids having init operations (re-adding wallet transactions to mempool) running after RPC is free'd.

    I believe this was the failure at https://travis-ci.org/bitcoin/bitcoin/jobs/311747844 (from #11605).

  2. Always return true if AppInitMain got to the end
    This should fix a very rare travis failure in zapwallettxes, but
    is also more correct, as you can currently race
    ReacceptWalletTransactions with stop RPC calls to get bitcoind to
    (IMO) eroneously return a non-0 exit code.
    07c483895d
  3. promag commented at 4:08 PM on December 5, 2017: member

    ACK 07c4838.

    Shutdown is handled after AppInitMain(). If the initialisation succeeded or not shouldn't depend on fRequestShutdown.

  4. TheBlueMatt cross-referenced this on Dec 5, 2017 from issue [Wallet] Enable RBF by default in QT by Sjors
  5. sipa commented at 5:28 AM on December 6, 2017: member

    utACK 07c483895d219d4c44bd8fec5167a53f4701c364

  6. laanwj commented at 10:52 AM on December 6, 2017: member

    If the initialisation succeeded or not shouldn't depend on fRequestShutdown.

    "Terminated during initialization" is a valid reason for initialization to fail. The reason for returning false here is that initialization didn't fully finish, which is used in the GUI code to (not) spin up other things.

  7. promag commented at 10:58 AM on December 6, 2017: member

    Yes but only if something was interrupted in the initialisation, that's not the case here, where everything was initialised.

  8. laanwj added the label Utils/log/libs on Dec 6, 2017
  9. laanwj commented at 11:15 AM on December 6, 2017: member

    Yes but only if something was interrupted in the initialisation, that's not the case here, where everything was initialised.

    So in the case something was actually interrupted, it still early-outs with false? Then this change is fine with me.

  10. TheBlueMatt commented at 3:27 PM on December 6, 2017: contributor

    Indeed, if initialization did not finish because of fRequestShutdown, false is returned after block index loading fails to complete.

  11. ryanofsky cross-referenced this on Dec 6, 2017 from issue Rename rpcuser.py to rpcauth.py by hkjn
  12. laanwj merged this on Dec 12, 2017
  13. laanwj closed this on Dec 12, 2017

  14. laanwj referenced this in commit d48ab83f00 on Dec 12, 2017
  15. MarcoFalke cross-referenced this on Dec 17, 2017 from issue zapwallettxes.py test failure due to bitcoind return code by laanwj
  16. promag cross-referenced this on Feb 7, 2018 from issue qt: Poll ShutdownTimer after init is done by MarcoFalke
  17. laanwj referenced this in commit 36a927c525 on Feb 8, 2018
  18. dagurval cross-referenced this on Jun 14, 2018 from issue Fix dbcrash failures by dagurval
  19. sickpig cross-referenced this on Jun 15, 2018 from issue [PORT] RPC HTTP server fixes by sickpig
  20. codablock cross-referenced this on Jun 25, 2019 from issue Backports 0.15 pr16 by PastaPastaPasta
  21. PastaPastaPasta referenced this in commit 60475f1272 on Jun 25, 2019
  22. barrystyle referenced this in commit c084ef2d60 on Jan 22, 2020
  23. PastaPastaPasta referenced this in commit 64aba48c41 on Feb 13, 2020
  24. PastaPastaPasta referenced this in commit 8e1572d59f on Feb 27, 2020
  25. PastaPastaPasta referenced this in commit 3855979343 on Feb 27, 2020
  26. PastaPastaPasta referenced this in commit 6b32a15735 on Mar 14, 2020
  27. PastaPastaPasta referenced this in commit bf1d2cecbd on Mar 14, 2020
  28. PastaPastaPasta referenced this in commit 7e5c5d40d1 on Mar 15, 2020
  29. furszy cross-referenced this on Feb 16, 2021 from issue Use non-atomic flushing with block replay by furszy
  30. random-zebra referenced this in commit ac523660b4 on Feb 21, 2021
  31. ckti referenced this in commit 102b6d70dc on Mar 28, 2021
  32. ckti referenced this in commit 1a7a939e50 on Mar 28, 2021
  33. bitcoin locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-19 06:54 UTC