-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Seemingly fix walletbackup.py failure #8051
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
Conversation
|
Sense, this makes none: replacing the sync_blocks call with a sleep does not fix it (even when the sleep is longer than how long the sync takes). |
30s is not enough. An importwallet test case can take up to about 40s my test machine. Fixes bitcoin#8051.
|
@MarcoFalke I think the unable to bind is just because i failed to kill the bitcoind from a previous test |
|
Switched to @sdaftuar's solution |
qa/rpc-tests/walletbackup.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-rpcservertimeout=90 is now set twice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
|
I don't understand why a server timeout appears to solve this. What the server timeout does (or is supposed to do, at least) is time out client sessions that are not making a request. They are in the state either before sending a request (or between request or keep-alive), or pausing too long during sending a request (slowloris). The server should never time out while it is processing a request, no matter how long it takes. If that does happen, that is really really bad. This logic is unfortunately implemented in libevent so not easily accessible to us either. What is your version of libevent? |
|
What might happen is that the client hasn't sent a request for a while to the server and thus the server closes the keepalive connection. Python's http doesn't detect this properly and raises an error. I vaguely remember issues with this before. However according to this is supposed to be fixed in Python 3.5. But it looks like you're using that. |
|
Ahh so now we get a I think we should catch that and repeat the request with a new connection if we do, analogous to the |
|
Can one of the admins verify this patch? |
|
@laanwj Thanks, that fixes it. Rebased and updated to retry on BrokenPipeError as well as BadStatusLine. |
|
Also, would be interesting to know why on some systems |
|
To be more clear: If there is an issue with If the goal of this pull is to instead fix a bug in |
|
Reopening as a new PR in that case. |
Looks like it fixes #8045.
I cannot explain the failure (it happens 100% reproducibly for me, with a clean cache and no other bitcoind running, even when running outside of rpc-tests.py):
I also can't explain why Travis doesn't have this problem. I certainly can't explain why this patch fixes it or even remotely has anything to do with the observed problem, but it fixes it 100% reproducibly.