-
Notifications
You must be signed in to change notification settings - Fork 766
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
Closing GUI After Wallet Open for a While Results in Infinite Loading Animation #3840
Comments
Just to confirm, is your wallet fully synced? |
Yes, you can see the blurry two orange bars. |
So pressing the X button works, but pressing the close button in Settings doesn't? |
Yes, but note that the decorations are off. With decorations enabled, both closing the wallet and closing the GUI result in infinite loops. |
Thanks, that might give me a tip on where to look. |
Can you go to the main menu, then click on "Change wallet mode" and then enable the portable mode checkbox. Afterwards can you check if you still have issues with closing getting stuck? |
Issue still occurs even in portable mode |
@elibroftw : Does this also happen on an external node, or only local? |
From what others have reported, local or remote node doesn't matter. Happens with both. |
So far I couldn't reproduce it in neither Win7 under a VM, nor native Win10. From my prior experience with GUIs, such symptoms result from threads in a deadlock. To continue on this issue, I will simply focus on examining how the threads are being destroyed upon exit and simulate failures there. In fact, during creation of my autogenerated reports I experienced such deadlocks as well. @elibroftw : May I know your network speed in Mb/s? I'm trying to find clues. |
50 down 10 up |
@devhyper did you ever run into this issue on Windows? |
I don't think I experienced this, but I'll check again later today. |
Thanks! Having the GUI open for a while helps with reproducing. |
I have same issue happening on Debian in Virtual machine. GUI didn't want to cooperate displaying Closing wallet after trying to close the GUI with X, after stopping monerod it changed to "Checking local node status" Since I couldn't restart that Virtual machine I've moved it to another Desktop and it's still spinning around Monero logo for 3 days. It does not impact working of monerod and using that wallet from monero-cli / monero-rpc. |
@MajesticBank still stuck at "Checking local node status"? Might be a different thing then. |
Yes, it just hang on that "Checking local node status" and like every 30-45 seconds I see spike of cpu usage on that GUI process. Not sure how reproducible it might be |
Sorry for the delay, I was away this weekend and completely forgot. I was able to reproduce the issue, the GUI was open for around 5 hours. |
@devhyper Any idea how to debug it? I tried WinDbg but wasn't even able to get a simple backtrace like in gdb. |
We should think about it holistically. I.e which qml file is responsible for showing the loader -> which variable controls the loader showing -> when is the variable supposed to change -> when does the variable actually change. This can avoid using the debugger. Unless of course this issue is a bug in a library. |
Yes. I was able to solve a hard problem like this without any debugger, by simply bisecting the active lines of code. The luxury I was having then was that it was reproducible on my machine. |
https://github.com/monero-project/monero-gui/blob/master/src/libwalletqt/WalletManager.cpp#L215 Either the mutex is broken here, the address(0,0) is broken, or async is broken. My order of presumptions is mutex, address(0,0), and then async might be broken. p.s I don't understand why a qstring is returned. Isn't void enough? Unless some other code is also calling this function. |
Thanks for the clue. I'll try to simulate these situations via proper tests. |
I guess that works as a first step :D selsta@09a33b9 |
I need someone who can use this binary and reproduce the close bug: https://github.com/selsta/monero-gui/suites/5993379160/artifacts/206729904 It will open a cmd window in addition to the GUI and print some debug info so we can check where exactly it gets stuck. I can't reproduce the issue consistently in my VM so someone who gets the issue more often would be helpful. @elibroftw maybe? |
I don't see any output in the command line during the infinite loop. |
I need the output before the infinite loop. |
|
Or wait, whatever is supposed to make Alive = 0 is not working. Yeah there needs to be added comments there to inform developers how Alive is supposed to become 0 without explicitly setting it to 0. |
Hmm interesting, https://github.com/monero-project/monero-gui/blob/master/src/qt/FutureScheduler.cpp#L94. Therefore, there's another background task that doesn't want to stop. Do we know what all possible background tasks are? If you can't reproduce the issue, would you mind comparing your settings with mine? GUI version: 0.17.3.1-release (Qt 5.15.2) |
I'll try to add logging in a way that we can see which function is involved with the FutureScheduler. And I'll try to use your settings. |
@elibroftw One thing you can quickly test is if you can still reproduce the bug if you have the fiat price ticker disabled. That constantly updates the price and uses async for that. |
No difference. |
Ok, then back to more logging. Edit: Added detailed logging, waiting for build now. |
@elibroftw more detailed logging: https://github.com/selsta/monero-gui/suites/6214720654/artifacts/219787383 |
This happened on my first try. It took 15 seconds to close. |
Did you close it immediately after opening a wallet? From the logs it was still doing wallet refresh in the background. 15 seconds is long but at least it worked in the end. Edit: That's also why the wallet close was async so that it doesn't appear to freeze in such a case. But that's not too important now as long as it closed. |
No I closed it after hours. I left it running overnight and it still managed to close. I think it's a good fix then for now. I'll try once more but with the balance currency set to USD instead of XMR. |
Maybe both of them together fix the issue? |
3889 is only relevant when using a local node and 3890 is only relevant when having fiat price enabled. I think you tested without these conditions. |
I saw the mining status messages though in the log before even with a remote node #3840 (comment). Or am I mistaken? |
No idea where that comes from again :/ |
So what do you think? Should we keep async during close or remove it? I think async is the more correct way but it appears to be slower. Should I make a binary with master + 3889 + 3890 so that we can double confirm that the bug is fixed? |
Yeah make that and make one with async as well so I can see which has the best experience. |
Async: https://github.com/selsta/monero-gui/suites/6233216680/artifacts/221206532 Will make another one for without async. |
Without async is faster and not to mention that if something goes wrong, we'll see a UI freeze rather than an infinite loop. |
Just to confirm, both versions have the close bug fixed? |
Yes |
that's frustrating because I don't know what fixed it :D like I said both of these fixes shouldn't apply to your situation #3840 (comment) |
I'm running it on my laptop now to double check if it wasn't my PC settings that fixed something. |
Works fine on laptop too. I suspect that mining status is to blame for most of this plus the fiat price fetching since I had that enabled too. |
@MoneroArbo Can you also confirm if #3840 (comment) solved the close bug for you? |
@selsta wow the new user flow for this version is so much better than the last official release, amazing! And yeah, it seems not to hang on close either. Made a new wallet, opened an old wallet, opened and closed wallets a few times, with and without Window decorations, even closed it mid scan, all seems to work. Coincidentally (or not) it also seems to no longer do the thing where the wallet scan gets stuck at 0 blocks remaining. |
ok, thanks for testing! guess I can finally close this |
OS: Windows
If I open a wallet at the start of the day, and close it at the end of the day (using Alt + F4), I get a "Closing wallet" loading screen that never goes away. I have to alt-f4 again to close the UI but I still see the process running in Task Manager
This issue cannot be reproduced by simply opening and closing the wallet. It happens if I have the wallet open for hours. It may be able to reproduce if you have the wallet open for 10 minutes, but I'm not sure.
Furthermore, when I log out the wallet, I get presented with the Welcome to Monero screen instead of the select wallet screen. I know it's a separate issue, but usually when people log out of one wallet, it's to open the other wallet, not to create a new wallet or something, because that's a one time thing, whereas the open another wallet happens everytime after.
Another feature request is to add a wallet_name[view-only].monero_gui file to the wallet directories that can be double clicked.
Another Bug, is clicking on monero: links opens a new instance of the GUI and doesn't even auto fill the data. What I expect is for the existing GUI to focus and auto fill the data or at least the new instance to autofill the data. I think you could use IPC to inform the existing instance of the data. In my application, I make a post request to 127.0.0.1 with the relevant data.
The text was updated successfully, but these errors were encountered: