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

node insight.js ... Aborted (core dumped) #54

Closed
jcalfee opened this issue Apr 23, 2014 · 8 comments
Closed

node insight.js ... Aborted (core dumped) #54

jcalfee opened this issue Apr 23, 2014 · 8 comments

Comments

@jcalfee
Copy link

jcalfee commented Apr 23, 2014

This is my first time trying to run insight-api in ubuntu 14.04 under node v0.10.22. Has anyone seen this?

$ node insight.js
node: ../deps/leveldb/leveldb-1.14.0/db/version_set.cc:772: void leveldb::VersionSet::Builder::MaybeAddFile(leveldb::Version_, int, leveldb::FileMetaData_): Assertion `vset_->icmp_.Compare((*files)[files->size()-1]->largest, f->smallest) < 0' failed.
Aborted (core dumped)

This is my environment:
nvm install 0.10; nvm use 0.10
git clone https://github.com/bitpay/insight-api.git && cd insight-api
npm install # -> http://pastebin.com/7npxWXVt

here is a comment in the code before line 772:
// Must not overlap
assert(vset_->icmp_.Compare((*files)[files->size()-1]->largest,
f->smallest) < 0);

@jcalfee
Copy link
Author

jcalfee commented Apr 23, 2014

Here is the fix:
rm -r ../.insight/testnet/*

This could cause some down time on the livenet...

@matiu
Copy link
Collaborator

matiu commented Apr 24, 2014

thanks for sharing.

@matiu matiu closed this as completed Apr 24, 2014
@jcalfee
Copy link
Author

jcalfee commented Apr 24, 2014

Is there any way to handle leveldb updates better in such a way that this can't happen? I don't have experience with this but I read that updates are atomic. Should they have something like autocommit off and a commit added?

@matiu
Copy link
Collaborator

matiu commented Apr 24, 2014

No sure why it happened in the first place, never saw that error. If you
could reproduce it and details the steps for reproduce it we could try to
solve it.

On Thu, Apr 24, 2014 at 10:03 AM, James Calfee notifications@github.comwrote:

Is there any way to handle leveldb updates better in such a way that this
can't happen? I don't have experience with this but I read that updates are
atomic. Should they have something like autocommit off and a commit added?


Reply to this email directly or view it on GitHubhttps://github.com//issues/54#issuecomment-41276876
.

Matías Alejo Garcia
Skype/Twitter: @EMATIU
Roads? Where we're going, we don't need roads!

@jcalfee
Copy link
Author

jcalfee commented Apr 24, 2014

Are atomic updates the default? It was likely caused by a Ctrl+C while the initial block chain sync was occurring.

@matiu
Copy link
Collaborator

matiu commented Apr 26, 2014

They should be in level db. Even in batch updates:

https://code.google.com/p/leveldb/

On Thu, Apr 24, 2014 at 12:41 PM, James Calfee notifications@github.comwrote:

Are atomic updates the default? It was likely caused by a Ctrl+C while the
initial block chain sync was occurring.


Reply to this email directly or view it on GitHubhttps://github.com//issues/54#issuecomment-41295383
.

Matías Alejo Garcia
Skype/Twitter: @EMATIU
Roads? Where we're going, we don't need roads!

@jcalfee
Copy link
Author

jcalfee commented Apr 27, 2014

Thanks for the link. That is what I was looking at.

As I become familiar with the LevelDB API I will do a quick scan to see if any extra API calls are involved in making this work especially in regard to multiple level DB databases. That would perhaps save a lot of code like error detection and error correction code I am seeing. I'm sure you are probably doing just this.

Thanks for Insight! I'm enjoying the code. I'll let you know if I find anything.

@matiu
Copy link
Collaborator

matiu commented Apr 27, 2014

awesome, thanks!

On Sun, Apr 27, 2014 at 8:54 AM, James Calfee notifications@github.comwrote:

Thanks for the link. That is what I was looking at.

As I become familiar with the LevelDB API I will do a quick scan to see if
any extra API calls are involved in making this work especially in regard
to multiple level DB databases. That would perhaps save a lot of code like
error detection and error correction code I am seeing. I'm sure you are
probably doing just this.

Thanks for Insight! I'm enjoying the code. I'll let you know if I find
anything.


Reply to this email directly or view it on GitHubhttps://github.com//issues/54#issuecomment-41494615
.

Matías Alejo Garcia
Skype/Twitter: @EMATIU
Roads? Where we're going, we don't need roads!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants