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

Bitcoin-Qt suddenly stopped with "assertion failed" #2547

Closed
cpunks opened this issue Apr 22, 2013 · 21 comments
Closed

Bitcoin-Qt suddenly stopped with "assertion failed" #2547

cpunks opened this issue Apr 22, 2013 · 21 comments

Comments

@cpunks
Copy link

cpunks commented Apr 22, 2013

Bitcoin version 0.8.1-beta
Qt version 4.8.3

Screenshot:

http://www.freeimagehosting.nl/pics/44408cb76129be8e0813ed1286be3f86.png

Background:

I have used this Bitcoin client for a while. The configuration was initialized under Windows XP, and later on transferred to a Windows 7 machine. It has worked for several months swithout any notable problems -- with the only exception of it sometimes not including a "mined" transaction into my free balance immediately as it matures (instead it needs to be restarted).

Today, about 4 hours after receiving a "mined" transaction, it then crashed telling:

Assertion failed!
File: src/main.cpp
Line: 1127
Expression: pindexFirst

After restarting, it appears to have recovered fully.

@sipa
Copy link
Member

sipa commented Apr 23, 2013

Are you mining?

EDIT: I mean solo-mining (or p2pool), against Bitcoin-qt?

@cpunks
Copy link
Author

cpunks commented Apr 24, 2013

Nope, not against my local bitcoin-qt -- a different machine is mining against a pool, local client just receives the resulting bitcoins (they appear as "mined" transactions since Eligius does it that way).

@sipa
Copy link
Member

sipa commented Apr 24, 2013

For the record: @gmaxwell noticed yesterday that this can only be cause by the retargetting code. That should narrow down the problem a lot.

@cpunks
Copy link
Author

cpunks commented Apr 24, 2013

Would retargeting code only run on an instance of Bitcoin intended for mining?

In that case, I have to clarify: I have in the past, used this Bitcoin instance for mining too, and now that I checked, as a historic leftover, "rpcuser" and "rpcpassword" are still set in "bitcoin.conf".

@sipa
Copy link
Member

sipa commented Apr 24, 2013

Sorry for the confusion. It is unrelated to mining - I asked that question before it was discovered that this assertion failure is caused by the retargetting code. I just added it here so we don't forget.

@cpunks
Copy link
Author

cpunks commented Apr 24, 2013

However, to further clarify, I am not starting it with a "-server" command line option, so anything that results from that code path, should be excluded.

@cpunks
Copy link
Author

cpunks commented Apr 24, 2013

Aha, thanks. If you have any additional questions, just ask. I'll check back about once a day, even if the problem is not disturbing my activities in any manner.

@bitcoinstarter
Copy link

@sipa any workaround/fix regarding this problem? I too have this issue for more than 2 weeks now.
assertion_failed

@Diapolo
Copy link

Diapolo commented May 2, 2013

The part of the code which triggers your problem is (in GetNextWorkRequired()):

    // Go back by what we want to be 14 days worth of blocks
    const CBlockIndex* pindexFirst = pindexLast;
    for (int i = 0; pindexFirst && i < nInterval-1; i++)
        pindexFirst = pindexFirst->pprev;
    assert(pindexFirst);

But this needs to be looked at by a core dev...

@bitcoinstarter
Copy link

@gavinandresen

Can you please take a look the problem stated by @Diapolo above?

thanks

@gavinandresen
Copy link
Contributor

Duplicate; hopefully fixed by the "don't use too many file descriptors" fix.

@sipa
Copy link
Member

sipa commented May 7, 2013

@gavinandresen That's very unlikely on Windows.

@sipa
Copy link
Member

sipa commented May 8, 2013

@bitcoinstarter You have this problem for more than two weeks now. Does that mean that you fix it, and it re-appears, or after it happened the first time, it just doesn't go away?

@bitcoinstarter
Copy link

@sipa @gavinandresen Im still having issues. The problem still persist and I cannot finish synchronizing because of the issue. Below is the latest screenshot of my wallet showing the error.

still problem

@bitcoinstarter
Copy link

@sipa @gavinandresen no matter what button I choose from the error above, bitcoin-qt.exe has stopped working. This is my problem since I started downloading the client for more than 2 weeks now and I keep having this problem no matter how many times I have re-download the client whether I using the install version or the zip version. same issues.

not responding

btw, I using windows 7 Ultimate with 4GB RAM (just for reference).

@sipa
Copy link
Member

sipa commented May 9, 2013

Is this an error that appears immediately at startup, every time? If so, start with -reindex on the command line, once. That will rebuild the database from scratch.

@bitcoinstarter
Copy link

@sipa Yes, that is an error after I fire up the exe. the error appears after a few minutes of initialization.

btw, how do I start wit -reindex on the command line?

Is there a command line version for the wallet? or are you referring to the Windows CMD prompt?

@bitcoinstarter
Copy link

@sipa Ok I think youre referring to the Windows CMD prompt so Im giving it a shot. Hope it works and will let you know :)

reindex

@sipa
Copy link
Member

sipa commented May 12, 2013

Did you ever play with testnet before?

@laanwj
Copy link
Member

laanwj commented Jan 17, 2014

User hasn't reported back after 8 months, likely the -reindex solved the problem.

@laanwj laanwj closed this as completed Jan 17, 2014
@partsoven
Copy link

-reindex worked for me!

@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.
Projects
None yet
Development

No branches or pull requests

7 participants