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: member

    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. sipa commented at 5:28 am on December 6, 2017: member
    utACK 07c483895d219d4c44bd8fec5167a53f4701c364
  5. 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.

  6. 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.
  7. laanwj added the label Utils/log/libs on Dec 6, 2017
  8. 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.

  9. TheBlueMatt commented at 3:27 pm on December 6, 2017: member
    Indeed, if initialization did not finish because of fRequestShutdown, false is returned after block index loading fails to complete.
  10. laanwj merged this on Dec 12, 2017
  11. laanwj closed this on Dec 12, 2017

  12. laanwj referenced this in commit d48ab83f00 on Dec 12, 2017
  13. laanwj referenced this in commit 36a927c525 on Feb 8, 2018
  14. PastaPastaPasta referenced this in commit 60475f1272 on Jun 25, 2019
  15. barrystyle referenced this in commit c084ef2d60 on Jan 22, 2020
  16. PastaPastaPasta referenced this in commit 64aba48c41 on Feb 13, 2020
  17. PastaPastaPasta referenced this in commit 8e1572d59f on Feb 27, 2020
  18. PastaPastaPasta referenced this in commit 3855979343 on Feb 27, 2020
  19. PastaPastaPasta referenced this in commit 6b32a15735 on Mar 14, 2020
  20. PastaPastaPasta referenced this in commit bf1d2cecbd on Mar 14, 2020
  21. PastaPastaPasta referenced this in commit 7e5c5d40d1 on Mar 15, 2020
  22. random-zebra referenced this in commit ac523660b4 on Feb 21, 2021
  23. ckti referenced this in commit 102b6d70dc on Mar 28, 2021
  24. ckti referenced this in commit 1a7a939e50 on Mar 28, 2021
  25. DrahtBot 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: 2024-12-18 21:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me