Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add autoprune functionality #5863

Merged
merged 1 commit into from Apr 24, 2015
Merged

Add autoprune functionality #5863

merged 1 commit into from Apr 24, 2015

Conversation

sdaftuar
Copy link
Member

@sdaftuar sdaftuar commented Mar 6, 2015

Continuing the work of @rdponticelli, this is an implementation of the autoprune functionality (see #4701). Thanks to @rdponticelli for doing a lot of prior work on this topic; we used his work and the discussion of it as our starting point (though we found it easier to base this pull off of master). @mrbandrews, @morcos, @ajweiss, and @sdaftuar collaborated on this pull.

To summarize autoprune: this adds a -prune=N option to bitcoind, which if set to N>0 will enable autoprune. When autopruning is enabled, block and undo files will be deleted to try to keep total space used by those files to below the prune target (N, in MB) specified by the user, subject to some constraints:

  • The last 288 blocks on the main chain are always kept (MIN_BLOCKS_TO_KEEP),
  • N must be at least 550MB (chosen as a value for the target that could reasonably be met, with some assumptions about block sizes, orphan rates, etc; see comment in main.h),
  • No blocks are pruned until chainActive is at least 100,000 blocks long (on mainnet; defined separately for mainnet, testnet, and regtest in chainparams as nAutopruneAfterHeight).

We’ve attempted to address the comments raised in the prior conversations; here are a few things worth noting:

  1. Handling reorgs greater than the data stored on disk is not yet implemented. Currently, bitcoind will exit with a message indicating that it failed to read the block on disk -- suggestions for a better error message are welcome.
  2. We’ve disabled block relay (with a check to see if we’re NODE_NETWORK or not). In the future when we have worked out the service bit to use for an autopruned node and the behavior for block requests, we can re-enable this appropriately. (This differs from the behavior of Autoprune #4701 .)
  3. PruneOneBlockFile currently iterates mapBlockIndex each time to determine which entries to update; we can optimize this by maintaining a reverse lookup table so that the blocks in each blockfile are known.
  4. One open question is what to do if we’ve pruned before, and then are running a -reindex: what do we do with the leftover files? In this case, the first N files will have been deleted by the pruning code, which won’t be processed in the reindex loop, but later we may try overwriting the remaining files in place. Would it be better to, say, delete the files preemptively to prevent potential file corruption?
  5. RPC/REST interfaces currently do not distinguish between unknown blocks/tx and pruned blocks/tx. It's unclear if a specific error should be returned, or perhaps the block/tx query interfaces be disabled for pruned nodes.
  6. Tests and a test plan will be forthcoming.

(Though this pull still needs more work to address some of the above items, we thought we'd open it now to keep review momentum on this feature moving...)

// for the most work chain if we come across them; we can't switch
// to a chain unless we have all the non-active-chain parent blocks.
bool fFailedChain = pindexTest->nStatus & BLOCK_FAILED_MASK;
if (fFailedChain || !(pindexTest->nStatus & BLOCK_HAVE_DATA)) {
// Candidate has an invalid ancestor, remove entire chain from the set.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment is outdated now.

@sipa
Copy link
Member

sipa commented Mar 7, 2015

Looks good, overall. I wouldn't worry about the inefficient mapBlockIndex iteration for now, that can be improved later. I haven't tested yet.

@@ -200,6 +201,7 @@ class CTestNetParams : public CMainParams {
nMinerThreads = 0;
nTargetTimespan = 14 * 24 * 60 * 60; //! two weeks
nTargetSpacing = 10 * 60;
nAutopruneAfterHeight = 1000; // low since testnet can be reset in future
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use //! so it will get picked up by doxygen

@laanwj laanwj added the Feature label Mar 9, 2015
@laanwj laanwj mentioned this pull request Mar 9, 2015
@laanwj laanwj added this to the 0.11.0 milestone Mar 9, 2015
@morcos
Copy link
Member

morcos commented Mar 13, 2015

We've added 6 new commits.
1 addresses some of the feedback so far (will be squashed)
2,3 are already in master and will be dropped when we rebase
4 adds an RPC test. It is very expensive, so please be wary running it.
5 fixes a bug that was preventing us from reorg'ing to a chain for which we needed to redownload pruned blocks. (will be squashed)
6 is the code change from #5890 and can be dropped if that's merged

@morcos
Copy link
Member

morcos commented Mar 19, 2015

Addressed some of the feedback and made a few other slight improvements.
Of note, as discussed on IRC, passing -prune=N and -reindex will cause all block and undo files to be deleted. This happens regardless of whether you were previously pruned and actually needed to do this or not. This was added in the last commit.

@rustyrussell
Copy link
Contributor

v0.9.0rc2-2621-g40ba177. Bootstrapping with "prune=1000", (and some minor added debug prints which shouldn't have affected anything, but never know):

bitcoind: coins.cpp:150: virtual bool CCoinsViewCache::BatchWrite(CCoinsMap&, const uint256&): Assertion `it->second.flags & CCoinsCacheEntry::FRESH' failed.

Unf. didn't have ulimit -c unlimited. Rerunning, it seems be gathering blocks like normal...

@ajweiss
Copy link
Contributor

ajweiss commented Mar 25, 2015

Hey Rusty,

You don't happen to have the debug.log laying around from when it crashed,
do you? Would you be willing to share it?

Thanks!
--adam

On Wed, Mar 25, 2015 at 7:21 AM, Rusty Russell notifications@github.com
wrote:

Hmm, bootstrapping with "prune=1000", (and some minor added debug prints
which shouldn't have affected anything, but never know):

bitcoind: coins.cpp:150: virtual bool
CCoinsViewCache::BatchWrite(CCoinsMap&, const uint256&): Assertion
`it->second.flags & CCoinsCacheEntry::FRESH' failed.

Unf. didn't have ulimit -c unlimited. Rerunning, it seems be gathering
blocks like normal...


Reply to this email directly or view it on GitHub
#5863 (comment).

@ajweiss
Copy link
Contributor

ajweiss commented Mar 25, 2015

Also, what version are you running? If you're running this pull, you should see a version string like this:

2015-03-25 15:22:05 Bitcoin version v0.10.99.0-40ba177-dirty (2015-03-19 11:28:32 -0400)

The "v0.9.0rc2-2621-g40ba177" that appears in your comment references a version that is quite old. Also, did you update your comment after the fact? For some reason, github never included that part in the original email.

Thanks!

@rustyrussell
Copy link
Contributor

https://github.com/sdaftuar/bitcoin/tree/autoprune == 40ba177 which is what I was running (and, AFAICT, what is proposed in this pull request).

Unf. I didn't save debug.log :(

@rustyrussell
Copy link
Contributor

Hmm, next run got killed by the OOM killer. Perhaps this first assert() was due to OOM (512M mem, 512M swap).

@ajweiss
Copy link
Contributor

ajweiss commented Mar 26, 2015

I see an 0.9.0rc2 in the version string you posted. Did you back port or
rebase?

On Wed, Mar 25, 2015, 8:35 PM Rusty Russell notifications@github.com
wrote:

Hmm, next run got killed by the OOM killer. Perhaps this first assert()
was due to OOM (512M mem, 512M swap).


Reply to this email directly or view it on GitHub
#5863 (comment).

@rustyrussell
Copy link
Contributor

Neither. git describe uses the previous tag it knows about. For some reason it doesn't know about more recent tags. But I'm on commit 40ba177.

The good news: it happened again! bitcoind: coins.cpp:150: virtual bool CCoinsViewCache::BatchWrite(CCoinsMap&, const uint256&): Assertion `it->second.flags & CCoinsCacheEntry::FRESH' failed.

Here's the last 100 lines of debug.log (can't figure out how to attach the whole thing):

2015-03-26 01:12:46 UpdateTip: new best=000000000000002a45bf369333c2daa0555e8e6f064cbd6bd1ff1a5d06980d82 height=256222 log2_work=71.679906 tx=23298335 date=2013-09-05 08:23:11 progress=0.164551 cache=48753
2015-03-26 01:12:46 UpdateTip: new best=000000000000000753309260f94ad504e02cfc39bbd27864572d935b1aea715d height=256223 log2_work=71.680048 tx=23298379 date=2013-09-05 08:24:21 progress=0.164551 cache=48814
2015-03-26 01:12:46 UpdateTip: new best=0000000000000022474ef8062a2b3ffac71dba34f4713e4320cb03ab2a8b4f27 height=256224 log2_work=71.680191 tx=23298647 date=2013-09-05 08:31:51 progress=0.164553 cache=49002
2015-03-26 01:12:46 UpdateTip: new best=000000000000000d93e092f11fbffe4cf51b3230b85429126fd59fdc4a658711 height=256225 log2_work=71.680333 tx=23298903 date=2013-09-05 09:02:55 progress=0.164555 cache=49232
2015-03-26 01:12:46 UpdateTip: new best=000000000000000b82f040c3342eb73532a6124efc40b024fdad513e05fd0bd5 height=256226 log2_work=71.680475 tx=23299531 date=2013-09-05 09:10:09 progress=0.164559 cache=49832
2015-03-26 01:12:46 UpdateTip: new best=000000000000002a6ecdbe7fbfa95c3506f1453577a683a79da81098e7905584 height=256227 log2_work=71.680618 tx=23300084 date=2013-09-05 09:16:24 progress=0.164563 cache=50243
2015-03-26 01:12:46 UpdateTip: new best=000000000000002c6fa89ede90bbc722936a218850ce5f6376edb2ea00a7fa05 height=256228 log2_work=71.68076 tx=23300099 date=2013-09-05 09:16:32 progress=0.164563 cache=50271
2015-03-26 01:12:47 UpdateTip: new best=00000000000000101ce20a35d1ddcae106b960d6e785104426f8d0bdd2017bf2 height=256229 log2_work=71.680902 tx=23300780 date=2013-09-05 09:35:11 progress=0.164568 cache=50989
2015-03-26 01:12:47 UpdateTip: new best=0000000000000020c9620a098f464ca259dfb49e0d58ac6e8072fb9ebf01aa22 height=256230 log2_work=71.681045 tx=23301155 date=2013-09-05 09:43:39 progress=0.164571 cache=51343
2015-03-26 01:12:47 UpdateTip: new best=000000000000002ff0c69115a9a7ec287f2eb1e7aaf5fcd8e570523c6d0e35da height=256231 log2_work=71.681187 tx=23301803 date=2013-09-05 10:08:04 progress=0.164575 cache=51839
2015-03-26 01:12:48 UpdateTip: new best=0000000000000012934a060e2f39186df3576919488f578142ac0b39f40eb016 height=256232 log2_work=71.681329 tx=23302097 date=2013-09-05 10:11:37 progress=0.164577 cache=52213
2015-03-26 01:12:48 UpdateTip: new best=0000000000000001fd0e62b6be598ed76515a2044941efdffaa6cffbaedf6be9 height=256233 log2_work=71.681472 tx=23302512 date=2013-09-05 10:23:50 progress=0.164580 cache=52519
2015-03-26 01:12:48 UpdateTip: new best=000000000000003040c350eb9968ddd8d465c02d3b8c08a57092d648d84e81fb height=256234 log2_work=71.681614 tx=23303160 date=2013-09-05 10:56:06 progress=0.164585 cache=53021
2015-03-26 01:12:48 UpdateTip: new best=0000000000000004e00a510cb0eb701049eab4ffa7f5ae0cb35166012f206735 height=256235 log2_work=71.681756 tx=23303555 date=2013-09-05 10:58:04 progress=0.164588 cache=53195
2015-03-26 01:12:48 UpdateTip: new best=0000000000000001d5cb5a162b017593ea700796346fc4ad2878317f88639558 height=256236 log2_work=71.681898 tx=23303687 date=2013-09-05 10:59:25 progress=0.164589 cache=53329
2015-03-26 01:12:49 UpdateTip: new best=00000000000000132059570a30473e9a66082f15a3587f46674e2868e42c1717 height=256237 log2_work=71.68204 tx=23304007 date=2013-09-05 11:07:52 progress=0.164591 cache=53593
2015-03-26 01:12:49 UpdateTip: new best=0000000000000022e8d500382e2890c4188afbac95bd96b28badeb40535a2d62 height=256238 log2_work=71.682183 tx=23304182 date=2013-09-05 11:13:55 progress=0.164592 cache=53742
2015-03-26 01:12:49 UpdateTip: new best=00000000000000153e89df838e32e1d69f44352582b7e916779a4c81f5c87fc8 height=256239 log2_work=71.682325 tx=23304295 date=2013-09-05 11:16:07 progress=0.164593 cache=53864
2015-03-26 01:12:49 UpdateTip: new best=000000000000001c4c2ae705ca273cabbb7881587eee17d65e97872f6d32e3dd height=256240 log2_work=71.682467 tx=23304658 date=2013-09-05 11:30:15 progress=0.164596 cache=54138
2015-03-26 01:12:49 UpdateTip: new best=00000000000000094943a4f8db9e6e3c7693fda19a87e0c6311cbff6af5e30ed height=256241 log2_work=71.682609 tx=23304712 date=2013-09-05 11:31:46 progress=0.164596 cache=54188
2015-03-26 01:12:49 UpdateTip: new best=00000000000000240151486223bec38ac2efd88b06358ed808b7650ca2d4e7b9 height=256242 log2_work=71.682751 tx=23305195 date=2013-09-05 11:53:06 progress=0.164599 cache=54500
2015-03-26 01:12:49 UpdateTip: new best=000000000000000b204f319b88cb7ada312006cff24259767ce543590376916b height=256243 log2_work=71.682893 tx=23305205 date=2013-09-05 11:53:17 progress=0.164599 cache=54510
2015-03-26 01:12:49 UpdateTip: new best=000000000000002fe406df0a623d0552973f7455aff2866b400492e7b964905d height=256244 log2_work=71.683035 tx=23305255 date=2013-09-05 11:54:08 progress=0.164600 cache=54530
2015-03-26 01:12:49 UpdateTip: new best=0000000000000004760b054428b39113e0a27e08cce9a98cd27c4dbee3ea3f05 height=256245 log2_work=71.683178 tx=23305450 date=2013-09-05 12:00:16 progress=0.164601 cache=54716
2015-03-26 01:12:50 UpdateTip: new best=000000000000000c5a4a7971338e3b2226b4697035455b1f10c8db8806241ecd height=256246 log2_work=71.68332 tx=23306018 date=2013-09-05 12:08:59 progress=0.164605 cache=55351
2015-03-26 01:12:50 UpdateTip: new best=000000000000001bb68eb99892b94fa8b33da6be1e52afe17920e05bea0528b0 height=256247 log2_work=71.683462 tx=23307265 date=2013-09-05 12:33:09 progress=0.164614 cache=56346
2015-03-26 01:12:51 UpdateTip: new best=00000000000000178f4cf7cef8941844bd72d1435f4cf5e61cfe066311f7807a height=256248 log2_work=71.683604 tx=23307913 date=2013-09-05 12:45:14 progress=0.164619 cache=56992
2015-03-26 01:12:51 UpdateTip: new best=00000000000000176e15e4fb8f59e2b65407afa87af9af2f2a3ad31a215b5049 height=256249 log2_work=71.683746 tx=23308112 date=2013-09-05 12:48:01 progress=0.164620 cache=57097
2015-03-26 01:12:51 UpdateTip: new best=000000000000001f1d84edf1d8901ed8a3b4415c0ae71faea14902a0cb12eb2c height=256250 log2_work=71.683888 tx=23308762 date=2013-09-05 13:07:00 progress=0.164625 cache=57724
2015-03-26 01:12:51 UpdateTip: new best=0000000000000021843eb11fc9e41c9f6b8403166d485259acd04f6349a15368 height=256251 log2_work=71.68403 tx=23309579 date=2013-09-05 13:35:58 progress=0.164630 cache=58350
2015-03-26 01:12:52 UpdateTip: new best=000000000000001be38f4d3d802a0c4f53aa250ade35ef562858df8f4459143a height=256252 log2_work=71.684172 tx=23310617 date=2013-09-05 13:44:30 progress=0.164638 cache=59410
2015-03-26 01:12:52 UpdateTip: new best=0000000000000016f9e206d675a4806a56889b4dad5bc8101458a67caae8fec5 height=256253 log2_work=71.684314 tx=23310937 date=2013-09-05 13:53:32 progress=0.164640 cache=59760
2015-03-26 01:12:53 UpdateTip: new best=00000000000000167d0798f1c90a8b032608b2bfec24e9338046f0458f889050 height=256254 log2_work=71.684456 tx=23311912 date=2013-09-05 14:11:04 progress=0.164647 cache=60417
2015-03-26 01:12:53 UpdateTip: new best=000000000000002c615c4e75ed0e3cd5fdf8c784ed70f994f6b8dd170491052b height=256255 log2_work=71.684598 tx=23312598 date=2013-09-05 14:25:07 progress=0.164652 cache=61044
2015-03-26 01:12:53 UpdateTip: new best=00000000000000294c1570b253f58ae84bb3436f27dc341e01ec98b12ffb4457 height=256256 log2_work=71.68474 tx=23312983 date=2013-09-05 14:38:18 progress=0.164654 cache=61382
2015-03-26 01:12:53 UpdateTip: new best=0000000000000013ef06f2beede29fc3544553f88da16e56be374b98bf8378cc height=256257 log2_work=71.684882 tx=23313815 date=2013-09-05 14:51:12 progress=0.164660 cache=61964
2015-03-26 01:12:54 UpdateTip: new best=000000000000000120c0962bfabb16f454d619b081dabd5f593bdec041fdb04c height=256258 log2_work=71.685023 tx=23314011 date=2013-09-05 14:53:04 progress=0.164662 cache=62117
2015-03-26 01:12:54 UpdateTip: new best=0000000000000030465e2521d48854fd32e22fb56a4d23383215eeef5cec71ad height=256259 log2_work=71.685165 tx=23314390 date=2013-09-05 14:59:37 progress=0.164664 cache=62420
2015-03-26 01:12:54 UpdateTip: new best=0000000000000015f00b818ec4d3cd84c7efe492c19042e8d41aa1d88220fcca height=256260 log2_work=71.685307 tx=23314668 date=2013-09-05 15:03:44 progress=0.164666 cache=62627
2015-03-26 01:12:54 UpdateTip: new best=0000000000000021f9c19ee0a908e5e8467a3135ca017778fa0b6fe205858e86 height=256261 log2_work=71.685449 tx=23315249 date=2013-09-05 15:17:30 progress=0.164670 cache=63094
2015-03-26 01:12:54 UpdateTip: new best=0000000000000004106d02bd030be7b11b09dc29bd1b814d82230a3602d71cbf height=256262 log2_work=71.685591 tx=23315921 date=2013-09-05 15:39:25 progress=0.164675 cache=63618
2015-03-26 01:12:55 Pre-allocating up to position 0x900000 in rev00079.dat
2015-03-26 01:12:55 UpdateTip: new best=00000000000000152c20907e5fc32b0a5699cd6b3bdfdc54541068acc40c9001 height=256263 log2_work=71.685733 tx=23316369 date=2013-09-05 15:42:00 progress=0.164678 cache=63845
2015-03-26 01:12:55 UpdateTip: new best=0000000000000017393b8866299590a0cccb9fc3ec77d78f95ad1c8dad019ba5 height=256264 log2_work=71.685875 tx=23316635 date=2013-09-05 15:44:52 progress=0.164680 cache=64044
2015-03-26 01:12:55 UpdateTip: new best=0000000000000029669d094d8730098533dace24b5ebbf53b2a289feb034444e height=256265 log2_work=71.686016 tx=23316846 date=2013-09-05 15:48:59 progress=0.164682 cache=64209
2015-03-26 01:12:55 UpdateTip: new best=0000000000000024de7285b3c2414f0a16183de523ea34b0e761a4111f693051 height=256266 log2_work=71.686158 tx=23317071 date=2013-09-05 15:54:51 progress=0.164683 cache=64449
2015-03-26 01:12:55 UpdateTip: new best=00000000000000165eab046aa4a026bc181b82d951936924c5aeb71ca394161a height=256267 log2_work=71.6863 tx=23317372 date=2013-09-05 15:58:28 progress=0.164685 cache=64676
2015-03-26 01:12:55 UpdateTip: new best=0000000000000030064bb7a58f10d456eaa8ed4b1b5d302c0ef7beee89165195 height=256268 log2_work=71.686442 tx=23317436 date=2013-09-05 15:59:52 progress=0.164686 cache=64706
2015-03-26 01:12:55 UpdateTip: new best=0000000000000028115e14c9c3ff53915c178d7e00483ea1d49e89e3a2f8ea1a height=256269 log2_work=71.686584 tx=23317684 date=2013-09-05 16:05:53 progress=0.164688 cache=64910
2015-03-26 01:12:55 UpdateTip: new best=000000000000002d8e2f9179ed9f8cf3d9651d7ba23e1df5045fd53a7efb7e9f height=256270 log2_work=71.686725 tx=23317794 date=2013-09-05 16:08:09 progress=0.164688 cache=64989
2015-03-26 01:12:55 UpdateTip: new best=000000000000000455fe9a0f779024be6ffb8d66e3983fbb9daf563cc2720dc1 height=256271 log2_work=71.686867 tx=23318058 date=2013-09-05 16:11:30 progress=0.164690 cache=65240
2015-03-26 01:12:56 UpdateTip: new best=0000000000000008ba72a286f0c0d7cc9f76404d6d03b1ecbceb957a896169ef height=256272 log2_work=71.687009 tx=23319210 date=2013-09-05 16:33:00 progress=0.164698 cache=66056
2015-03-26 01:12:56 UpdateTip: new best=000000000000001e54d7eb160c15019da95f2bf0e4a55a75339c2be02953c314 height=256273 log2_work=71.68715 tx=23319463 date=2013-09-05 16:38:52 progress=0.164700 cache=66267
2015-03-26 01:12:56 UpdateTip: new best=000000000000002665aa9b70dc61c3e3a21b14254d025f247fcd0ee7988556dc height=256274 log2_work=71.687292 tx=23319761 date=2013-09-05 16:45:01 progress=0.164702 cache=66495
2015-03-26 01:12:56 UpdateTip: new best=000000000000001452940962883c497d7bfe87508813529d924c3555ca524b6e height=256275 log2_work=71.687434 tx=23319801 date=2013-09-05 16:46:11 progress=0.164702 cache=66522
2015-03-26 01:12:56 UpdateTip: new best=000000000000002b0e29289255b11ea377d03f02d6e2013c9c4500879f17aa79 height=256276 log2_work=71.687575 tx=23320487 date=2013-09-05 17:02:48 progress=0.164707 cache=67014
2015-03-26 01:12:56 UpdateTip: new best=000000000000002d054be1e77c50aafcabf5ad9466560117bd8fd9706e08a472 height=256277 log2_work=71.687717 tx=23320591 date=2013-09-05 17:06:30 progress=0.164708 cache=67099
2015-03-26 01:12:57 UpdateTip: new best=000000000000002dc13bc14c9e999f56fa19ce4e0ae0c4f203197f1c6f269a26 height=256278 log2_work=71.687859 tx=23321470 date=2013-09-05 17:32:00 progress=0.164714 cache=67893
2015-03-26 01:12:57 UpdateTip: new best=000000000000000f7125b930e8fd8e239a4c63c0f2d55bb5e63ba9fc4e0109a8 height=256279 log2_work=71.688 tx=23322078 date=2013-09-05 17:35:07 progress=0.164719 cache=68269
2015-03-26 01:12:57 UpdateTip: new best=000000000000001a92af8fe69ff4aa1e1f02642f9a93587143e9d5d7f1ffba6c height=256280 log2_work=71.688142 tx=23322632 date=2013-09-05 17:40:49 progress=0.164722 cache=68537
2015-03-26 01:12:57 UpdateTip: new best=000000000000000159f4bd54cf3c54c2df34ddd6ff51c680e1b7d0622f5c8b43 height=256281 log2_work=71.688283 tx=23323215 date=2013-09-05 17:51:32 progress=0.164727 cache=68947
2015-03-26 01:12:58 UpdateTip: new best=00000000000000247fe2e1f11a489c118ffb6792d6ba11121279cf12a62453eb height=256282 log2_work=71.688425 tx=23323753 date=2013-09-05 18:02:21 progress=0.164730 cache=69359
2015-03-26 01:12:58 UpdateTip: new best=0000000000000014813cffe67140e7dbfb5a7773d274941c2edb1a11d0edd0b7 height=256283 log2_work=71.688567 tx=23324401 date=2013-09-05 18:17:30 progress=0.164735 cache=69837
2015-03-26 01:12:58 UpdateTip: new best=000000000000000a41919e5ba9bf94590307957438df8957b2d8e055d196b073 height=256284 log2_work=71.688708 tx=23324549 date=2013-09-05 18:17:40 progress=0.164736 cache=69925
2015-03-26 01:12:58 UpdateTip: new best=000000000000000da78b890167754320fcd7844a8333cf2e7eaa27e6eb66beef height=256285 log2_work=71.68885 tx=23324674 date=2013-09-05 18:19:50 progress=0.164737 cache=70080
2015-03-26 01:12:58 UpdateTip: new best=000000000000000a11b83ec67046bd1c3742d37c1fd19eb60993dd4142832587 height=256286 log2_work=71.688991 tx=23325155 date=2013-09-05 18:29:23 progress=0.164740 cache=70487
2015-03-26 01:12:58 UpdateTip: new best=0000000000000030b9133b269aa99ef3ff0720207add7d6cda4ee4b3682293c5 height=256287 log2_work=71.689133 tx=23325253 date=2013-09-05 18:30:04 progress=0.164741 cache=70561
2015-03-26 01:12:59 UpdateTip: new best=000000000000001ad1c72f89e3e477dad1a4f31fa259dcc36347e95df771beb3 height=256288 log2_work=71.689274 tx=23325512 date=2013-09-05 18:35:01 progress=0.164743 cache=70724
2015-03-26 01:12:59 UpdateTip: new best=000000000000001eb25e185d9b67d1395f90134039a94141aec1d1405ae6ed3e height=256289 log2_work=71.689416 tx=23325535 date=2013-09-05 18:35:15 progress=0.164743 cache=70777
2015-03-26 01:12:59 UpdateTip: new best=00000000000000021f594b3f66f4caa4251d538e4450bd3f03106d0008845d00 height=256290 log2_work=71.689557 tx=23325632 date=2013-09-05 18:36:45 progress=0.164744 cache=70928
2015-03-26 01:12:59 UpdateTip: new best=000000000000000eff0b9ad6c63cae18b2c3ca434f62083a77e09a5c254b9240 height=256291 log2_work=71.689699 tx=23326314 date=2013-09-05 18:58:29 progress=0.164748 cache=71546
2015-03-26 01:13:00 UpdateTip: new best=000000000000001857b4bcda0878dd5a25ffb28add7b9ce33ccaf2f6024e42f8 height=256292 log2_work=71.68984 tx=23326874 date=2013-09-05 19:00:16 progress=0.164752 cache=72269
2015-03-26 01:13:00 UpdateTip: new best=00000000000000003141cfb167866059105db3bb1cf035f6bc85b53ef85b92ae height=256293 log2_work=71.689981 tx=23326941 date=2013-09-05 19:00:35 progress=0.164753 cache=72342
2015-03-26 01:13:00 UpdateTip: new best=0000000000000020bb674a462e0c4a656dce0cd89a96d32beba275afc66512c6 height=256294 log2_work=71.690123 tx=23327139 date=2013-09-05 19:04:22 progress=0.164754 cache=72474
2015-03-26 01:13:00 UpdateTip: new best=000000000000000f1fd8011fb66ce8df84fb0f2f1b963e0e3cdbb3617f59b7c7 height=256295 log2_work=71.690264 tx=23327734 date=2013-09-05 19:23:20 progress=0.164759 cache=72917
2015-03-26 01:13:00 UpdateTip: new best=000000000000002a6947553bbcfb982ca718cf2a4cac7dd1b08b035be2964f7e height=256296 log2_work=71.690406 tx=23327990 date=2013-09-05 19:28:00 progress=0.164760 cache=73191
2015-03-26 01:13:01 UpdateTip: new best=000000000000000a5ad1f21d83c1432c8562d8dae8ba6b225a3b1ba85acce7f6 height=256297 log2_work=71.690547 tx=23328170 date=2013-09-05 19:28:25 progress=0.164762 cache=73281
2015-03-26 01:13:01 UpdateTip: new best=00000000000000105bd14a20434bdcd0ee740134893cf84a88421fd3e33ab983 height=256298 log2_work=71.690688 tx=23328497 date=2013-09-05 19:33:39 progress=0.164764 cache=73674
2015-03-26 01:13:01 UpdateTip: new best=000000000000000e31ee80d1bfb86f6afda5f01cc7fbde2fe4ad6b9ea5c64ce0 height=256299 log2_work=71.69083 tx=23328847 date=2013-09-05 19:41:38 progress=0.164766 cache=73966
2015-03-26 01:13:01 UpdateTip: new best=000000000000001b0326c319e92c6b9da767ef4afd124363307a6da3d902fa0a height=256300 log2_work=71.690971 tx=23329181 date=2013-09-05 19:47:54 progress=0.164769 cache=74273
2015-03-26 01:13:01 UpdateTip: new best=00000000000000119a3ce9b6ba7951f3d377b3218bb1be68e48434b5f8a5a9d5 height=256301 log2_work=71.691112 tx=23329436 date=2013-09-05 19:53:33 progress=0.164771 cache=74449
2015-03-26 01:13:02 UpdateTip: new best=000000000000003083e3e983f998ad82a3dee8678d718c50947dcb1ba95f492b height=256302 log2_work=71.691254 tx=23329988 date=2013-09-05 20:07:37 progress=0.164774 cache=74884
2015-03-26 01:13:02 UpdateTip: new best=00000000000000232c0aa351c33716d7763d6ed2fd31cac929d03711dea15557 height=256303 log2_work=71.691395 tx=23330089 date=2013-09-05 20:09:47 progress=0.164775 cache=74968
2015-03-26 01:13:02 UpdateTip: new best=00000000000000312aac75a02b0a1a704c80d00943284d98b7b290a150936718 height=256304 log2_work=71.691536 tx=23330274 date=2013-09-05 20:12:43 progress=0.164776 cache=75085
2015-03-26 01:13:02 UpdateTip: new best=000000000000001a1be9fab4bc79a801932b364716ced96ef324de80b158a67c height=256305 log2_work=71.691677 tx=23330498 date=2013-09-05 20:17:57 progress=0.164778 cache=75258
2015-03-26 01:13:02 UpdateTip: new best=000000000000000d884a8219f18d692d9a289bed1ade63ea2fe458681de87d93 height=256306 log2_work=71.691819 tx=23330904 date=2013-09-05 20:23:36 progress=0.164781 cache=75535
2015-03-26 01:13:02 UpdateTip: new best=0000000000000017771fa7ee6475fb0214c27f4bf9d05add8f0ac7d61d03b469 height=256307 log2_work=71.69196 tx=23330920 date=2013-09-05 20:24:55 progress=0.164781 cache=75547
2015-03-26 01:13:02 UpdateTip: new best=000000000000000696591811eb1df654a2ee33056bb8bfaea7024a6e1ff46ae3 height=256308 log2_work=71.692101 tx=23331408 date=2013-09-05 20:34:22 progress=0.164784 cache=75854
2015-03-26 01:13:02 UpdateTip: new best=000000000000000a00fd2b77b9808adce5a65a7ef665f9a1e537453548dabcf1 height=256309 log2_work=71.692242 tx=23332064 date=2013-09-05 20:46:32 progress=0.164789 cache=76332
2015-03-26 01:13:02 UpdateTip: new best=00000000000000019d219483d1b58abc6e6e4d2a147eaa9dd872f17be08b20ea height=256310 log2_work=71.692383 tx=23332098 date=2013-09-05 20:45:30 progress=0.164789 cache=76359
2015-03-26 01:13:03 UpdateTip: new best=000000000000000c10150feb7fca04dac4ffe51fd1b65cb786a28394e4f15a9a height=256311 log2_work=71.692525 tx=23332413 date=2013-09-05 20:52:20 progress=0.164792 cache=76578
2015-03-26 01:13:03 UpdateTip: new best=000000000000002132822bd27a89b73a722db1882a93ee3fb955fc90e185bc5e height=256312 log2_work=71.692666 tx=23332670 date=2013-09-05 20:57:32 progress=0.164793 cache=76730
2015-03-26 01:13:03 UpdateTip: new best=00000000000000049b4273b34759a18d1790a898f51946aa9479d2c6a4cccfa9 height=256313 log2_work=71.692807 tx=23332803 date=2013-09-05 20:59:25 progress=0.164794 cache=76717
2015-03-26 01:13:03 UpdateTip: new best=0000000000000013325dd0dea18664e71740f935c7d7330368c9fd79ce44220a height=256314 log2_work=71.692948 tx=23333358 date=2013-09-05 21:10:26 progress=0.164798 cache=77114
2015-03-26 01:13:03 UpdateTip: new best=000000000000002270d84d64b2d9738a39566a9614d037bda5df147ebaa8f7ee height=256315 log2_work=71.693089 tx=23333392 date=2013-09-05 21:10:35 progress=0.164798 cache=77139
2015-03-26 01:13:03 UpdateTip: new best=000000000000001a5005494e32ee1d0cef03424b64a51c26f0763c2cd4ed280b height=256316 log2_work=71.69323 tx=23334155 date=2013-09-05 21:26:59 progress=0.164804 cache=77683
2015-03-26 01:13:04 UpdateTip: new best=0000000000000021092a76cf2a89cdf3d936524f7d9e421e851bdc1cc2ed892e height=256317 log2_work=71.693371 tx=23334457 date=2013-09-05 21:37:35 progress=0.164806 cache=77961
2015-03-26 01:13:04 UpdateTip: new best=000000000000001e7e4c0d7928ba3ca327d3dcb2b22ab1120646d426f1e2db34 height=256318 log2_work=71.693512 tx=23334921 date=2013-09-05 21:46:23 progress=0.164809 cache=78139
2015-03-26 01:13:11 Autoprune: PruneOneBlockFile deleted blk/rev (00073)
2015-03-26 01:13:11 Pre-allocating up to position 0xa00000 in rev00079.dat

@ajweiss
Copy link
Contributor

ajweiss commented Mar 26, 2015

Do you have the head of this log where it prints the version string? core
file/backtrace?
On Mar 25, 2015 9:45 PM, "Rusty Russell" notifications@github.com wrote:

Neither. git describe uses the previous tag it knows about. For some
reason it doesn't know about more recent tags. But I'm on commit 40ba177
40ba177
.

The good news: it happened again! bitcoind: coins.cpp:150: virtual bool
CCoinsViewCache::BatchWrite(CCoinsMap&, const uint256&): Assertion
`it->second.flags & CCoinsCacheEntry::FRESH' failed.

Here's the last 100 lines of debug.log (can't figure out how to attach the
whole thing):

2015-03-26 01:12:46 UpdateTip: new
best=000000000000002a45bf369333c2daa0555e8e6f064cbd6bd1ff1a5d06980d82
height=256222 log2_work=71.679906 tx=23298335 date=2013-09-05 08:23:11
progress=0.164551 cache=48753
2015-03-26 01:12:46 UpdateTip: new
best=000000000000000753309260f94ad504e02cfc39bbd27864572d935b1aea715d
height=256223 log2_work=71.680048 tx=23298379 date=2013-09-05 08:24:21
progress=0.164551 cache=48814
2015-03-26 01:12:46 UpdateTip: new
best=0000000000000022474ef8062a2b3ffac71dba34f4713e4320cb03ab2a8b4f27
height=256224 log2_work=71.680191 tx=23298647 date=2013-09-05 08:31:51
progress=0.164553 cache=49002
2015-03-26 01:12:46 UpdateTip: new
best=000000000000000d93e092f11fbffe4cf51b3230b85429126fd59fdc4a658711
height=256225 log2_work=71.680333 tx=23298903 date=2013-09-05 09:02:55
progress=0.164555 cache=49232
2015-03-26 01:12:46 UpdateTip: new
best=000000000000000b82f040c3342eb73532a6124efc40b024fdad513e05fd0bd5
height=256226 log2_work=71.680475 tx=23299531 date=2013-09-05 09:10:09
progress=0.164559 cache=49832
2015-03-26 01:12:46 UpdateTip: new
best=000000000000002a6ecdbe7fbfa95c3506f1453577a683a79da81098e7905584
height=256227 log2_work=71.680618 tx=23300084 date=2013-09-05 09:16:24
progress=0.164563 cache=50243
2015-03-26 01:12:46 UpdateTip: new
best=000000000000002c6fa89ede90bbc722936a218850ce5f6376edb2ea00a7fa05
height=256228 log2_work=71.68076 tx=23300099 date=2013-09-05 09:16:32
progress=0.164563 cache=50271
2015-03-26 01:12:47 UpdateTip: new
best=00000000000000101ce20a35d1ddcae106b960d6e785104426f8d0bdd2017bf2
height=256229 log2_work=71.680902 tx=23300780 date=2013-09-05 09:35:11
progress=0.164568 cache=50989
2015-03-26 01:12:47 UpdateTip: new
best=0000000000000020c9620a098f464ca259dfb49e0d58ac6e8072fb9ebf01aa22
height=256230 log2_work=71.681045 tx=23301155 date=2013-09-05 09:43:39
progress=0.164571 cache=51343
2015-03-26 01:12:47 UpdateTip: new
best=000000000000002ff0c69115a9a7ec287f2eb1e7aaf5fcd8e570523c6d0e35da
height=256231 log2_work=71.681187 tx=23301803 date=2013-09-05 10:08:04
progress=0.164575 cache=51839
2015-03-26 01:12:48 UpdateTip: new
best=0000000000000012934a060e2f39186df3576919488f578142ac0b39f40eb016
height=256232 log2_work=71.681329 tx=23302097 date=2013-09-05 10:11:37
progress=0.164577 cache=52213
2015-03-26 01:12:48 UpdateTip: new
best=0000000000000001fd0e62b6be598ed76515a2044941efdffaa6cffbaedf6be9
height=256233 log2_work=71.681472 tx=23302512 date=2013-09-05 10:23:50
progress=0.164580 cache=52519
2015-03-26 01:12:48 UpdateTip: new
best=000000000000003040c350eb9968ddd8d465c02d3b8c08a57092d648d84e81fb
height=256234 log2_work=71.681614 tx=23303160 date=2013-09-05 10:56:06
progress=0.164585 cache=53021
2015-03-26 01:12:48 UpdateTip: new
best=0000000000000004e00a510cb0eb701049eab4ffa7f5ae0cb35166012f206735
height=256235 log2_work=71.681756 tx=23303555 date=2013-09-05 10:58:04
progress=0.164588 cache=53195
2015-03-26 01:12:48 UpdateTip: new
best=0000000000000001d5cb5a162b017593ea700796346fc4ad2878317f88639558
height=256236 log2_work=71.681898 tx=23303687 date=2013-09-05 10:59:25
progress=0.164589 cache=53329
2015-03-26 01:12:49 UpdateTip: new
best=00000000000000132059570a30473e9a66082f15a3587f46674e2868e42c1717
height=256237 log2_work=71.68204 tx=23304007 date=2013-09-05 11:07:52
progress=0.164591 cache=53593
2015-03-26 01:12:49 UpdateTip: new
best=0000000000000022e8d500382e2890c4188afbac95bd96b28badeb40535a2d62
height=256238 log2_work=71.682183 tx=23304182 date=2013-09-05 11:13:55
progress=0.164592 cache=53742
2015-03-26 01:12:49 UpdateTip: new
best=00000000000000153e89df838e32e1d69f44352582b7e916779a4c81f5c87fc8
height=256239 log2_work=71.682325 tx=23304295 date=2013-09-05 11:16:07
progress=0.164593 cache=53864
2015-03-26 01:12:49 UpdateTip: new
best=000000000000001c4c2ae705ca273cabbb7881587eee17d65e97872f6d32e3dd
height=256240 log2_work=71.682467 tx=23304658 date=2013-09-05 11:30:15
progress=0.164596 cache=54138
2015-03-26 01:12:49 UpdateTip: new
best=00000000000000094943a4f8db9e6e3c7693fda19a87e0c6311cbff6af5e30ed
height=256241 log2_work=71.682609 tx=23304712 date=2013-09-05 11:31:46
progress=0.164596 cache=54188
2015-03-26 01:12:49 UpdateTip: new
best=00000000000000240151486223bec38ac2efd88b06358ed808b7650ca2d4e7b9
height=256242 log2_work=71.682751 tx=23305195 date=2013-09-05 11:53:06
progress=0.164599 cache=54500
2015-03-26 01:12:49 UpdateTip: new
best=000000000000000b204f319b88cb7ada312006cff24259767ce543590376916b
height=256243 log2_work=71.682893 tx=23305205 date=2013-09-05 11:53:17
progress=0.164599 cache=54510
2015-03-26 01:12:49 UpdateTip: new
best=000000000000002fe406df0a623d0552973f7455aff2866b400492e7b964905d
height=256244 log2_work=71.683035 tx=23305255 date=2013-09-05 11:54:08
progress=0.164600 cache=54530
2015-03-26 01:12:49 UpdateTip: new
best=0000000000000004760b054428b39113e0a27e08cce9a98cd27c4dbee3ea3f05
height=256245 log2_work=71.683178 tx=23305450 date=2013-09-05 12:00:16
progress=0.164601 cache=54716
2015-03-26 01:12:50 UpdateTip: new
best=000000000000000c5a4a7971338e3b2226b4697035455b1f10c8db8806241ecd
height=256246 log2_work=71.68332 tx=23306018 date=2013-09-05 12:08:59
progress=0.164605 cache=55351
2015-03-26 01:12:50 UpdateTip: new
best=000000000000001bb68eb99892b94fa8b33da6be1e52afe17920e05bea0528b0
height=256247 log2_work=71.683462 tx=23307265 date=2013-09-05 12:33:09
progress=0.164614 cache=56346
2015-03-26 01:12:51 UpdateTip: new
best=00000000000000178f4cf7cef8941844bd72d1435f4cf5e61cfe066311f7807a
height=256248 log2_work=71.683604 tx=23307913 date=2013-09-05 12:45:14
progress=0.164619 cache=56992
2015-03-26 01:12:51 UpdateTip: new
best=00000000000000176e15e4fb8f59e2b65407afa87af9af2f2a3ad31a215b5049
height=256249 log2_work=71.683746 tx=23308112 date=2013-09-05 12:48:01
progress=0.164620 cache=57097
2015-03-26 01:12:51 UpdateTip: new
best=000000000000001f1d84edf1d8901ed8a3b4415c0ae71faea14902a0cb12eb2c
height=256250 log2_work=71.683888 tx=23308762 date=2013-09-05 13:07:00
progress=0.164625 cache=57724
2015-03-26 01:12:51 UpdateTip: new
best=0000000000000021843eb11fc9e41c9f6b8403166d485259acd04f6349a15368
height=256251 log2_work=71.68403 tx=23309579 date=2013-09-05 13:35:58
progress=0.164630 cache=58350
2015-03-26 01:12:52 UpdateTip: new
best=000000000000001be38f4d3d802a0c4f53aa250ade35ef562858df8f4459143a
height=256252 log2_work=71.684172 tx=23310617 date=2013-09-05 13:44:30
progress=0.164638 cache=59410
2015-03-26 01:12:52 UpdateTip: new
best=0000000000000016f9e206d675a4806a56889b4dad5bc8101458a67caae8fec5
height=256253 log2_work=71.684314 tx=23310937 date=2013-09-05 13:53:32
progress=0.164640 cache=59760
2015-03-26 01:12:53 UpdateTip: new
best=00000000000000167d0798f1c90a8b032608b2bfec24e9338046f0458f889050
height=256254 log2_work=71.684456 tx=23311912 date=2013-09-05 14:11:04
progress=0.164647 cache=60417
2015-03-26 01:12:53 UpdateTip: new
best=000000000000002c615c4e75ed0e3cd5fdf8c784ed70f994f6b8dd170491052b
height=256255 log2_work=71.684598 tx=23312598 date=2013-09-05 14:25:07
progress=0.164652 cache=61044
2015-03-26 01:12:53 UpdateTip: new
best=00000000000000294c1570b253f58ae84bb3436f27dc341e01ec98b12ffb4457
height=256256 log2_work=71.68474 tx=23312983 date=2013-09-05 14:38:18
progress=0.164654 cache=61382
2015-03-26 01:12:53 UpdateTip: new
best=0000000000000013ef06f2beede29fc3544553f88da16e56be374b98bf8378cc
height=256257 log2_work=71.684882 tx=23313815 date=2013-09-05 14:51:12
progress=0.164660 cache=61964
2015-03-26 01:12:54 UpdateTip: new
best=000000000000000120c0962bfabb16f454d619b081dabd5f593bdec041fdb04c
height=256258 log2_work=71.685023 tx=23314011 date=2013-09-05 14:53:04
progress=0.164662 cache=62117
2015-03-26 01:12:54 UpdateTip: new
best=0000000000000030465e2521d48854fd32e22fb56a4d23383215eeef5cec71ad
height=256259 log2_work=71.685165 tx=23314390 date=2013-09-05 14:59:37
progress=0.164664 cache=62420
2015-03-26 01:12:54 UpdateTip: new
best=0000000000000015f00b818ec4d3cd84c7efe492c19042e8d41aa1d88220fcca
height=256260 log2_work=71.685307 tx=23314668 date=2013-09-05 15:03:44
progress=0.164666 cache=62627
2015-03-26 01:12:54 UpdateTip: new
best=0000000000000021f9c19ee0a908e5e8467a3135ca017778fa0b6fe205858e86
height=256261 log2_work=71.685449 tx=23315249 date=2013-09-05 15:17:30
progress=0.164670 cache=63094
2015-03-26 01:12:54 UpdateTip: new
best=0000000000000004106d02bd030be7b11b09dc29bd1b814d82230a3602d71cbf
height=256262 log2_work=71.685591 tx=23315921 date=2013-09-05 15:39:25
progress=0.164675 cache=63618
2015-03-26 01:12:55 Pre-allocating up to position 0x900000 in rev00079.dat
2015-03-26 01:12:55 UpdateTip: new
best=00000000000000152c20907e5fc32b0a5699cd6b3bdfdc54541068acc40c9001
height=256263 log2_work=71.685733 tx=23316369 date=2013-09-05 15:42:00
progress=0.164678 cache=63845
2015-03-26 01:12:55 UpdateTip: new
best=0000000000000017393b8866299590a0cccb9fc3ec77d78f95ad1c8dad019ba5
height=256264 log2_work=71.685875 tx=23316635 date=2013-09-05 15:44:52
progress=0.164680 cache=64044
2015-03-26 01:12:55 UpdateTip: new
best=0000000000000029669d094d8730098533dace24b5ebbf53b2a289feb034444e
height=256265 log2_work=71.686016 tx=23316846 date=2013-09-05 15:48:59
progress=0.164682 cache=64209
2015-03-26 01:12:55 UpdateTip: new
best=0000000000000024de7285b3c2414f0a16183de523ea34b0e761a4111f693051
height=256266 log2_work=71.686158 tx=23317071 date=2013-09-05 15:54:51
progress=0.164683 cache=64449
2015-03-26 01:12:55 UpdateTip: new
best=00000000000000165eab046aa4a026bc181b82d951936924c5aeb71ca394161a
height=256267 log2_work=71.6863 tx=23317372 date=2013-09-05 15:58:28
progress=0.164685 cache=64676
2015-03-26 01:12:55 UpdateTip: new
best=0000000000000030064bb7a58f10d456eaa8ed4b1b5d302c0ef7beee89165195
height=256268 log2_work=71.686442 tx=23317436 date=2013-09-05 15:59:52
progress=0.164686 cache=64706
2015-03-26 01:12:55 UpdateTip: new
best=0000000000000028115e14c9c3ff53915c178d7e00483ea1d49e89e3a2f8ea1a
height=256269 log2_work=71.686584 tx=23317684 date=2013-09-05 16:05:53
progress=0.164688 cache=64910
2015-03-26 01:12:55 UpdateTip: new
best=000000000000002d8e2f9179ed9f8cf3d9651d7ba23e1df5045fd53a7efb7e9f
height=256270 log2_work=71.686725 tx=23317794 date=2013-09-05 16:08:09
progress=0.164688 cache=64989
2015-03-26 01:12:55 UpdateTip: new
best=000000000000000455fe9a0f779024be6ffb8d66e3983fbb9daf563cc2720dc1
height=256271 log2_work=71.686867 tx=23318058 date=2013-09-05 16:11:30
progress=0.164690 cache=65240
2015-03-26 01:12:56 UpdateTip: new
best=0000000000000008ba72a286f0c0d7cc9f76404d6d03b1ecbceb957a896169ef
height=256272 log2_work=71.687009 tx=23319210 date=2013-09-05 16:33:00
progress=0.164698 cache=66056
2015-03-26 01:12:56 UpdateTip: new
best=000000000000001e54d7eb160c15019da95f2bf0e4a55a75339c2be02953c314
height=256273 log2_work=71.68715 tx=23319463 date=2013-09-05 16:38:52
progress=0.164700 cache=66267
2015-03-26 01:12:56 UpdateTip: new
best=000000000000002665aa9b70dc61c3e3a21b14254d025f247fcd0ee7988556dc
height=256274 log2_work=71.687292 tx=23319761 date=2013-09-05 16:45:01
progress=0.164702 cache=66495
2015-03-26 01:12:56 UpdateTip: new
best=000000000000001452940962883c497d7bfe87508813529d924c3555ca524b6e
height=256275 log2_work=71.687434 tx=23319801 date=2013-09-05 16:46:11
progress=0.164702 cache=66522
2015-03-26 01:12:56 UpdateTip: new
best=000000000000002b0e29289255b11ea377d03f02d6e2013c9c4500879f17aa79
height=256276 log2_work=71.687575 tx=23320487 date=2013-09-05 17:02:48
progress=0.164707 cache=67014
2015-03-26 01:12:56 UpdateTip: new
best=000000000000002d054be1e77c50aafcabf5ad9466560117bd8fd9706e08a472
height=256277 log2_work=71.687717 tx=23320591 date=2013-09-05 17:06:30
progress=0.164708 cache=67099
2015-03-26 01:12:57 UpdateTip: new
best=000000000000002dc13bc14c9e999f56fa19ce4e0ae0c4f203197f1c6f269a26
height=256278 log2_work=71.687859 tx=23321470 date=2013-09-05 17:32:00
progress=0.164714 cache=67893
2015-03-26 01:12:57 UpdateTip: new
best=000000000000000f7125b930e8fd8e239a4c63c0f2d55bb5e63ba9fc4e0109a8
height=256279 log2_work=71.688 tx=23322078 date=2013-09-05 17:35:07
progress=0.164719 cache=68269
2015-03-26 01:12:57 UpdateTip: new
best=000000000000001a92af8fe69ff4aa1e1f02642f9a93587143e9d5d7f1ffba6c
height=256280 log2_work=71.688142 tx=23322632 date=2013-09-05 17:40:49
progress=0.164722 cache=68537
2015-03-26 01:12:57 UpdateTip: new
best=000000000000000159f4bd54cf3c54c2df34ddd6ff51c680e1b7d0622f5c8b43
height=256281 log2_work=71.688283 tx=23323215 date=2013-09-05 17:51:32
progress=0.164727 cache=68947
2015-03-26 01:12:58 UpdateTip: new
best=00000000000000247fe2e1f11a489c118ffb6792d6ba11121279cf12a62453eb
height=256282 log2_work=71.688425 tx=23323753 date=2013-09-05 18:02:21
progress=0.164730 cache=69359
2015-03-26 01:12:58 UpdateTip: new
best=0000000000000014813cffe67140e7dbfb5a7773d274941c2edb1a11d0edd0b7
height=256283 log2_work=71.688567 tx=23324401 date=2013-09-05 18:17:30
progress=0.164735 cache=69837
2015-03-26 01:12:58 UpdateTip: new
best=000000000000000a41919e5ba9bf94590307957438df8957b2d8e055d196b073
height=256284 log2_work=71.688708 tx=23324549 date=2013-09-05 18:17:40
progress=0.164736 cache=69925
2015-03-26 01:12:58 UpdateTip: new
best=000000000000000da78b890167754320fcd7844a8333cf2e7eaa27e6eb66beef
height=256285 log2_work=71.68885 tx=23324674 date=2013-09-05 18:19:50
progress=0.164737 cache=70080
2015-03-26 01:12:58 UpdateTip: new
best=000000000000000a11b83ec67046bd1c3742d37c1fd19eb60993dd4142832587
height=256286 log2_work=71.688991 tx=23325155 date=2013-09-05 18:29:23
progress=0.164740 cache=70487
2015-03-26 01:12:58 UpdateTip: new
best=0000000000000030b9133b269aa99ef3ff0720207add7d6cda4ee4b3682293c5
height=256287 log2_work=71.689133 tx=23325253 date=2013-09-05 18:30:04
progress=0.164741 cache=70561
2015-03-26 01:12:59 UpdateTip: new
best=000000000000001ad1c72f89e3e477dad1a4f31fa259dcc36347e95df771beb3
height=256288 log2_work=71.689274 tx=23325512 date=2013-09-05 18:35:01
progress=0.164743 cache=70724
2015-03-26 01:12:59 UpdateTip: new
best=000000000000001eb25e185d9b67d1395f90134039a94141aec1d1405ae6ed3e
height=256289 log2_work=71.689416 tx=23325535 date=2013-09-05 18:35:15
progress=0.164743 cache=70777
2015-03-26 01:12:59 UpdateTip: new
best=00000000000000021f594b3f66f4caa4251d538e4450bd3f03106d0008845d00
height=256290 log2_work=71.689557 tx=23325632 date=2013-09-05 18:36:45
progress=0.164744 cache=70928
2015-03-26 01:12:59 UpdateTip: new
best=000000000000000eff0b9ad6c63cae18b2c3ca434f62083a77e09a5c254b9240
height=256291 log2_work=71.689699 tx=23326314 date=2013-09-05 18:58:29
progress=0.164748 cache=71546
2015-03-26 01:13:00 UpdateTip: new
best=000000000000001857b4bcda0878dd5a25ffb28add7b9ce33ccaf2f6024e42f8
height=256292 log2_work=71.68984 tx=23326874 date=2013-09-05 19:00:16
progress=0.164752 cache=72269
2015-03-26 01:13:00 UpdateTip: new
best=00000000000000003141cfb167866059105db3bb1cf035f6bc85b53ef85b92ae
height=256293 log2_work=71.689981 tx=23326941 date=2013-09-05 19:00:35
progress=0.164753 cache=72342
2015-03-26 01:13:00 UpdateTip: new
best=0000000000000020bb674a462e0c4a656dce0cd89a96d32beba275afc66512c6
height=256294 log2_work=71.690123 tx=23327139 date=2013-09-05 19:04:22
progress=0.164754 cache=72474
2015-03-26 01:13:00 UpdateTip: new
best=000000000000000f1fd8011fb66ce8df84fb0f2f1b963e0e3cdbb3617f59b7c7
height=256295 log2_work=71.690264 tx=23327734 date=2013-09-05 19:23:20
progress=0.164759 cache=72917
2015-03-26 01:13:00 UpdateTip: new
best=000000000000002a6947553bbcfb982ca718cf2a4cac7dd1b08b035be2964f7e
height=256296 log2_work=71.690406 tx=23327990 date=2013-09-05 19:28:00
progress=0.164760 cache=73191
2015-03-26 01:13:01 UpdateTip: new
best=000000000000000a5ad1f21d83c1432c8562d8dae8ba6b225a3b1ba85acce7f6
height=256297 log2_work=71.690547 tx=23328170 date=2013-09-05 19:28:25
progress=0.164762 cache=73281
2015-03-26 01:13:01 UpdateTip: new
best=00000000000000105bd14a20434bdcd0ee740134893cf84a88421fd3e33ab983
height=256298 log2_work=71.690688 tx=23328497 date=2013-09-05 19:33:39
progress=0.164764 cache=73674
2015-03-26 01:13:01 UpdateTip: new
best=000000000000000e31ee80d1bfb86f6afda5f01cc7fbde2fe4ad6b9ea5c64ce0
height=256299 log2_work=71.69083 tx=23328847 date=2013-09-05 19:41:38
progress=0.164766 cache=73966
2015-03-26 01:13:01 UpdateTip: new
best=000000000000001b0326c319e92c6b9da767ef4afd124363307a6da3d902fa0a
height=256300 log2_work=71.690971 tx=23329181 date=2013-09-05 19:47:54
progress=0.164769 cache=74273
2015-03-26 01:13:01 UpdateTip: new
best=00000000000000119a3ce9b6ba7951f3d377b3218bb1be68e48434b5f8a5a9d5
height=256301 log2_work=71.691112 tx=23329436 date=2013-09-05 19:53:33
progress=0.164771 cache=74449
2015-03-26 01:13:02 UpdateTip: new
best=000000000000003083e3e983f998ad82a3dee8678d718c50947dcb1ba95f492b
height=256302 log2_work=71.691254 tx=23329988 date=2013-09-05 20:07:37
progress=0.164774 cache=74884
2015-03-26 01:13:02 UpdateTip: new
best=00000000000000232c0aa351c33716d7763d6ed2fd31cac929d03711dea15557
height=256303 log2_work=71.691395 tx=23330089 date=2013-09-05 20:09:47
progress=0.164775 cache=74968
2015-03-26 01:13:02 UpdateTip: new
best=00000000000000312aac75a02b0a1a704c80d00943284d98b7b290a150936718
height=256304 log2_work=71.691536 tx=23330274 date=2013-09-05 20:12:43
progress=0.164776 cache=75085
2015-03-26 01:13:02 UpdateTip: new
best=000000000000001a1be9fab4bc79a801932b364716ced96ef324de80b158a67c
height=256305 log2_work=71.691677 tx=23330498 date=2013-09-05 20:17:57
progress=0.164778 cache=75258
2015-03-26 01:13:02 UpdateTip: new
best=000000000000000d884a8219f18d692d9a289bed1ade63ea2fe458681de87d93
height=256306 log2_work=71.691819 tx=23330904 date=2013-09-05 20:23:36
progress=0.164781 cache=75535
2015-03-26 01:13:02 UpdateTip: new
best=0000000000000017771fa7ee6475fb0214c27f4bf9d05add8f0ac7d61d03b469
height=256307 log2_work=71.69196 tx=23330920 date=2013-09-05 20:24:55
progress=0.164781 cache=75547
2015-03-26 01:13:02 UpdateTip: new
best=000000000000000696591811eb1df654a2ee33056bb8bfaea7024a6e1ff46ae3
height=256308 log2_work=71.692101 tx=23331408 date=2013-09-05 20:34:22
progress=0.164784 cache=75854
2015-03-26 01:13:02 UpdateTip: new
best=000000000000000a00fd2b77b9808adce5a65a7ef665f9a1e537453548dabcf1
height=256309 log2_work=71.692242 tx=23332064 date=2013-09-05 20:46:32
progress=0.164789 cache=76332
2015-03-26 01:13:02 UpdateTip: new
best=00000000000000019d219483d1b58abc6e6e4d2a147eaa9dd872f17be08b20ea
height=256310 log2_work=71.692383 tx=23332098 date=2013-09-05 20:45:30
progress=0.164789 cache=76359
2015-03-26 01:13:03 UpdateTip: new
best=000000000000000c10150feb7fca04dac4ffe51fd1b65cb786a28394e4f15a9a
height=256311 log2_work=71.692525 tx=23332413 date=2013-09-05 20:52:20
progress=0.164792 cache=76578
2015-03-26 01:13:03 UpdateTip: new
best=000000000000002132822bd27a89b73a722db1882a93ee3fb955fc90e185bc5e
height=256312 log2_work=71.692666 tx=23332670 date=2013-09-05 20:57:32
progress=0.164793 cache=76730
2015-03-26 01:13:03 UpdateTip: new
best=00000000000000049b4273b34759a18d1790a898f51946aa9479d2c6a4cccfa9
height=256313 log2_work=71.692807 tx=23332803 date=2013-09-05 20:59:25
progress=0.164794 cache=76717
2015-03-26 01:13:03 UpdateTip: new
best=0000000000000013325dd0dea18664e71740f935c7d7330368c9fd79ce44220a
height=256314 log2_work=71.692948 tx=23333358 date=2013-09-05 21:10:26
progress=0.164798 cache=77114
2015-03-26 01:13:03 UpdateTip: new
best=000000000000002270d84d64b2d9738a39566a9614d037bda5df147ebaa8f7ee
height=256315 log2_work=71.693089 tx=23333392 date=2013-09-05 21:10:35
progress=0.164798 cache=77139
2015-03-26 01:13:03 UpdateTip: new
best=000000000000001a5005494e32ee1d0cef03424b64a51c26f0763c2cd4ed280b
height=256316 log2_work=71.69323 tx=23334155 date=2013-09-05 21:26:59
progress=0.164804 cache=77683
2015-03-26 01:13:04 UpdateTip: new
best=0000000000000021092a76cf2a89cdf3d936524f7d9e421e851bdc1cc2ed892e
height=256317 log2_work=71.693371 tx=23334457 date=2013-09-05 21:37:35
progress=0.164806 cache=77961
2015-03-26 01:13:04 UpdateTip: new
best=000000000000001e7e4c0d7928ba3ca327d3dcb2b22ab1120646d426f1e2db34
height=256318 log2_work=71.693512 tx=23334921 date=2013-09-05 21:46:23
progress=0.164809 cache=78139
2015-03-26 01:13:11 Autoprune: PruneOneBlockFile deleted blk/rev (00073)
2015-03-26 01:13:11 Pre-allocating up to position 0xa00000 in rev00079.dat


Reply to this email directly or view it on GitHub
#5863 (comment).

@ajweiss
Copy link
Contributor

ajweiss commented Mar 26, 2015

Also, my idea of a "canonical environment" is a commodity x86_64 based PC
made in the last few years with 4-8gb of ram running a recent version of
Debian or Ubuntu with bitcoind being run in the bare environment with no
containers or VMs. Can you please describe in detail how your environment
differs? (ie; if it's cloud, who and what region. if it's aws; magnetic
or ssd, enhanced ebs or no...). When you've listed sufficient detail such
that you think it's getting absurd, that's just right.

Also, as mentioned before, core files, backtraces and full debug logs are
most welcome.

Thanks!
On Mar 25, 2015 10:06 PM, "Adam Weiss" adam@signal11.com wrote:

Do you have the head of this log where it prints the version string?
core file/backtrace?
On Mar 25, 2015 9:45 PM, "Rusty Russell" notifications@github.com wrote:

Neither. git describe uses the previous tag it knows about. For some
reason it doesn't know about more recent tags. But I'm on commit 40ba177
40ba177
.

The good news: it happened again! bitcoind: coins.cpp:150: virtual bool
CCoinsViewCache::BatchWrite(CCoinsMap&, const uint256&): Assertion
`it->second.flags & CCoinsCacheEntry::FRESH' failed.

Here's the last 100 lines of debug.log (can't figure out how to attach
the whole thing):

2015-03-26 01:12:46 UpdateTip: new
best=000000000000002a45bf369333c2daa0555e8e6f064cbd6bd1ff1a5d06980d82
height=256222 log2_work=71.679906 tx=23298335 date=2013-09-05 08:23:11
progress=0.164551 cache=48753
2015-03-26 01:12:46 UpdateTip: new
best=000000000000000753309260f94ad504e02cfc39bbd27864572d935b1aea715d
height=256223 log2_work=71.680048 tx=23298379 date=2013-09-05 08:24:21
progress=0.164551 cache=48814
2015-03-26 01:12:46 UpdateTip: new
best=0000000000000022474ef8062a2b3ffac71dba34f4713e4320cb03ab2a8b4f27
height=256224 log2_work=71.680191 tx=23298647 date=2013-09-05 08:31:51
progress=0.164553 cache=49002
2015-03-26 01:12:46 UpdateTip: new
best=000000000000000d93e092f11fbffe4cf51b3230b85429126fd59fdc4a658711
height=256225 log2_work=71.680333 tx=23298903 date=2013-09-05 09:02:55
progress=0.164555 cache=49232
2015-03-26 01:12:46 UpdateTip: new
best=000000000000000b82f040c3342eb73532a6124efc40b024fdad513e05fd0bd5
height=256226 log2_work=71.680475 tx=23299531 date=2013-09-05 09:10:09
progress=0.164559 cache=49832
2015-03-26 01:12:46 UpdateTip: new
best=000000000000002a6ecdbe7fbfa95c3506f1453577a683a79da81098e7905584
height=256227 log2_work=71.680618 tx=23300084 date=2013-09-05 09:16:24
progress=0.164563 cache=50243
2015-03-26 01:12:46 UpdateTip: new
best=000000000000002c6fa89ede90bbc722936a218850ce5f6376edb2ea00a7fa05
height=256228 log2_work=71.68076 tx=23300099 date=2013-09-05 09:16:32
progress=0.164563 cache=50271
2015-03-26 01:12:47 UpdateTip: new
best=00000000000000101ce20a35d1ddcae106b960d6e785104426f8d0bdd2017bf2
height=256229 log2_work=71.680902 tx=23300780 date=2013-09-05 09:35:11
progress=0.164568 cache=50989
2015-03-26 01:12:47 UpdateTip: new
best=0000000000000020c9620a098f464ca259dfb49e0d58ac6e8072fb9ebf01aa22
height=256230 log2_work=71.681045 tx=23301155 date=2013-09-05 09:43:39
progress=0.164571 cache=51343
2015-03-26 01:12:47 UpdateTip: new
best=000000000000002ff0c69115a9a7ec287f2eb1e7aaf5fcd8e570523c6d0e35da
height=256231 log2_work=71.681187 tx=23301803 date=2013-09-05 10:08:04
progress=0.164575 cache=51839
2015-03-26 01:12:48 UpdateTip: new
best=0000000000000012934a060e2f39186df3576919488f578142ac0b39f40eb016
height=256232 log2_work=71.681329 tx=23302097 date=2013-09-05 10:11:37
progress=0.164577 cache=52213
2015-03-26 01:12:48 UpdateTip: new
best=0000000000000001fd0e62b6be598ed76515a2044941efdffaa6cffbaedf6be9
height=256233 log2_work=71.681472 tx=23302512 date=2013-09-05 10:23:50
progress=0.164580 cache=52519
2015-03-26 01:12:48 UpdateTip: new
best=000000000000003040c350eb9968ddd8d465c02d3b8c08a57092d648d84e81fb
height=256234 log2_work=71.681614 tx=23303160 date=2013-09-05 10:56:06
progress=0.164585 cache=53021
2015-03-26 01:12:48 UpdateTip: new
best=0000000000000004e00a510cb0eb701049eab4ffa7f5ae0cb35166012f206735
height=256235 log2_work=71.681756 tx=23303555 date=2013-09-05 10:58:04
progress=0.164588 cache=53195
2015-03-26 01:12:48 UpdateTip: new
best=0000000000000001d5cb5a162b017593ea700796346fc4ad2878317f88639558
height=256236 log2_work=71.681898 tx=23303687 date=2013-09-05 10:59:25
progress=0.164589 cache=53329
2015-03-26 01:12:49 UpdateTip: new
best=00000000000000132059570a30473e9a66082f15a3587f46674e2868e42c1717
height=256237 log2_work=71.68204 tx=23304007 date=2013-09-05 11:07:52
progress=0.164591 cache=53593
2015-03-26 01:12:49 UpdateTip: new
best=0000000000000022e8d500382e2890c4188afbac95bd96b28badeb40535a2d62
height=256238 log2_work=71.682183 tx=23304182 date=2013-09-05 11:13:55
progress=0.164592 cache=53742
2015-03-26 01:12:49 UpdateTip: new
best=00000000000000153e89df838e32e1d69f44352582b7e916779a4c81f5c87fc8
height=256239 log2_work=71.682325 tx=23304295 date=2013-09-05 11:16:07
progress=0.164593 cache=53864
2015-03-26 01:12:49 UpdateTip: new
best=000000000000001c4c2ae705ca273cabbb7881587eee17d65e97872f6d32e3dd
height=256240 log2_work=71.682467 tx=23304658 date=2013-09-05 11:30:15
progress=0.164596 cache=54138
2015-03-26 01:12:49 UpdateTip: new
best=00000000000000094943a4f8db9e6e3c7693fda19a87e0c6311cbff6af5e30ed
height=256241 log2_work=71.682609 tx=23304712 date=2013-09-05 11:31:46
progress=0.164596 cache=54188
2015-03-26 01:12:49 UpdateTip: new
best=00000000000000240151486223bec38ac2efd88b06358ed808b7650ca2d4e7b9
height=256242 log2_work=71.682751 tx=23305195 date=2013-09-05 11:53:06
progress=0.164599 cache=54500
2015-03-26 01:12:49 UpdateTip: new
best=000000000000000b204f319b88cb7ada312006cff24259767ce543590376916b
height=256243 log2_work=71.682893 tx=23305205 date=2013-09-05 11:53:17
progress=0.164599 cache=54510
2015-03-26 01:12:49 UpdateTip: new
best=000000000000002fe406df0a623d0552973f7455aff2866b400492e7b964905d
height=256244 log2_work=71.683035 tx=23305255 date=2013-09-05 11:54:08
progress=0.164600 cache=54530
2015-03-26 01:12:49 UpdateTip: new
best=0000000000000004760b054428b39113e0a27e08cce9a98cd27c4dbee3ea3f05
height=256245 log2_work=71.683178 tx=23305450 date=2013-09-05 12:00:16
progress=0.164601 cache=54716
2015-03-26 01:12:50 UpdateTip: new
best=000000000000000c5a4a7971338e3b2226b4697035455b1f10c8db8806241ecd
height=256246 log2_work=71.68332 tx=23306018 date=2013-09-05 12:08:59
progress=0.164605 cache=55351
2015-03-26 01:12:50 UpdateTip: new
best=000000000000001bb68eb99892b94fa8b33da6be1e52afe17920e05bea0528b0
height=256247 log2_work=71.683462 tx=23307265 date=2013-09-05 12:33:09
progress=0.164614 cache=56346
2015-03-26 01:12:51 UpdateTip: new
best=00000000000000178f4cf7cef8941844bd72d1435f4cf5e61cfe066311f7807a
height=256248 log2_work=71.683604 tx=23307913 date=2013-09-05 12:45:14
progress=0.164619 cache=56992
2015-03-26 01:12:51 UpdateTip: new
best=00000000000000176e15e4fb8f59e2b65407afa87af9af2f2a3ad31a215b5049
height=256249 log2_work=71.683746 tx=23308112 date=2013-09-05 12:48:01
progress=0.164620 cache=57097
2015-03-26 01:12:51 UpdateTip: new
best=000000000000001f1d84edf1d8901ed8a3b4415c0ae71faea14902a0cb12eb2c
height=256250 log2_work=71.683888 tx=23308762 date=2013-09-05 13:07:00
progress=0.164625 cache=57724
2015-03-26 01:12:51 UpdateTip: new
best=0000000000000021843eb11fc9e41c9f6b8403166d485259acd04f6349a15368
height=256251 log2_work=71.68403 tx=23309579 date=2013-09-05 13:35:58
progress=0.164630 cache=58350
2015-03-26 01:12:52 UpdateTip: new
best=000000000000001be38f4d3d802a0c4f53aa250ade35ef562858df8f4459143a
height=256252 log2_work=71.684172 tx=23310617 date=2013-09-05 13:44:30
progress=0.164638 cache=59410
2015-03-26 01:12:52 UpdateTip: new
best=0000000000000016f9e206d675a4806a56889b4dad5bc8101458a67caae8fec5
height=256253 log2_work=71.684314 tx=23310937 date=2013-09-05 13:53:32
progress=0.164640 cache=59760
2015-03-26 01:12:53 UpdateTip: new
best=00000000000000167d0798f1c90a8b032608b2bfec24e9338046f0458f889050
height=256254 log2_work=71.684456 tx=23311912 date=2013-09-05 14:11:04
progress=0.164647 cache=60417
2015-03-26 01:12:53 UpdateTip: new
best=000000000000002c615c4e75ed0e3cd5fdf8c784ed70f994f6b8dd170491052b
height=256255 log2_work=71.684598 tx=23312598 date=2013-09-05 14:25:07
progress=0.164652 cache=61044
2015-03-26 01:12:53 UpdateTip: new
best=00000000000000294c1570b253f58ae84bb3436f27dc341e01ec98b12ffb4457
height=256256 log2_work=71.68474 tx=23312983 date=2013-09-05 14:38:18
progress=0.164654 cache=61382
2015-03-26 01:12:53 UpdateTip: new
best=0000000000000013ef06f2beede29fc3544553f88da16e56be374b98bf8378cc
height=256257 log2_work=71.684882 tx=23313815 date=2013-09-05 14:51:12
progress=0.164660 cache=61964
2015-03-26 01:12:54 UpdateTip: new
best=000000000000000120c0962bfabb16f454d619b081dabd5f593bdec041fdb04c
height=256258 log2_work=71.685023 tx=23314011 date=2013-09-05 14:53:04
progress=0.164662 cache=62117
2015-03-26 01:12:54 UpdateTip: new
best=0000000000000030465e2521d48854fd32e22fb56a4d23383215eeef5cec71ad
height=256259 log2_work=71.685165 tx=23314390 date=2013-09-05 14:59:37
progress=0.164664 cache=62420
2015-03-26 01:12:54 UpdateTip: new
best=0000000000000015f00b818ec4d3cd84c7efe492c19042e8d41aa1d88220fcca
height=256260 log2_work=71.685307 tx=23314668 date=2013-09-05 15:03:44
progress=0.164666 cache=62627
2015-03-26 01:12:54 UpdateTip: new
best=0000000000000021f9c19ee0a908e5e8467a3135ca017778fa0b6fe205858e86
height=256261 log2_work=71.685449 tx=23315249 date=2013-09-05 15:17:30
progress=0.164670 cache=63094
2015-03-26 01:12:54 UpdateTip: new
best=0000000000000004106d02bd030be7b11b09dc29bd1b814d82230a3602d71cbf
height=256262 log2_work=71.685591 tx=23315921 date=2013-09-05 15:39:25
progress=0.164675 cache=63618
2015-03-26 01:12:55 Pre-allocating up to position 0x900000 in rev00079.dat
2015-03-26 01:12:55 UpdateTip: new
best=00000000000000152c20907e5fc32b0a5699cd6b3bdfdc54541068acc40c9001
height=256263 log2_work=71.685733 tx=23316369 date=2013-09-05 15:42:00
progress=0.164678 cache=63845
2015-03-26 01:12:55 UpdateTip: new
best=0000000000000017393b8866299590a0cccb9fc3ec77d78f95ad1c8dad019ba5
height=256264 log2_work=71.685875 tx=23316635 date=2013-09-05 15:44:52
progress=0.164680 cache=64044
2015-03-26 01:12:55 UpdateTip: new
best=0000000000000029669d094d8730098533dace24b5ebbf53b2a289feb034444e
height=256265 log2_work=71.686016 tx=23316846 date=2013-09-05 15:48:59
progress=0.164682 cache=64209
2015-03-26 01:12:55 UpdateTip: new
best=0000000000000024de7285b3c2414f0a16183de523ea34b0e761a4111f693051
height=256266 log2_work=71.686158 tx=23317071 date=2013-09-05 15:54:51
progress=0.164683 cache=64449
2015-03-26 01:12:55 UpdateTip: new
best=00000000000000165eab046aa4a026bc181b82d951936924c5aeb71ca394161a
height=256267 log2_work=71.6863 tx=23317372 date=2013-09-05 15:58:28
progress=0.164685 cache=64676
2015-03-26 01:12:55 UpdateTip: new
best=0000000000000030064bb7a58f10d456eaa8ed4b1b5d302c0ef7beee89165195
height=256268 log2_work=71.686442 tx=23317436 date=2013-09-05 15:59:52
progress=0.164686 cache=64706
2015-03-26 01:12:55 UpdateTip: new
best=0000000000000028115e14c9c3ff53915c178d7e00483ea1d49e89e3a2f8ea1a
height=256269 log2_work=71.686584 tx=23317684 date=2013-09-05 16:05:53
progress=0.164688 cache=64910
2015-03-26 01:12:55 UpdateTip: new
best=000000000000002d8e2f9179ed9f8cf3d9651d7ba23e1df5045fd53a7efb7e9f
height=256270 log2_work=71.686725 tx=23317794 date=2013-09-05 16:08:09
progress=0.164688 cache=64989
2015-03-26 01:12:55 UpdateTip: new
best=000000000000000455fe9a0f779024be6ffb8d66e3983fbb9daf563cc2720dc1
height=256271 log2_work=71.686867 tx=23318058 date=2013-09-05 16:11:30
progress=0.164690 cache=65240
2015-03-26 01:12:56 UpdateTip: new
best=0000000000000008ba72a286f0c0d7cc9f76404d6d03b1ecbceb957a896169ef
height=256272 log2_work=71.687009 tx=23319210 date=2013-09-05 16:33:00
progress=0.164698 cache=66056
2015-03-26 01:12:56 UpdateTip: new
best=000000000000001e54d7eb160c15019da95f2bf0e4a55a75339c2be02953c314
height=256273 log2_work=71.68715 tx=23319463 date=2013-09-05 16:38:52
progress=0.164700 cache=66267
2015-03-26 01:12:56 UpdateTip: new
best=000000000000002665aa9b70dc61c3e3a21b14254d025f247fcd0ee7988556dc
height=256274 log2_work=71.687292 tx=23319761 date=2013-09-05 16:45:01
progress=0.164702 cache=66495
2015-03-26 01:12:56 UpdateTip: new
best=000000000000001452940962883c497d7bfe87508813529d924c3555ca524b6e
height=256275 log2_work=71.687434 tx=23319801 date=2013-09-05 16:46:11
progress=0.164702 cache=66522
2015-03-26 01:12:56 UpdateTip: new
best=000000000000002b0e29289255b11ea377d03f02d6e2013c9c4500879f17aa79
height=256276 log2_work=71.687575 tx=23320487 date=2013-09-05 17:02:48
progress=0.164707 cache=67014
2015-03-26 01:12:56 UpdateTip: new
best=000000000000002d054be1e77c50aafcabf5ad9466560117bd8fd9706e08a472
height=256277 log2_work=71.687717 tx=23320591 date=2013-09-05 17:06:30
progress=0.164708 cache=67099
2015-03-26 01:12:57 UpdateTip: new
best=000000000000002dc13bc14c9e999f56fa19ce4e0ae0c4f203197f1c6f269a26
height=256278 log2_work=71.687859 tx=23321470 date=2013-09-05 17:32:00
progress=0.164714 cache=67893
2015-03-26 01:12:57 UpdateTip: new
best=000000000000000f7125b930e8fd8e239a4c63c0f2d55bb5e63ba9fc4e0109a8
height=256279 log2_work=71.688 tx=23322078 date=2013-09-05 17:35:07
progress=0.164719 cache=68269
2015-03-26 01:12:57 UpdateTip: new
best=000000000000001a92af8fe69ff4aa1e1f02642f9a93587143e9d5d7f1ffba6c
height=256280 log2_work=71.688142 tx=23322632 date=2013-09-05 17:40:49
progress=0.164722 cache=68537
2015-03-26 01:12:57 UpdateTip: new
best=000000000000000159f4bd54cf3c54c2df34ddd6ff51c680e1b7d0622f5c8b43
height=256281 log2_work=71.688283 tx=23323215 date=2013-09-05 17:51:32
progress=0.164727 cache=68947
2015-03-26 01:12:58 UpdateTip: new
best=00000000000000247fe2e1f11a489c118ffb6792d6ba11121279cf12a62453eb
height=256282 log2_work=71.688425 tx=23323753 date=2013-09-05 18:02:21
progress=0.164730 cache=69359
2015-03-26 01:12:58 UpdateTip: new
best=0000000000000014813cffe67140e7dbfb5a7773d274941c2edb1a11d0edd0b7
height=256283 log2_work=71.688567 tx=23324401 date=2013-09-05 18:17:30
progress=0.164735 cache=69837
2015-03-26 01:12:58 UpdateTip: new
best=000000000000000a41919e5ba9bf94590307957438df8957b2d8e055d196b073
height=256284 log2_work=71.688708 tx=23324549 date=2013-09-05 18:17:40
progress=0.164736 cache=69925
2015-03-26 01:12:58 UpdateTip: new
best=000000000000000da78b890167754320fcd7844a8333cf2e7eaa27e6eb66beef
height=256285 log2_work=71.68885 tx=23324674 date=2013-09-05 18:19:50
progress=0.164737 cache=70080
2015-03-26 01:12:58 UpdateTip: new
best=000000000000000a11b83ec67046bd1c3742d37c1fd19eb60993dd4142832587
height=256286 log2_work=71.688991 tx=23325155 date=2013-09-05 18:29:23
progress=0.164740 cache=70487
2015-03-26 01:12:58 UpdateTip: new
best=0000000000000030b9133b269aa99ef3ff0720207add7d6cda4ee4b3682293c5
height=256287 log2_work=71.689133 tx=23325253 date=2013-09-05 18:30:04
progress=0.164741 cache=70561
2015-03-26 01:12:59 UpdateTip: new
best=000000000000001ad1c72f89e3e477dad1a4f31fa259dcc36347e95df771beb3
height=256288 log2_work=71.689274 tx=23325512 date=2013-09-05 18:35:01
progress=0.164743 cache=70724
2015-03-26 01:12:59 UpdateTip: new
best=000000000000001eb25e185d9b67d1395f90134039a94141aec1d1405ae6ed3e
height=256289 log2_work=71.689416 tx=23325535 date=2013-09-05 18:35:15
progress=0.164743 cache=70777
2015-03-26 01:12:59 UpdateTip: new
best=00000000000000021f594b3f66f4caa4251d538e4450bd3f03106d0008845d00
height=256290 log2_work=71.689557 tx=23325632 date=2013-09-05 18:36:45
progress=0.164744 cache=70928
2015-03-26 01:12:59 UpdateTip: new
best=000000000000000eff0b9ad6c63cae18b2c3ca434f62083a77e09a5c254b9240
height=256291 log2_work=71.689699 tx=23326314 date=2013-09-05 18:58:29
progress=0.164748 cache=71546
2015-03-26 01:13:00 UpdateTip: new
best=000000000000001857b4bcda0878dd5a25ffb28add7b9ce33ccaf2f6024e42f8
height=256292 log2_work=71.68984 tx=23326874 date=2013-09-05 19:00:16
progress=0.164752 cache=72269
2015-03-26 01:13:00 UpdateTip: new
best=00000000000000003141cfb167866059105db3bb1cf035f6bc85b53ef85b92ae
height=256293 log2_work=71.689981 tx=23326941 date=2013-09-05 19:00:35
progress=0.164753 cache=72342
2015-03-26 01:13:00 UpdateTip: new
best=0000000000000020bb674a462e0c4a656dce0cd89a96d32beba275afc66512c6
height=256294 log2_work=71.690123 tx=23327139 date=2013-09-05 19:04:22
progress=0.164754 cache=72474
2015-03-26 01:13:00 UpdateTip: new
best=000000000000000f1fd8011fb66ce8df84fb0f2f1b963e0e3cdbb3617f59b7c7
height=256295 log2_work=71.690264 tx=23327734 date=2013-09-05 19:23:20
progress=0.164759 cache=72917
2015-03-26 01:13:00 UpdateTip: new
best=000000000000002a6947553bbcfb982ca718cf2a4cac7dd1b08b035be2964f7e
height=256296 log2_work=71.690406 tx=23327990 date=2013-09-05 19:28:00
progress=0.164760 cache=73191
2015-03-26 01:13:01 UpdateTip: new
best=000000000000000a5ad1f21d83c1432c8562d8dae8ba6b225a3b1ba85acce7f6
height=256297 log2_work=71.690547 tx=23328170 date=2013-09-05 19:28:25
progress=0.164762 cache=73281
2015-03-26 01:13:01 UpdateTip: new
best=00000000000000105bd14a20434bdcd0ee740134893cf84a88421fd3e33ab983
height=256298 log2_work=71.690688 tx=23328497 date=2013-09-05 19:33:39
progress=0.164764 cache=73674
2015-03-26 01:13:01 UpdateTip: new
best=000000000000000e31ee80d1bfb86f6afda5f01cc7fbde2fe4ad6b9ea5c64ce0
height=256299 log2_work=71.69083 tx=23328847 date=2013-09-05 19:41:38
progress=0.164766 cache=73966
2015-03-26 01:13:01 UpdateTip: new
best=000000000000001b0326c319e92c6b9da767ef4afd124363307a6da3d902fa0a
height=256300 log2_work=71.690971 tx=23329181 date=2013-09-05 19:47:54
progress=0.164769 cache=74273
2015-03-26 01:13:01 UpdateTip: new
best=00000000000000119a3ce9b6ba7951f3d377b3218bb1be68e48434b5f8a5a9d5
height=256301 log2_work=71.691112 tx=23329436 date=2013-09-05 19:53:33
progress=0.164771 cache=74449
2015-03-26 01:13:02 UpdateTip: new
best=000000000000003083e3e983f998ad82a3dee8678d718c50947dcb1ba95f492b
height=256302 log2_work=71.691254 tx=23329988 date=2013-09-05 20:07:37
progress=0.164774 cache=74884
2015-03-26 01:13:02 UpdateTip: new
best=00000000000000232c0aa351c33716d7763d6ed2fd31cac929d03711dea15557
height=256303 log2_work=71.691395 tx=23330089 date=2013-09-05 20:09:47
progress=0.164775 cache=74968
2015-03-26 01:13:02 UpdateTip: new
best=00000000000000312aac75a02b0a1a704c80d00943284d98b7b290a150936718
height=256304 log2_work=71.691536 tx=23330274 date=2013-09-05 20:12:43
progress=0.164776 cache=75085
2015-03-26 01:13:02 UpdateTip: new
best=000000000000001a1be9fab4bc79a801932b364716ced96ef324de80b158a67c
height=256305 log2_work=71.691677 tx=23330498 date=2013-09-05 20:17:57
progress=0.164778 cache=75258
2015-03-26 01:13:02 UpdateTip: new
best=000000000000000d884a8219f18d692d9a289bed1ade63ea2fe458681de87d93
height=256306 log2_work=71.691819 tx=23330904 date=2013-09-05 20:23:36
progress=0.164781 cache=75535
2015-03-26 01:13:02 UpdateTip: new
best=0000000000000017771fa7ee6475fb0214c27f4bf9d05add8f0ac7d61d03b469
height=256307 log2_work=71.69196 tx=23330920 date=2013-09-05 20:24:55
progress=0.164781 cache=75547
2015-03-26 01:13:02 UpdateTip: new
best=000000000000000696591811eb1df654a2ee33056bb8bfaea7024a6e1ff46ae3
height=256308 log2_work=71.692101 tx=23331408 date=2013-09-05 20:34:22
progress=0.164784 cache=75854
2015-03-26 01:13:02 UpdateTip: new
best=000000000000000a00fd2b77b9808adce5a65a7ef665f9a1e537453548dabcf1
height=256309 log2_work=71.692242 tx=23332064 date=2013-09-05 20:46:32
progress=0.164789 cache=76332
2015-03-26 01:13:02 UpdateTip: new
best=00000000000000019d219483d1b58abc6e6e4d2a147eaa9dd872f17be08b20ea
height=256310 log2_work=71.692383 tx=23332098 date=2013-09-05 20:45:30
progress=0.164789 cache=76359
2015-03-26 01:13:03 UpdateTip: new
best=000000000000000c10150feb7fca04dac4ffe51fd1b65cb786a28394e4f15a9a
height=256311 log2_work=71.692525 tx=23332413 date=2013-09-05 20:52:20
progress=0.164792 cache=76578
2015-03-26 01:13:03 UpdateTip: new
best=000000000000002132822bd27a89b73a722db1882a93ee3fb955fc90e185bc5e
height=256312 log2_work=71.692666 tx=23332670 date=2013-09-05 20:57:32
progress=0.164793 cache=76730
2015-03-26 01:13:03 UpdateTip: new
best=00000000000000049b4273b34759a18d1790a898f51946aa9479d2c6a4cccfa9
height=256313 log2_work=71.692807 tx=23332803 date=2013-09-05 20:59:25
progress=0.164794 cache=76717
2015-03-26 01:13:03 UpdateTip: new
best=0000000000000013325dd0dea18664e71740f935c7d7330368c9fd79ce44220a
height=256314 log2_work=71.692948 tx=23333358 date=2013-09-05 21:10:26
progress=0.164798 cache=77114
2015-03-26 01:13:03 UpdateTip: new
best=000000000000002270d84d64b2d9738a39566a9614d037bda5df147ebaa8f7ee
height=256315 log2_work=71.693089 tx=23333392 date=2013-09-05 21:10:35
progress=0.164798 cache=77139
2015-03-26 01:13:03 UpdateTip: new
best=000000000000001a5005494e32ee1d0cef03424b64a51c26f0763c2cd4ed280b
height=256316 log2_work=71.69323 tx=23334155 date=2013-09-05 21:26:59
progress=0.164804 cache=77683
2015-03-26 01:13:04 UpdateTip: new
best=0000000000000021092a76cf2a89cdf3d936524f7d9e421e851bdc1cc2ed892e
height=256317 log2_work=71.693371 tx=23334457 date=2013-09-05 21:37:35
progress=0.164806 cache=77961
2015-03-26 01:13:04 UpdateTip: new
best=000000000000001e7e4c0d7928ba3ca327d3dcb2b22ab1120646d426f1e2db34
height=256318 log2_work=71.693512 tx=23334921 date=2013-09-05 21:46:23
progress=0.164809 cache=78139
2015-03-26 01:13:11 Autoprune: PruneOneBlockFile deleted blk/rev (00073)
2015-03-26 01:13:11 Pre-allocating up to position 0xa00000 in rev00079.dat


Reply to this email directly or view it on GitHub
#5863 (comment).

@rustyrussell
Copy link
Contributor

Got a core file, but backtrace was useless without debugging info :( So I've reconfigured with --enable-debug (and --disable-wallet). Seems repeatable, so I'll expect something soon. If not, I'll erase the blockchain and try again.

Hardware:
I'm running this on a minimal digital ocean droplet, so 512M ram, 1.5G swap, 20GB total hdd. Hence the desire to test pruning.

Setup:
$ cat .bitcoin/bitcoin.conf
server=1
gen=0
prune=1000
rpcuser=bitcoinrpc
rpcpassword=.....
$ bitcoind > bitcoind-out-4 2>&1
$ watch bitcoin-cli getinfo

The following diff was applied, but I've now unapplied it to make doubly-sure:

diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 6e0f7e9..2645baf 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -523,14 +523,29 @@ void CTxMemPool::removeForBlock(const std::vector<CTransaction>& vtx, unsigned i
     BOOST_FOREACH(const CTransaction& tx, vtx)
     {
         uint256 hash = tx.GetHash();
-        if (mapTx.count(hash))
+        if (mapTx.count(hash)) {
+           // Record a TX we already knew.
+           std::cerr << nBlockHeight << ":mutual:" << tx.GetHash().ToString() << endl;
             entries.push_back(mapTx[hash]);
+       } else {
+           std::cerr << nBlockHeight << ":new:" << tx.GetHash().ToString() << endl;
+       }
     }
     minerPolicyEstimator->seenBlock(entries, nBlockHeight, minRelayFee);
     BOOST_FOREACH(const CTransaction& tx, vtx)
     {
         std::list<CTransaction> dummy;
         remove(tx, dummy, false);
+    }
+
+   typedef std::map<uint256, CTxMemPoolEntry> maptx_type;
+   BOOST_FOREACH(const maptx_type::value_type& txpair, mapTx)
+   {
+       std::cerr << nBlockHeight << ":mempool-only:" << txpair.first.ToString() << endl;
+   }
+
+    BOOST_FOREACH(const CTransaction& tx, vtx)
+    {
         removeConflicts(tx, conflicts);
         ClearPrioritisation(tx.GetHash());
     }

@rustyrussell
Copy link
Contributor

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 7.7 (wheezy)
Release:    7.7
Codename:   wheezy
$ uname -a
Linux Petty1 3.2.0-4-686-pae #1 SMP Debian 3.2.54-2 i686 GNU/Linux
$ bitcoind --version
Bitcoin Core Daemon version v0.10.99.0-40ba177
Copyright (C) 2009-2015 The Bitcoin Core Developers

This is experimental software.

Distributed under the MIT software license, see the accompanying file COPYING
or <http://www.opensource.org/licenses/mit-license.php>.

This product includes software developed by the OpenSSL Project for use in the
OpenSSL Toolkit <https://www.openssl.org/> and cryptographic software written
by Eric Young and UPnP software written by Thomas Bernard.

@ajweiss
Copy link
Contributor

ajweiss commented Mar 26, 2015

I don't see any immediate problems with the diff, but I agree, better safe
than sorry. Hopefully you'll get a backtrace, and if it's not obvious,
don't forget to mind the threads.

Thanks a lot!
On Mar 25, 2015 11:00 PM, "Rusty Russell" notifications@github.com wrote:

Reconfigured with --enable-debug (and --disable-wallet) as before. Got a
core file, but backtrace was useless without debugging info :( Seems
repeatable, so I'll expect something soon. If not, I'll erase the
blockchain and try again.

Hardware:
I'm running this on a minimal digital ocean droplet, so 512M ram, 1.5G
swap, 20GB total hdd. Hence the desire to test pruning.

Setup:
$ cat .bitcoin/bitcoin.conf
server=1
gen=0
prune=1000
rpcuser=bitcoinrpc
rpcpassword=.....
$ bitcoind > bitcoind-out-4 2>&1
$ watch bitcoin-cli getinfo

The following diff was applied, but I've now unapplied it to make
doubly-sure:

diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 6e0f7e9..2645baf 100644--- a/src/txmempool.cpp+++ b/src/txmempool.cpp@@ -523,14 +523,29 @@ void CTxMemPool::removeForBlock(const std::vector& vtx, unsigned i
BOOST_FOREACH(const CTransaction& tx, vtx)
{
uint256 hash = tx.GetHash();- if (mapTx.count(hash))+ if (mapTx.count(hash)) {+ // Record a TX we already knew.+ std::cerr << nBlockHeight << ":mutual:" << tx.GetHash().ToString() << endl;
entries.push_back(mapTx[hash]);+ } else {+ std::cerr << nBlockHeight << ":new:" << tx.GetHash().ToString() << endl;+ }
}
minerPolicyEstimator->seenBlock(entries, nBlockHeight, minRelayFee);
BOOST_FOREACH(const CTransaction& tx, vtx)
{
std::list dummy;
remove(tx, dummy, false);+ }++ typedef std::map<uint256, CTxMemPoolEntry> maptx_type;+ BOOST_FOREACH(const maptx_type::value_type& txpair, mapTx)+ {+ std::cerr << nBlockHeight << ":mempool-only:" << txpair.first.ToString() << endl;+ }++ BOOST_FOREACH(const CTransaction& tx, vtx)+ {
removeConflicts(tx, conflicts);
ClearPrioritisation(tx.GetHash());
}


Reply to this email directly or view it on GitHub
#5863 (comment).

@fanquake
Copy link
Member

Can this be rebased?

@rustyrussell
Copy link
Contributor

$ tail bitcoind-out-4
bitcoind: coins.cpp:150: virtual bool CCoinsViewCache::BatchWrite(CCoinsMap&, const uint256&): Assertion `it->second.flags & CCoinsCacheEntry::FRESH' failed.
$ gdb bitcoin/src/bitcoind core
(gdb) thread apply all bt

Thread 11 (Thread 0xaef05b70 (LWP 31697)):
#0 0xb702a424 in __kernel_vsyscall ()
#1 0xb6c2423a in __pthread_cond_wait (cond=0xbfb8f740, mutex=0xbfb8f728)
at pthread_cond_wait.c:153
#2 0xb7083f4d in boost::condition_variable::wait (this=0xbfb8f728, m=...)
at /usr/include/boost/thread/pthread/condition_variable.hpp:56
#3 0xb722317d in CSemaphore::wait (this=0xbfb8f728) at sync.h:200
#4 0xb7223321 in CSemaphoreGrant::Acquire (this=0xaef0515c) at sync.h:236
#5 0xb7223522 in CSemaphoreGrant::CSemaphoreGrant (this=0xaef0515c, sema=...,
fTry=false) at sync.h:271
#6 0xb7218d06 in ThreadOpenConnections () at net.cpp:1181
#7 0xb722ae48 in TraceThread<void ()()> (name=0xb74ef9c2 "opencon",
func=0xb72187d2 <ThreadOpenConnections()>) at util.h:214
#8 0xb7265027 in boost::_bi::list2<boost::_bi::value<char const
>, boost::bi::value<void ()()> >::operator()<void ()(char const*, void ()()), boost::_bi::list0> (this=0xb211cc80,
f=@0xb211cc7c: 0xb722adca <TraceThread<void (
)()>(char const
, void (_)())>, a=...) at /usr/include/boost/bind/bind.hpp:313
#9 0xb7264b23 in boost::bi::bind_t<void, void ()(char const, void ()()), boost::_bi::list2<boost::_bi::value<char const>, boost::bi::value<void ()()> > >::operator() (this=0xb211cc7c) at /usr/include/boost/bind/bind_template.hpp:20
#10 0xb72644b1 in boost::detail::thread_data<boost::_bi::bind_t<void, void (
)(c---Type to continue, or q to quit---
har const
, void (
)()), boost::_bi::list2<boost::_bi::value<char const*>, boost::_bi::value<void (*)()> > > >::run (this=0xb211cb78)
at /usr/include/boost/thread/detail/thread.hpp:62
#11 0xb6f9342c in ?? () from /usr/lib/libboost_thread.so.1.49.0
#12 0xb6c1fc39 in start_thread (arg=0xaef05b70) at pthread_create.c:304
#13 0xb6b8b9fe in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 10 (Thread 0xb611bb70 (LWP 31657)):
#0 0xb702a424 in __kernel_vsyscall ()
#1 0xb6c2423a in __pthread_cond_wait (cond=0xb611b1a8, mutex=0xb83d5900)
at pthread_cond_wait.c:153
#2 0xb7281848 in boost::asio::detail::posix_event::waitboost::asio::detail::scoped_lock<boost::asio::detail::posix_mutex > (this=0xb611b1a8, lock=...)
at /usr/include/boost/asio/detail/posix_event.hpp:80
#3 0xb7277e33 in boost::asio::detail::task_io_service::do_run_one (
this=0xb83d58e8, lock=..., this_thread=..., private_op_queue=..., ec=...)
at /usr/include/boost/asio/detail/impl/task_io_service.ipp:380
#4 0xb727784b in boost::asio::detail::task_io_service::run (this=0xb83d58e8,
ec=...) at /usr/include/boost/asio/detail/impl/task_io_service.ipp:146
#5 0xb72782c1 in boost::asio::io_service::run (this=0xb83d5340)
at /usr/include/boost/asio/impl/io_service.ipp:59
#6 0xb72e9911 in boost::_mfi::mf0<unsigned int, boost::asio::io_service>::operator() (this=0xb842634c, p=0xb83d5340)
---Type to continue, or q to quit---
at /usr/include/boost/bind/mem_fn_template.hpp:49
#7 0xb72e7f0a in boost::_bi::list1boost::_bi::value<boost::asio::io_service* >::operator()<unsigned int, boost::_mfi::mf0<unsigned int, boost::asio::io_service>, boost::_bi::list0> (this=0xb8426354, f=..., a=...)
at /usr/include/boost/bind/bind.hpp:243
#8 0xb72e679d in boost::_bi::bind_t<unsigned int, boost::_mfi::mf0<unsigned int, boost::asio::io_service>, boost::_bi::list1boost::_bi::value<boost::asio::io_service* > >::operator() (this=0xb842634c)
at /usr/include/boost/bind/bind_template.hpp:20
#9 0xb72e4b31 in boost::detail::thread_data<boost::_bi::bind_t<unsigned int, boost::_mfi::mf0<unsigned int, boost::asio::io_service>, boost::_bi::list1boost::_bi::value<boost::asio::io_service* > > >::run (this=0xb8426248)
at /usr/include/boost/thread/detail/thread.hpp:62
#10 0xb6f9342c in ?? () from /usr/lib/libboost_thread.so.1.49.0
#11 0xb6c1fc39 in start_thread (arg=0xb611bb70) at pthread_create.c:304
#12 0xb6b8b9fe in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 9 (Thread 0xb466ab70 (LWP 31663)):
#0 0xb702a424 in __kernel_vsyscall ()
#1 0xb6c27e7b in do_pread64 (offset=, count=,
buf=, fd=)
at ../sysdeps/unix/sysv/linux/pread64.c:54
#2 __libc_pread64 (fd=109, buf=0xb15d3d58, count=31295, offset=4234304)
---Type to continue, or q to quit---
at ../sysdeps/unix/sysv/linux/pread64.c:77
#3 0xb74810d1 in leveldb::(anonymous namespace)::PosixRandomAccessFile::Read (
this=0xb893bee0, offset=4217300, n=31295, result=0xb4669cf4,
scratch=0xb15d3d58 "") at util/env_posix.cc:83
#4 0xb748dc60 in leveldb::ReadBlock (file=0xb893bee0, options=...,
handle=..., result=0xb4669da0) at table/format.cc:79
#5 0xb747a1da in leveldb::Table::BlockReader (arg=0xb87c23e8, options=...,
index_value=...) at table/table.cc:189
#6 0xb747b742 in leveldb::(anonymous namespace)::TwoLevelIterator::InitDataBlock (this=0xb1e55eb0) at table/two_level_iterator.cc:165
#7 0xb747b448 in leveldb::(anonymous namespace)::TwoLevelIterator::SkipEmptyDataBlocksForward (this=0xb1e55eb0) at table/two_level_iterator.cc:133
#8 0xb747b334 in leveldb::(anonymous namespace)::TwoLevelIterator::Next (
this=0xb1e55eb0) at table/two_level_iterator.cc:115
#9 0xb747769a in leveldb::IteratorWrapper::Next (this=0xb227b6f8)
at ./table/iterator_wrapper.h:42
#10 0xb747b329 in leveldb::(anonymous namespace)::TwoLevelIterator::Next (
this=0xb227b6c0) at table/two_level_iterator.cc:114
#11 0xb747769a in leveldb::IteratorWrapper::Next (this=0xb1b16384)
at ./table/iterator_wrapper.h:42
#12 0xb7476c82 in leveldb::(anonymous namespace)::MergingIterator::Next (
this=0xbdc6c858) at table/merger.cc:81
#13 0xb744cf6e in leveldb::DBImpl::DoCompactionWork (this=0xb8433448,
---Type to continue, or q to quit---
compact=0xbfd4fff0) at db/db_impl.cc:975
#14 0xb744ba72 in leveldb::DBImpl::BackgroundCompaction (this=0xb8433448)
at db/db_impl.cc:706
#15 0xb744b3c0 in leveldb::DBImpl::BackgroundCall (this=0xb8433448)
at db/db_impl.cc:644
#16 0xb744b302 in leveldb::DBImpl::BGWork (db=0xb8433448) at db/db_impl.cc:633
#17 0xb7483a86 in leveldb::(anonymous namespace)::PosixEnv::BGThread (
this=0xb8426db8) at util/env_posix.cc:569
#18 0xb748365f in leveldb::(anonymous namespace)::PosixEnv::BGThreadWrapper (
arg=0xb8426db8) at util/env_posix.cc:508
#19 0xb6c1fc39 in start_thread (arg=0xb466ab70) at pthread_create.c:304
#20 0xb6b8b9fe in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 8 (Thread 0xadf03b70 (LWP 31699)):
#0 0xb702a424 in __kernel_vsyscall ()

#1 0xb6c24733 in pthread_cond_timedwait@@GLIBC_2.3.2 ()
at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_timedwait.S:236
#2 0xb7372570 in boost::condition_variable::timed_wait (this=0xbcc8c6b0,
m=..., wait_until=...)
at /usr/include/boost/thread/pthread/condition_variable.hpp:74
#3 0xb6f95a58 in boost::this_thread::sleep(boost::posix_time::ptime const&) ()
from /usr/lib/libboost_thread.so.1.49.0
---Type to continue, or q to quit---
#4 0xb742f85e in boost::this_thread::sleep<boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000ll> > (rel_time=...)
at /usr/include/boost/thread/pthread/thread_data.hpp:149
#5 0xb742db6e in MilliSleep (n=900000) at utiltime.cpp:54
#6 0xb722b1c3 in LoopForever<void ()()> (name=0xb74ef9d2 "dumpaddr",
func=0xb7218522 <DumpAddresses()>, msecs=900000) at util.h:185
#7 0xb7264f87 in boost::_bi::list3<boost::_bi::value<char const
>, boost::bi::value<void ()()>, boost::_bi::value >::operator()<void ()(char const*, void ()(), long long), boost::_bi::list0> (this=0xbcc8c728,
f=@0xbcc8c724: 0xb722b12c <LoopForever<void (
)()>(char const
, void (_)(), long long)>, a=...) at /usr/include/boost/bind/bind.hpp:392
#8 0xb7264aa7 in boost::_bi::bind_t<void, void ()(char const, void ()(), long long), boost::_bi::list3<boost::_bi::value<char const>, boost::_bi::value<void ()()>, boost::_bi::value > >::operator() (this=0xbcc8c724)
at /usr/include/boost/bind/bind_template.hpp:20
#9 0xb7264467 in boost::detail::thread_data<boost::_bi::bind_t<void, void (
)(char const*, void ()(), long long), boost::_bi::list3<boost::_bi::value<char const>, boost::_bi::value<void (*)()>, boost::_bi::value > > >::run (
this=0xbcc8c620) at /usr/include/boost/thread/detail/thread.hpp:62
#10 0xb6f9342c in ?? () from /usr/lib/libboost_thread.so.1.49.0
#11 0xb6c1fc39 in start_thread (arg=0xadf03b70) at pthread_create.c:304
#12 0xb6b8b9fe in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

---Type to continue, or q to quit---
Thread 7 (Thread 0xb5119b70 (LWP 31659)):
#0 0xb702a424 in __kernel_vsyscall ()
#1 0xb6c2423a in __pthread_cond_wait (cond=0xb51191a8, mutex=0xb83d5900)
at pthread_cond_wait.c:153
#2 0xb7281848 in boost::asio::detail::posix_event::waitboost::asio::detail::scoped_lock<boost::asio::detail::posix_mutex > (this=0xb51191a8, lock=...)
at /usr/include/boost/asio/detail/posix_event.hpp:80
#3 0xb7277e33 in boost::asio::detail::task_io_service::do_run_one (
this=0xb83d58e8, lock=..., this_thread=..., private_op_queue=..., ec=...)
at /usr/include/boost/asio/detail/impl/task_io_service.ipp:380
#4 0xb727784b in boost::asio::detail::task_io_service::run (this=0xb83d58e8,
ec=...) at /usr/include/boost/asio/detail/impl/task_io_service.ipp:146
#5 0xb72782c1 in boost::asio::io_service::run (this=0xb83d5340)
at /usr/include/boost/asio/impl/io_service.ipp:59
#6 0xb72e9911 in boost::_mfi::mf0<unsigned int, boost::asio::io_service>::operator() (this=0xb842657c, p=0xb83d5340)
at /usr/include/boost/bind/mem_fn_template.hpp:49
#7 0xb72e7f0a in boost::_bi::list1boost::_bi::value<boost::asio::io_service* >::operator()<unsigned int, boost::_mfi::mf0<unsigned int, boost::asio::io_service>, boost::_bi::list0> (this=0xb8426584, f=..., a=...)
at /usr/include/boost/bind/bind.hpp:243
#8 0xb72e679d in boost::_bi::bind_t<unsigned int, boost::_mfi::mf0<unsigned int, boost::asio::io_service>, boost::bi::list1<boost::bi::value<boost::asio::io---Type to continue, or q to quit---
service
> > >::operator() (this=0xb842657c)
at /usr/include/boost/bind/bind_template.hpp:20
#9 0xb72e4b31 in boost::detail::thread_data<boost::_bi::bind_t<unsigned int, boost::_mfi::mf0<unsigned int, boost::asio::io_service>, boost::_bi::list1<boost::_bi::valueboost::asio::io_service_ > > >::run (this=0xb8426478)
at /usr/include/boost/thread/detail/thread.hpp:62
#10 0xb6f9342c in ?? () from /usr/lib/libboost_thread.so.1.49.0
#11 0xb6c1fc39 in start_thread (arg=0xb5119b70) at pthread_create.c:304
#12 0xb6b8b9fe in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 6 (Thread 0xaf706b70 (LWP 31696)):
#0 0xb702a424 in __kernel_vsyscall ()
#1 0xb6c24733 in pthread_cond_timedwait@@GLIBC_2.3.2 ()
at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_timedwait.S:236
#2 0xb7372570 in boost::condition_variable::timed_wait (this=0xbf8cadf8,
m=..., wait_until=...)
at /usr/include/boost/thread/pthread/condition_variable.hpp:74
#3 0xb6f95a58 in boost::this_thread::sleep(boost::posix_time::ptime const&) ()
from /usr/lib/libboost_thread.so.1.49.0
#4 0xb742f85e in boost::this_thread::sleep<boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000ll> > (rel_time=...)
at /usr/include/boost/thread/pthread/thread_data.hpp:149
---Type to continue, or q to quit---
#5 0xb742db6e in MilliSleep (n=120000) at utiltime.cpp:54
#6 0xb721abaf in ThreadOpenAddedConnections () at net.cpp:1320
#7 0xb722ae48 in TraceThread<void ()()> (name=0xb74ef9bb "addcon",
func=0xb7219453 <ThreadOpenAddedConnections()>) at util.h:214
#8 0xb7265027 in boost::_bi::list2<boost::_bi::value<char const
>, boost::bi::value<void ()()> >::operator()<void ()(char const*, void ()()), boost::_bi::list0> (this=0xbf8cae70,
f=@0xbf8cae6c: 0xb722adca <TraceThread<void (
)()>(char const
, void (_)())>, a=...) at /usr/include/boost/bind/bind.hpp:313
#9 0xb7264b23 in boost::_bi::bind_t<void, void ()(char const, void ()()), boost::_bi::list2<boost::_bi::value<char const>, boost::_bi::value<void ()()> > >::operator() (this=0xbf8cae6c) at /usr/include/boost/bind/bind_template.hpp:20
#10 0xb72644b1 in boost::detail::thread_data<boost::_bi::bind_t<void, void (
)(char const*, void ()()), boost::_bi::list2<boost::_bi::value<char const>, boost::_bi::value<void (*)()> > > >::run (this=0xbf8cad68)
at /usr/include/boost/thread/detail/thread.hpp:62
#11 0xb6f9342c in ?? () from /usr/lib/libboost_thread.so.1.49.0
#12 0xb6c1fc39 in start_thread (arg=0xaf706b70) at pthread_create.c:304
#13 0xb6b8b9fe in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 5 (Thread 0xaff07b70 (LWP 31695)):
#0 0xb702a424 in __kernel_vsyscall ()
#1 0xb6b84d01 in select () at ../sysdeps/unix/syscall-template.S:82
---Type to continue, or q to quit---
#2 0xb7216197 in ThreadSocketHandler () at net.cpp:770
#3 0xb722ae48 in TraceThread<void ()()> (name=0xb74ef34f "net",
func=0xb7215069 <ThreadSocketHandler()>) at util.h:214
#4 0xb7265027 in boost::_bi::list2<boost::_bi::value<char const
>, boost::bi::value<void ()()> >::operator()<void ()(char const*, void ()()), boost::_bi::list0> (this=0xbdd72f60,
f=@0xbdd72f5c: 0xb722adca <TraceThread<void (
)()>(char const
, void (_)())>, a=...) at /usr/include/boost/bind/bind.hpp:313
#5 0xb7264b23 in boost::_bi::bind_t<void, void ()(char const, void ()()), boost::_bi::list2<boost::_bi::value<char const>, boost::_bi::value<void ()()> > >::operator() (this=0xbdd72f5c) at /usr/include/boost/bind/bind_template.hpp:20
#6 0xb72644b1 in boost::detail::thread_data<boost::_bi::bind_t<void, void (
)(char const*, void ()()), boost::_bi::list2<boost::_bi::value<char const>, boost::_bi::value<void (*)()> > > >::run (this=0xbdd72e58)
at /usr/include/boost/thread/detail/thread.hpp:62
#7 0xb6f9342c in ?? () from /usr/lib/libboost_thread.so.1.49.0
#8 0xb6c1fc39 in start_thread (arg=0xaff07b70) at pthread_create.c:304
#9 0xb6b8b9fe in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 4 (Thread 0xb591ab70 (LWP 31658)):
#0 0xb702a424 in __kernel_vsyscall ()
#1 0xb6b8c466 in epoll_wait () at ../sysdeps/unix/syscall-template.S:82
#2 0xb7276709 in boost::asio::detail::epoll_reactor::run (this=0xb83bda80,
---Type to continue, or q to quit---
block=true, ops=...)
at /usr/include/boost/asio/detail/impl/epoll_reactor.ipp:366
#3 0xb7277d5b in boost::asio::detail::task_io_service::do_run_one (
this=0xb83d58e8, lock=..., this_thread=..., private_op_queue=..., ec=...)
at /usr/include/boost/asio/detail/impl/task_io_service.ipp:353
#4 0xb727784b in boost::asio::detail::task_io_service::run (this=0xb83d58e8,
ec=...) at /usr/include/boost/asio/detail/impl/task_io_service.ipp:146
#5 0xb72782c1 in boost::asio::io_service::run (this=0xb83d5340)
at /usr/include/boost/asio/impl/io_service.ipp:59
#6 0xb72e9911 in boost::_mfi::mf0<unsigned int, boost::asio::io_service>::operator() (this=0xb8426464, p=0xb83d5340)
at /usr/include/boost/bind/mem_fn_template.hpp:49
#7 0xb72e7f0a in boost::_bi::list1boost::_bi::value<boost::asio::io_service* >::operator()<unsigned int, boost::_mfi::mf0<unsigned int, boost::asio::io_service>, boost::_bi::list0> (this=0xb842646c, f=..., a=...)
at /usr/include/boost/bind/bind.hpp:243
#8 0xb72e679d in boost::_bi::bind_t<unsigned int, boost::_mfi::mf0<unsigned int, boost::asio::io_service>, boost::_bi::list1boost::_bi::value<boost::asio::io_service* > >::operator() (this=0xb8426464)
at /usr/include/boost/bind/bind_template.hpp:20
#9 0xb72e4b31 in boost::detail::thread_data<boost::_bi::bind_t<unsigned int, boost::_mfi::mf0<unsigned int, boost::asio::io_service>, boost::_bi::list1boost::_bi::value<boost::asio::io_service* > > >::run (this=0xb8426360)
---Type to continue, or q to quit---
at /usr/include/boost/thread/detail/thread.hpp:62
#10 0xb6f9342c in ?? () from /usr/lib/libboost_thread.so.1.49.0
#11 0xb6c1fc39 in start_thread (arg=0xb591ab70) at pthread_create.c:304
#12 0xb6b8b9fe in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 3 (Thread 0xb691cb70 (LWP 31656)):
#0 0xb702a424 in __kernel_vsyscall ()
#1 0xb6c2423a in __pthread_cond_wait (cond=0xb691c1a8, mutex=0xb83d5900)
at pthread_cond_wait.c:153
#2 0xb7281848 in boost::asio::detail::posix_event::waitboost::asio::detail::scoped_lock<boost::asio::detail::posix_mutex > (this=0xb691c1a8, lock=...)
at /usr/include/boost/asio/detail/posix_event.hpp:80
#3 0xb7277e33 in boost::asio::detail::task_io_service::do_run_one (
this=0xb83d58e8, lock=..., this_thread=..., private_op_queue=..., ec=...)
at /usr/include/boost/asio/detail/impl/task_io_service.ipp:380
#4 0xb727784b in boost::asio::detail::task_io_service::run (this=0xb83d58e8,
ec=...) at /usr/include/boost/asio/detail/impl/task_io_service.ipp:146
#5 0xb72782c1 in boost::asio::io_service::run (this=0xb83d5340)
at /usr/include/boost/asio/impl/io_service.ipp:59
#6 0xb72e9911 in boost::_mfi::mf0<unsigned int, boost::asio::io_service>::operator() (this=0xb83c73f4, p=0xb83d5340)
at /usr/include/boost/bind/mem_fn_template.hpp:49
#7 0xb72e7f0a in boost::_bi::list1boost::_bi::value<boost::asio::io_service* ---Type to continue, or q to quit---

::operator()<unsigned int, boost::_mfi::mf0<unsigned int, boost::asio::io_service>, boost::_bi::list0> (this=0xb83c73fc, f=..., a=...)
at /usr/include/boost/bind/bind.hpp:243
#8 0xb72e679d in boost::_bi::bind_t<unsigned int, boost::_mfi::mf0<unsigned int, boost::asio::io_service>, boost::_bi::list1boost::_bi::value<boost::asio::io_service* > >::operator() (this=0xb83c73f4)
at /usr/include/boost/bind/bind_template.hpp:20
#9 0xb72e4b31 in boost::detail::thread_data<boost::_bi::bind_t<unsigned int, boost::_mfi::mf0<unsigned int, boost::asio::io_service>, boost::_bi::list1boost::_bi::value<boost::asio::io_service* > > >::run (this=0xb83c72f0)
at /usr/include/boost/thread/detail/thread.hpp:62
#10 0xb6f9342c in ?? () from /usr/lib/libboost_thread.so.1.49.0
#11 0xb6c1fc39 in start_thread (arg=0xb691cb70) at pthread_create.c:304
#12 0xb6b8b9fe in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 2 (Thread 0xb6a956d0 (LWP 31655)):
#0 0xb702a424 in __kernel_vsyscall ()
#1 0xb6c27b46 in nanosleep () at ../sysdeps/unix/syscall-template.S:82
#2 0xb6f95b6c in boost::this_thread::sleep(boost::posix_time::ptime const&) ()
from /usr/lib/libboost_thread.so.1.49.0
#3 0xb742f85e in boost::this_thread::sleep<boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000ll> > (rel_time=...)
at /usr/include/boost/thread/pthread/thread_data.hpp:149
---Type to continue, or q to quit---
#4 0xb742db6e in MilliSleep (n=200) at utiltime.cpp:54
#5 0xb707e461 in WaitForShutdown (threadGroup=0xbff7b9fc) at bitcoind.cpp:42
#6 0xb707ef0d in AppInit (argc=1, argv=0xbff7bc04) at bitcoind.cpp:161
#7 0xb707f3da in main (argc=1, argv=0xbff7bc04) at bitcoind.cpp:175

Thread 1 (Thread 0xae704b70 (LWP 31698)):
#0 0xb702a424 in __kernel_vsyscall ()
#1 0xb6ade661 in GI_raise (sig=6)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#2 0xb6ae1a92 in *__GI_abort () at abort.c:92
#3 0xb6ad7878 in *__GI___assert_fail (
assertion=0xb758a6d8 "it->second.flags & CCoinsCacheEntry::FRESH",
file=0xb758a6c0 "coins.cpp", line=150,
function=0xb758ada0 "virtual bool CCoinsViewCache::BatchWrite(CCoinsMap&, const uint256&)") at assert.c:81
#4 0xb73d4c8a in CCoinsViewCache::BatchWrite (this=0xb84ec518, mapCoins=...,
hashBlockIn=...) at coins.cpp:150
#5 0xb73d4eb4 in CCoinsViewCache::Flush (this=0xae703438) at coins.cpp:176
#6 0xb710f86e in ConnectTip (state=..., pindexNew=0xb9de2490,
pblock=0xae7033d0) at main.cpp:2088
#7 0xb71109d6 in ActivateBestChainStep (state=..., pindexMostWork=0xb8f40680,
pblock=0x0) at main.cpp:2223
#8 0xb7110d0f in ActivateBestChain (state=..., pblock=0xae703b48)
---Type to continue, or q to quit---
at main.cpp:2276
#9 0xb71149c7 in ProcessNewBlock (state=..., pfrom=0xb1eaff30,
pblock=0xae703b48, dbp=0x0) at main.cpp:2823
#10 0xb711e6e8 in ProcessMessage (pfrom=0xb1eaff30, strCommand=..., vRecv=...,
nTimeReceived=1427349299020461) at main.cpp:4175
#11 0xb7120ae1 in ProcessMessages (pfrom=0xb1eaff30) at main.cpp:4499
#12 0xb71da520 in boost::detail::function::function_invoker1<bool (
)(CNode
), bool, CNode
>::invoke (function_ptr=..., a0=0xb1eaff30)
at /usr/include/boost/function/function_template.hpp:95
#13 0xb7262937 in boost::function1<bool, CNode*>::operator() (this=0xb8426644,
a0=0xb1eaff30) at /usr/include/boost/function/function_template.hpp:760
#14 0xb7261c4b in boost::signals2::detail::signal1_impl<bool, CNode*, boost::signals2::optional_last_value, int, std::less, boost::function<bool (CNode*)>, boost::function<bool (boost::signals2::connection const&, CNode*)>, boost::signals2::mutex>::slot_invoker::m_invoke(boost::shared_ptr<boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost::function<bool (CNode*)> >, boost::signals2::mutex> > const&, ...) const (this=0xae704100,
connectionBody=...)
at /usr/include/boost/signals2/detail/signal_template.hpp:368
#15 0xb7260437 in boost::signals2::detail::signal1_impl<bool, CNode*, boost::signals2::optional_last_value, int, std::less, boost::function<bool (CNode*)>, boost::function<bool (boost::signals2::connection const&, CNode*)>, boost---Type to continue, or q to quit---
::signals2::mutex>::slot_invoker::operator()(boost::shared_ptr<boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost::function<bool (CNode*)> >, boost::signals2::mutex> > const&) const (this=0xae704100,
connectionBody=...)
at /usr/include/boost/signals2/detail/signal_template.hpp:345
#16 0xb725d69d in boost::signals2::detail::slot_call_iterator_t<boost::signals2::detail::signal1_impl<bool, CNode*, boost::signals2::optional_last_value, int, std::less, boost::function<bool (CNode*)>, boost::function<bool (boost::signals2::connection const&, CNode*)>, boost::signals2::mutex>::slot_invoker, std::List_iterator<boost::shared_ptr<boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost::function<bool (CNode*)> >, boost::signals2::mutex> > >, boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost::function<bool (CNode*)> >, boost::signals2::mutex> >::dereference() const (this=0xae703f28)
at /usr/include/boost/signals2/detail/slot_call_iterator.hpp:82
#17 0xb7258d9b in boost::iterator_core_access::dereference<boost::signals2::detail::slot_call_iterator_t<boost::signals2::detail::signal1_impl<bool, CNode*, boost::signals2::optional_last_value, int, std::less, boost::function<bool (CNode*)>, boost::function<bool (boost::signals2::connection const&, CNode*)>, boost::signals2::mutex>::slot_invoker, std::List_iterator<boost::shared_ptr<b---Type to continue, or q to quit---
oost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost::function<bool (CNode*)> >, boost::signals2::mutex> > >, boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost::function<bool (CNode*)> >, boost::signals2::mutex> > >(boost::signals2::detail::slot_call_iterator_t<boost::signals2::detail::signal1_impl<bool, CNode*, boost::signals2::optional_last_value, int, std::less, boost::function<bool (CNode*)>, boost::function<bool (boost::signals2::connection const&, CNode*)>, boost::signals2::mutex>::slot_invoker, std::List_iterator<boost::shared_ptr<boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost::function<bool (CNode*)> >, boost::signals2::mutex> > >, boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost::function<bool (CNode*)> >, boost::signals2::mutex> > const&) (f=...) at /usr/include/boost/iterator/iterator_facade.hpp:517
#18 0xb72534dc in boost::iterator_facade<boost::signals2::detail::slot_call_iterator_t<boost::signals2::detail::signal1_impl<bool, CNode*, boost::signals2::optional_last_value, int, std::less, boost::function<bool (CNode*)>, boost::function<bool (boost::signals2::connection const&, CNode*)>, boost::signals2::mutex>::slot_invoker, std::List_iterator<boost::shared_ptr<boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost::function<bool (CNo---Type to continue, or q to quit---
de
)> >, boost::signals2::mutex> > >, boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode
, boost::function<bool (CNode*)> >, boost::signals2::mutex> >, bool, boost::single_pass_traversal_tag, bool const&, int>::operator
() const (this=0xae703f28)
at /usr/include/boost/iterator/iterator_facade.hpp:643
#19 0xb724b840 in boost::signals2::optional_last_value::operator()<boost::signals2::detail::slot_call_iterator_t<boost::signals2::detail::signal1_impl<bool, CNode, boost::signals2::optional_last_value, int, std::less, boost::function<bool (CNode*)>, boost::function<bool (boost::signals2::connection const&, CNode*)>, boost::signals2::mutex>::slot_invoker, std::List_iterator<boost::shared_ptr<boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost::function<bool (CNode*)> >, boost::signals2::mutex> > >, boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost::function<bool (CNode*)> >, boost::signals2::mutex> > >(boost::signals2::detail::slot_call_iterator_t<boost::signals2::detail::signal1_impl<bool, CNode*, boost::signals2::optional_last_value, int, std::less, boost::function<bool (CNode*)>, boost::function<bool (boost::signals2::connection const&, CNode*)>, boost::signals2::mutex>::slot_invoker, std::List_iterator<boost::shared_ptr<boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost::function<bool---Type to continue, or q to quit---
(CNode
)> >, boost::signals2::mutex> > >, boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode
, boost::function<bool (CNode*)> >, boost::signals2::mutex> >, boost::signals2::detail::slot_call_iterator_t<boost::signals2::detail::signal1_impl<bool, CNode*, boost::signals2::optional_last_value, int, std::less, boost::function<bool (CNode*)>, boost::function<bool (boost::signals2::connection const&, CNode*)>, boost::signals2::mutex>::slot_invoker, std::List_iterator<boost::shared_ptr<boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost::function<bool (CNode*)> >, boost::signals2::mutex> > >, boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost::function<bool (CNode*)> >, boost::signals2::mutex> >) const (
this=0xb83bb0c8, first=..., last=...)
at /usr/include/boost/signals2/optional_last_value.hpp:34
#20 0xb72413d3 in boost::signals2::detail::combiner_invokerboost::optional::operator()boost::signals2::optional_last_value<bool, boost::signals2::detail::slot_call_iterator_t<boost::signals2::detail::signal1_impl<bool, CNode*, boost::signals2::optional_last_value, int, std::less, boost::function<bool (CNode*)>, boost::function<bool (boost::signals2::connection const&, CNode*)>, boost::signals2::mutex>::slot_invoker, std::List_iterator<boost::shared_ptr<boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost:---Type to continue, or q to quit---
:function<bool (CNode*)> >, boost::signals2::mutex> > >, boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost::function<bool (CNode*)> >, boost::signals2::mutex> > >(boost::signals2::optional_last_value&, boost::signals2::detail::slot_call_iterator_t<boost::signals2::detail::signal1_impl<bool, CNode*, boost::signals2::optional_last_value, int, std::less, boost::function<bool (CNode*)>, boost::function<bool (boost::signals2::connection const&, CNode*)>, boost::signals2::mutex>::slot_invoker, std::List_iterator<boost::shared_ptr<boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost::function<bool (CNode*)> >, boost::signals2::mutex> > >, boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost::function<bool (CNode*)> >, boost::signals2::mutex> >, boost::signals2::detail::slot_call_iterator_t<boost::signals2::detail::signal1_impl<bool, CNode*, boost::signals2::optional_last_value, int, std::less, boost::function<bool (CNode*)>, boost::function<bool (boost::signals2::connection const&, CNode*)>, boost::signals2::mutex>::slot_invoker, std::List_iterator<boost::shared_ptr<boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost::function<bool (CNode*)> >, boost::signals2::mutex> > >, boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost::function<bool (CNode*)> >, boost---Type to continue, or q to quit---
::signals2::mutex> >) const (this=0xae70402b, combiner=..., first=...,
last=...) at /usr/include/boost/signals2/detail/result_type_wrapper.hpp:53
#21 0xb7235f23 in boost::signals2::detail::signal1_impl<bool, CNode*, boost::signals2::optional_last_value, int, std::less, boost::function<bool (CNode*)>, boost::function<bool (boost::signals2::connection const&, CNode*)>, boost::signals2::mutex>::operator()(CNode
) (this=0xb83bb048, arg1=0xb1eaff30)
at /usr/include/boost/signals2/detail/signal_template.hpp:246
#22 0xb722abdd in boost::signals2::signal1<bool, CNode
, boost::signals2::optional_last_value, int, std::less, boost::function<bool (CNode*)>, boost::function<bool (boost::signals2::connection const&, CNode*)>, boost::signals2::mutex>::operator()(CNode
) (this=0xb774230c, arg1=0xb1eaff30)
at /usr/include/boost/signals2/detail/signal_template.hpp:695
#23 0xb721b505 in ThreadMessageHandler () at net.cpp:1385
#24 0xb722ae48 in TraceThread<void ()()> (name=0xb74ef9ca "msghand",
func=0xb721b025 <ThreadMessageHandler()>) at util.h:214
#25 0xb7265027 in boost::_bi::list2<boost::bi::value<char const*>, boost::bi::value<void ()()> >::operator()<void ()(char const*, void ()()), boost::_bi::list0> (this=0xb211ce30,
f=@0xb211ce2c: 0xb722adca <TraceThread<void (
)()>(char const
, void (
)())>, a=...) at /usr/include/boost/bind/bind.hpp:313
#26 0xb7264b23 in boost::_bi::bind_t<void, void ()(char const, void ()()), boost::_bi::list2<boost::_bi::value<char const>, boost::_bi::value<void ()()> > >::operator() (this=0xb211ce2c) at /usr/include/boost/bind/bind_template.hpp:20
---Type to continue, or q to quit---
#27 0xb72644b1 in boost::detail::thread_data<boost::_bi::bind_t<void, void (
)(char const*, void ()()), boost::_bi::list2<boost::_bi::value<char const>, boost::_bi::value<void (*)()> > > >::run (this=0xb211cd28)
at /usr/include/boost/thread/detail/thread.hpp:62
#28 0xb6f9342c in ?? () from /usr/lib/libboost_thread.so.1.49.0
#29 0xb6c1fc39 in start_thread (arg=0xae704b70) at pthread_create.c:304
#30 0xb6b8b9fe in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

@morcos
Copy link
Member

morcos commented Mar 26, 2015

Thanks a lot for your debugging help. I think we found the problem. If we prune inside ConnectBlock (as undo files allocate more space) then we flush pcoinsTip, which breaks the assumptions made inside flushing the child cache after ConnectBlock is finished. Will work on a solution.

// would cause Autoprune to overstate disk usage (see related
// comment in FindBlockPos).
Autoprune(nNewChunks * UNDOFILE_CHUNK_SIZE - vinfoBlockFile[nFile].nUndoSize);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the meantime, you could try commenting out this call to Autoprune. It should still keep you very close to the target and ought to fix the problem.

@rustyrussell
Copy link
Contributor

Thanks, have commented that out and re-running now.

@jonasschnelli
Copy link
Contributor

20mins leaks detecting during fresh datadir catchup showed no issues. Memory behavior as expected.
bildschirmfoto 2015-04-17 um 14 43 11

@morcos
Copy link
Member

morcos commented Apr 17, 2015

@jonasschnelli , re: pruning.py failing. Were you running it on a decently equipped machine? What happens is the reorg's are so large that they take a long time, and then the rpc calls (such as to getblocks() in this case) time out. I increased the timeout from 30s to 5min, which gave some buffer on my machine, but perhaps that wasn't enough for general usage. If you wouldn't mind trying increasing that timewait variable a little bigger and seeing if it completes, it might take a very long time though. I would say the test is so cumbersome its of questionable value, except we've found it quite useful in recent weeks to test unrelated behavior because it stresses the nodes so much.

The test will have to be modified anyway if #5943 gets merged, which could make at least the reorgs faster.

@jonasschnelli
Copy link
Contributor

@morcos The machine should be sufficient: Intel Xeon E31245 3.30GHz, 16GB RAM.
I now increased timewait from 300 to 1000 and started again. Will report.

@jonasschnelli
Copy link
Contributor

@morcos: prune.py test still fails: https://gist.github.com/jonasschnelli/03afc81383ec537eb4d2

@jonasschnelli
Copy link
Contributor

@morcos: after changing timewaitto 3000 the prune.py test ran successfully (https://gist.github.com/jonasschnelli/90ac6516780607011b26). Took ~1h36'.

My fullnode with autoprune mode is running smooth sind 2.5days.
Nice work. Hopefully this gets merged soon!
Tested ACK.

@sipa
Copy link
Member

sipa commented Apr 19, 2015

Concept ACK. Code review ACK. Only lightly tested, sorry.

@sdaftuar
Copy link
Member Author

This needed to be rebased, so I did so and updated the pull. I also added a commit to try to reduce surprise in the event that someone uses -reindex and -prune at the same time: now, we only will delete all the block files if block file 0 is missing: in that case, we know that reindex will not find the files anyway, so there is no harm in deleting them (and this way a pruning node isn't tying up space used by old, inaccessible files).

@sipa
Copy link
Member

sipa commented Apr 22, 2015

Ok, I've run out of nits (see above). I think this is safe to merge - especially in case pruning itself is not enabled.

@sdaftuar
Copy link
Member Author

@sipa Thanks for all the review, I've gone ahead and fixed those nits and squashed everything back down to one commit.

This adds a -prune=N option to bitcoind, which if set to N>0 will enable block
file pruning. When pruning is enabled, block and undo files will be deleted to
try to keep total space used by those files to below the prune target (N, in
MB) specified by the user, subject to some constraints:

- The last 288 blocks on the main chain are always kept (MIN_BLOCKS_TO_KEEP),
- N must be at least 550MB (chosen as a value for the target that could
  reasonably be met, with some assumptions about block sizes, orphan rates,
  etc; see comment in main.h),
- No blocks are pruned until chainActive is at least 100,000 blocks long (on
  mainnet; defined separately for mainnet, testnet, and regtest in chainparams
  as nPruneAfterHeight).

This unsets NODE_NETWORK if pruning is enabled.

Also included is an RPC test for pruning (pruning.py).

Thanks to @rdponticelli for earlier work on this feature; this is based in
part off that work.
return;
}

unsigned int nLastBlockWeMustKeep = chainActive.Tip()->nHeight - MIN_BLOCKS_TO_KEEP;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This variable name is slightly confusing. It's the last height that's allowed to be pruned (the test below using it is correct).

@sipa
Copy link
Member

sipa commented Apr 22, 2015

ACK

@laanwj
Copy link
Member

laanwj commented Apr 24, 2015

Works for me - did full testnet and mainnet sync, which succeeded, and disk usage remained within the configured bound. Also tried various RPCs on a pruned node and was unable to crash it.

Tested ACK.

@laanwj laanwj merged commit f9ec3f0 into bitcoin:master Apr 24, 2015
laanwj added a commit that referenced this pull request Apr 24, 2015
f9ec3f0 Add block pruning functionality (mrbandrews)
@gavinandresen
Copy link
Contributor

Post-pull ACK; copied my -txindex=1 main net datadir, ran pruned (it told me I had to -reindex, as expected), running pruned nicely on my Mac.

@cozz
Copy link
Contributor

cozz commented Apr 24, 2015

I have a question:
Not relaying blocks sounds really bad, couldnt we still announce it, if you know that the other guy has at least all blocks until our prune-threshold?

@sipa
Copy link
Member

sipa commented Apr 24, 2015 via email

@dacox
Copy link

dacox commented May 12, 2015

I have a question also:

Does the -prune=N option work from a cold start, or does it require a full sync first?

I recently installed bitcoind on a 40GB droplet with -prune=30000 and it keeps running out of disk space.

I have tried with the prune option as a cli argument to bitcoind, and also as an option in the config file.

Cheers

@laanwj
Copy link
Member

laanwj commented May 12, 2015

@dacox That should work. -prune=N means it will only retain the last N MB of blocks during a full sync. This size does not include the UTXO database, block index, wallet and miscellaneous files so keep some margin. But 30000 MB on a 40000 MB medium should work.
What version of bitcoin core are you using? Is -prune shown in the -help output?

@dacox
Copy link

dacox commented May 12, 2015

According to bitcoind -help it's Bitcoin Core Daemon version v0.10.1.0-gd8ac901

I grabbed it from the PPA, and I saw that this PR was merged in before the release was tagged.

However, I do not see a reference to -prune in the help output

Edit: I see the problem, the 0.10 branch was branched off of master quite some time before this PR. For some reason I thought it was in 0.10

@wtogami
Copy link
Contributor

wtogami commented May 14, 2015

RPC/REST interfaces currently do not distinguish between unknown blocks/tx and pruned blocks/tx.
It's unclear if a specific error should be returned, or perhaps the block/tx query interfaces be disabled
for pruned nodes.

Could this be improved by keeping the headers of pruned blocks and somehow marking those blocks as pruned? That would allow distinguishing the difference between pruned and unknown blocks.

@jonasschnelli
Copy link
Contributor

@wtogami: I think this is okay now. Check #6058

@sdaftuar sdaftuar mentioned this pull request May 14, 2015
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet