Skip to content

Conversation

sipa
Copy link
Member

@sipa sipa commented Mar 26, 2012

Fixes #982.

@gavinandresen
Copy link
Contributor

ACK. Tested on my Mac via:

  1. Run old code with luke's broken testnet/ dir : result: hang
  2. Restore addr.dat with addr.dat.hang
  3. Re-run with this patch : result : happy bitcoind

sipa: any idea why this fixes the issue, or what the issue was in the first place?

@sipa
Copy link
Member Author

sipa commented Mar 26, 2012

No, I don't understand what's going on. I made bitcoind close the entire database environnement and create a new one when doing the rewrite, and it still blocks as soon as it tries to write a single value to the file. I have no idea what it is waiting for, but bdb calls pthread_cond_wait while there is only a single thread alive, which means a guaranteed deadlock.

gavinandresen added a commit that referenced this pull request Mar 26, 2012
Use erase instead of rewrite to remove old addr entries
@gavinandresen gavinandresen merged commit 84560c4 into bitcoin:master Mar 26, 2012
coblee referenced this pull request in litecoin-project/litecoin Jul 17, 2012
Use erase instead of rewrite to remove old addr entries
ptschip added a commit to ptschip/bitcoin that referenced this pull request Mar 6, 2018
* Invalidate the previous chaintip when rolling back the chain.

This prevents the chain from automatically trying to reconnect
when or if the next block arrives.

* Allow override in order rollbackchain more than 100 blocks

* Must mark BLOCK_FAILED_VALID for all chains when rolling back.

If you rollback a chain beyond a fork point you must make sure
to mark all the blocks in all chains as failed otherwise if you
try to reconnect the same chain you just unwound then you'll get
an assertion in CheckBlock() because pindexFirstInvalid will be
NULL and then you'll assert on BLOCK_FAILED_MASK.

* switch to C++11 range based loops in unlimited.cpp

* Add tests to blockchain.py for rolling back beyond the fork point.

When we rollback we may roll back beyond one or more forks and
we must be able to reconsider which ever fork we want to follow.
Bushstar pushed a commit to Bushstar/omnicore that referenced this pull request Sep 10, 2019
11e9406 Raise min required symbols (Peter Bushnell)

Pull request description:

  This is to allow Gitian building for without generating symbol errors for bitcoin-wallet and test/test_omnicore. Omnicore binaries omnicored, omnicore-cli and omnicore-qt do not generate symbol errors.

Tree-SHA512: d02545a0cc7cc9a5f4695812a156ae585ea92d72f30ac65d3e531d1212cc2e8af738132472f47b147fc0a66e8c62b2d5f524f1c0a2f7879113204dcdbe083826
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Startup blocks on mutex at "Loading Addresses"
2 participants