DaemonManager: prevent GUI from hanging on hanging monerod launch#4244
Open
hinto-janai wants to merge 1 commit into
Open
DaemonManager: prevent GUI from hanging on hanging monerod launch#4244hinto-janai wants to merge 1 commit into
monerod launch#4244hinto-janai wants to merge 1 commit into
Conversation
Contributor
|
could you help me reproduce the issue? i had first tried to bind a monero-wallet-rpc client to the same port the 'launched by monero-gui' monerod would attempt to use for its --zmq-port, but i noticed the 120 second timeout |
Author
120.mp4 |
Contributor
i still see the failed to start after 120 seconds, but im half certain i experienced a loop longer than 120 , strange (would this be me encountering the 3 min 30 second timeout?) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4240
Problem 1
monerodhangs on this line when creating an http connection (for localjson-rpc):https://github.com/monero-project/monero/blob/ac02af92867590ca80b2779a7bbeafa99ff94dcb/src/common/rpc_client.h#L125
using the generic 3 minutes and 30 seconds connection timeout:
https://github.com/monero-project/monero/blob/ac02af92867590ca80b2779a7bbeafa99ff94dcb/src/common/http_connection.h#L42-L45
This causes direct
json-rpcinvocation (./monerod sync_info) to hang for 3m30s before exiting ifmonerodcan't bind.Problem 2
Monero GUI relies on direct
json-rpcinvocation to tell ifmonerodis "running":monero-gui/src/daemon/DaemonManager.cpp
Lines 239 to 245 in e9cd458
This causes the GUI to hang and the
Watcheris not quite in sync so it'll hang (in 3m30s chunks) until the 2 miraculously sync up.Change
When launching
monerod, launch it with a timeout of5 secondsbefore assuming something has gone wrong and returnfalse, as in we failed to launch.This lowers the "is monerod running?" poll-rate to every 5 seconds which makes the error screen surface around the
120smark as intended.