-
Notifications
You must be signed in to change notification settings - Fork 990
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
API thread poor performance getting (old) block data #3483
Comments
Note that this thread being stuck prevents shutdown from completing. |
This seems weird to me -
|
Thats just the debugger trying to find the source code for the stack trace. If it was there the debugger could show the code for that line in the stack. |
Note: Im no longer convinced that the node "hangs" forever. I think it may just be very very slow. I will confirm. Note also: I turned up the log messages and I see thousands of messages with this warning (I believe) related to the hang/slowness issue: |
We tracked this down to the code that generates (optional) Merkle proofs for unspent coinbase outputs in these early blocks. Edit: Still not entirely sure why its this slow though. For a single block, even with an expensive rewind it should only take ms, maybe a few seconds at most. Maybe something else is going on here as well. |
This is a |
v2 api shows the same issue.
|
Describe the bug
API thread has very poor performance fetching some (old) block data. It can take up to several hours for the call to return. In this time the API thread is busy and also it looks like receiving block data over p2p is stopped.
To Reproduce
curl -ugrin:<secret> localhost:3413/v1/blocks/29
The query is against an archive node.
Blocks before and after this work fine.
More than one block causes this issue (its hard to test because a node restart is needed to try again)
Relevant Information
No error messages in the node log or on the screen.
Hundreds of thousands of these warning messages:
The text was updated successfully, but these errors were encountered: