-
Notifications
You must be signed in to change notification settings - Fork 38.7k
qa: Remove race between connecting and shutdown on separate connections #14958
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
410ce75 to
406204f
Compare
406204f to
e2b0fec
Compare
b3f27ea to
eeb8e04
Compare
eeb8e04 to
9be0dce
Compare
a0ac154 doc: Add getrpcinfo release notes (João Barbosa) 251a91c qa: Add tests for getrpcinfo (João Barbosa) d0730f5 rpc: Add getrpcinfo command (João Barbosa) 068a8fc rpc: Track active commands (João Barbosa) bf43832 rpc: Remove unused PreCommand signal (João Barbosa) Pull request description: The new `getrpcinfo` command exposes details of the RPC interface. The details can be configuration properties or runtime values/stats. This can be particular useful to coordinate concurrent functional tests (see #14958 from where this was extracted). Tree-SHA512: 7292cb6087f4c429973d991aa2b53ffa1327d5a213df7d6ba5fc69b01b2e1a411f6d1609fed9234896293317dab05f65064da48b8f2b4a998eba532591d31882
9be0dce to
49a79d4
Compare
test/functional/feature_shutdown.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.
Is this required given that we wait anyway until node.waitfornewblock is called, which in turn should set up the connection?
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.
For the test to pass this is not required, but this is here to note that there's still a race after connection establishment. Let me know if it's not important.
|
utACK 49a79d454284df7758f83ccd3121afb3e6799342 |
49a79d4 to
4412a59
Compare
|
utACK 4412a59 |
…rate connections 4412a59 qa: Remove race between connecting and shutdown on separate connections (João Barbosa) Pull request description: Fixes the error #14670 (comment) reported by @ken2812221. There is a race between RPC stop and another concurrent call in the test framework. The connection must be established and the command `waitfornewblock` running before calling `stop`. See also #14670 (comment). Tree-SHA512: 77feb8628d3b9c025ec0cf83565d4d6680cad4fb182fc93a65df8b573f3e799ba4c44e06d9001dd8a375ca0b1ee17f10e66c3902b6256d0ae2acbc64539185d7
Ignore disconnects when stopping node - fixes #367 This is a port of bitcoin/bitcoin#14670 This problem is related to the "stop" RPC call. It turns out that sometimes the node stops before it sends the response. That causes the client to retry the call and lead to "ConnectionRefusedError". I found out that there is a fix in bitcoin repo (in master branch, actually), related to this bug. In the nutshell, this changes removes forced exit of libevent loop, which allows to process all the requests gracefully. Test feature_shutdown.py wasn't ported because it introduces a bug bitcoin/bitcoin#14670 (comment) The "improvement" bitcoin/bitcoin#14958 requires RPC method "getrpcinfo" which isn't ported from the bitcoin codebase yet. There are other floating tests with a similar error (ConnectionRefusedError): fixes #373 fixes #484 fixes #544 Signed-off-by: Dmitry Saveliev <[email protected]>
…on separate connections 4412a59 qa: Remove race between connecting and shutdown on separate connections (João Barbosa) Pull request description: Fixes the error bitcoin#14670 (comment) reported by @ken2812221. There is a race between RPC stop and another concurrent call in the test framework. The connection must be established and the command `waitfornewblock` running before calling `stop`. See also bitcoin#14670 (comment). Tree-SHA512: 77feb8628d3b9c025ec0cf83565d4d6680cad4fb182fc93a65df8b573f3e799ba4c44e06d9001dd8a375ca0b1ee17f10e66c3902b6256d0ae2acbc64539185d7
…on separate connections 4412a59 qa: Remove race between connecting and shutdown on separate connections (João Barbosa) Pull request description: Fixes the error bitcoin#14670 (comment) reported by @ken2812221. There is a race between RPC stop and another concurrent call in the test framework. The connection must be established and the command `waitfornewblock` running before calling `stop`. See also bitcoin#14670 (comment). Tree-SHA512: 77feb8628d3b9c025ec0cf83565d4d6680cad4fb182fc93a65df8b573f3e799ba4c44e06d9001dd8a375ca0b1ee17f10e66c3902b6256d0ae2acbc64539185d7
Fixes the error #14670 (comment) reported by @ken2812221.
There is a race between RPC stop and another concurrent call in the test framework. The connection must be established and the command
waitfornewblockrunning before callingstop.See also #14670 (comment).