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

Comments

Projects
None yet
7 participants
@cpunks

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

This comment has been minimized.

Show comment
Hide comment
@sipa

sipa Apr 23, 2013

Member

Are you mining?

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

Member

sipa commented Apr 23, 2013

Are you mining?

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

@cpunks

This comment has been minimized.

Show comment
Hide comment
@cpunks

cpunks 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).

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

This comment has been minimized.

Show comment
Hide comment
@sipa

sipa Apr 24, 2013

Member

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

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

This comment has been minimized.

Show comment
Hide comment
@cpunks

cpunks 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".

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

This comment has been minimized.

Show comment
Hide comment
@sipa

sipa Apr 24, 2013

Member

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.

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

This comment has been minimized.

Show comment
Hide comment
@cpunks

cpunks 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 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

This comment has been minimized.

Show comment
Hide comment
@cpunks

cpunks 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.

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

This comment has been minimized.

Show comment
Hide comment
@bitcoinstarter

bitcoinstarter May 1, 2013

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

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

@Diapolo

This comment has been minimized.

Show comment
Hide comment
@Diapolo

Diapolo 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...

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

This comment has been minimized.

Show comment
Hide comment
@bitcoinstarter

bitcoinstarter May 4, 2013

@gavinandresen

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

thanks

@gavinandresen

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

thanks

@gavinandresen

This comment has been minimized.

Show comment
Hide comment
@gavinandresen

gavinandresen May 7, 2013

Contributor

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

Contributor

gavinandresen commented May 7, 2013

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

@sipa

This comment has been minimized.

Show comment
Hide comment
@sipa

sipa May 7, 2013

Member

@gavinandresen That's very unlikely on Windows.

Member

sipa commented May 7, 2013

@gavinandresen That's very unlikely on Windows.

@sipa

This comment has been minimized.

Show comment
Hide comment
@sipa

sipa May 8, 2013

Member

@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?

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

This comment has been minimized.

Show comment
Hide comment
@bitcoinstarter

bitcoinstarter May 9, 2013

@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

@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

This comment has been minimized.

Show comment
Hide comment
@bitcoinstarter

bitcoinstarter May 9, 2013

@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 @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

This comment has been minimized.

Show comment
Hide comment
@sipa

sipa May 9, 2013

Member

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.

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

This comment has been minimized.

Show comment
Hide comment
@bitcoinstarter

bitcoinstarter May 10, 2013

@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?

@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

This comment has been minimized.

Show comment
Hide comment
@bitcoinstarter

bitcoinstarter May 10, 2013

@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 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

This comment has been minimized.

Show comment
Hide comment
@sipa

sipa May 12, 2013

Member

Did you ever play with testnet before?

Member

sipa commented May 12, 2013

Did you ever play with testnet before?

@laanwj

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj Jan 17, 2014

Member

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

Member

laanwj commented Jan 17, 2014

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

@laanwj laanwj closed this Jan 17, 2014

@partsoven

This comment has been minimized.

Show comment
Hide comment
@partsoven

partsoven Oct 11, 2016

-reindex worked for me!

-reindex worked for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment