WalletWasabi / WalletWasabi

Open-source, non-custodial, privacy preserving Bitcoin wallet for Windows, Linux, and Mac.
https://wasabiwallet.io
MIT License
2.17k stars 501 forks source link

Long freeze when trying to quit software right after launch #12817

Closed turbolay closed 6 months ago

turbolay commented 7 months ago

Repro: Launch, as soon as you see the GUI try to quit. Only tested on MacOs. What is interesting in the logs is that the code to quit the software is executed twice.

Logs: ``` 2024-04-10 12:28:47.424 [1] INFO WasabiAppBuilder.BeforeStarting (92) Wasabi GUI started (135250c7-7358-4f60-9d24-9115e9c98739). 2024-04-10 12:28:47.582 [1] INFO FileSystemBlockRepository..ctor (23) .ctor finished in 2 milliseconds. 2024-04-10 12:28:47.620 [1] INFO P2pNetwork..ctor (34) Fake AddressManager is initialized on the RegTest. 2024-04-10 12:28:47.862 [9] INFO SpecificNodeBlockProvider.ConnectAsync (178) TCP Connection succeeded, handshaking… 2024-04-10 12:28:48.098 [9] INFO SpecificNodeBlockProvider.ConnectAsync (181) Handshake completed successfully. 2024-04-10 12:28:49.092 [1] INFO WalletManager..ctor (31) .ctor finished in 1.46 seconds. 2024-04-10 12:28:49.156 [1] INFO Program.RunAsGuiAsync (167) Wasabi GUI started. 2024-04-10 12:28:51.846 [1] INFO IndexStore.InitializeAsync (88) InitializeAsync finished in 3 milliseconds. 2024-04-10 12:28:51.856 [1] INFO TransactionStore.InitializeAsync (69) MempoolStore.InitializeAsync finished in 9 milliseconds. 2024-04-10 12:28:53.416 [1] INFO TransactionStore.InitializeAsync (69) ConfirmedStore.InitializeAsync finished in 1.56 seconds. 2024-04-10 12:28:53.417 [1] INFO AllTransactionStore.InitializeAsync (50) InitializeAsync finished in 1.57 seconds. 2024-04-10 12:28:53.417 [1] INFO BitcoinStore.InitializeAsync (49) InitializeAsync finished in 1.58 seconds. 2024-04-10 12:28:55.240 [11] INFO WasabiAppBuilder.TerminateApplicationAsync (139) Wasabi GUI stopped gracefully (135250c7-7358-4f60-9d24-9115e9c98739). 2024-04-10 12:28:55.254 [8] ERROR BuyAnythingManager.EnsureCountriesAreLoadedAsync (667) Failed to download countries. Reason: 'The operation was canceled.'. 2024-04-10 12:28:55.264 [11] INFO HostedServices.StartAllAsync (61) Started Wasabi Synchronizer. 2024-04-10 12:28:55.264 [16] INFO HostedServices.StartAllAsync (61) Started Software Update Checker. 2024-04-10 12:28:55.265 [16] INFO HostedServices.StartAllAsync (61) Started Bitcoin P2P Network. 2024-04-10 12:28:55.265 [11] INFO HostedServices.StartAllAsync (61) Started Blockstream.info Fee Provider. 2024-04-10 12:28:55.266 [11] INFO HostedServices.StartAllAsync (61) Started Third Party Fee Provider. 2024-04-10 12:28:55.266 [11] INFO HostedServices.StartAllAsync (61) Started Hybrid Fee Provider. 2024-04-10 12:28:55.266 [16] INFO HostedServices.StartAllAsync (61) Started Round info updater. 2024-04-10 12:28:55.268 [8] INFO CoinJoinManager.WaitAndHandleResultOfTasksAsync (703) Task 'commandsHandlingTask' finished successfully by cancellation. 2024-04-10 12:28:55.268 [8] INFO CoinJoinManager.WaitAndHandleResultOfTasksAsync (703) Task 'monitorCoinJoinTask' finished successfully by cancellation. 2024-04-10 12:28:55.268 [8] INFO CoinJoinManager.WaitAndHandleResultOfTasksAsync (703) Task 'walletsMonitoringTask' finished successfully by cancellation. 2024-04-10 12:28:55.268 [8] INFO CoinJoinManager.WaitAndHandleResultOfTasksAsync (699) Task 'monitorAndHandleCoinjoinsTask' finished successfully. 2024-04-10 12:28:55.268 [16] INFO HostedServices.StartAllAsync (61) Started CoinJoin Manager. 2024-04-10 12:28:55.268 [11] INFO HostedServices.StartAllAsync (61) Started Sleep Inhibitor. 2024-04-10 12:28:55.268 [9] INFO HostedServices.StartAllAsync (61) Started BuyAnythingManager. 2024-04-10 12:28:55.269 [11] INFO Global.InitializeNoWalletAsync (253) Start synchronizing filters... 2024-04-10 12:28:55.303 [12] WARNING Global.DisposeAsync (429) Process is exiting. 2024-04-10 12:28:55.356 [12] INFO Global.DisposeAsync (438) WalletManager is stopped. 2024-04-10 12:28:55.357 [12] INFO Global.DisposeAsync (446) UpdateManager is stopped. 2024-04-10 12:28:55.362 [12] INFO Global.DisposeAsync (454) RpcServer is stopped. 2024-04-10 12:28:55.363 [12] INFO Global.DisposeAsync (460) BlockDownloadService is disposed. 2024-04-10 12:28:55.365 [9] INFO Global.DisposeAsync (466) SpecificNodeBlockProvider is disposed. 2024-04-10 12:28:55.366 [9] INFO Global.DisposeAsync (472) CoinJoinProcessor is disposed. 2024-04-10 12:28:55.366 [9] INFO Global.DisposeAsync (478) Disposed LegalChecker. 2024-04-10 12:28:55.366 [12] INFO HostedServices.StopAllAsync (89) Stopped Wasabi Synchronizer. 2024-04-10 12:28:55.367 [16] INFO HostedServices.StopAllAsync (89) Stopped Software Update Checker. 2024-04-10 12:28:55.379 [9] INFO P2pNetwork.StopAsync (160) AddressManager is saved to `/Users/trb/.walletwasabi/client/BitcoinP2pNetwork/AddressManagerRegTest.dat`. 2024-04-10 12:28:55.381 [16] INFO HostedServices.StopAllAsync (89) Stopped Blockstream.info Fee Provider. 2024-04-10 12:28:55.384 [12] INFO HostedServices.StopAllAsync (89) Stopped Third Party Fee Provider. 2024-04-10 12:28:55.384 [16] INFO HostedServices.StopAllAsync (89) Stopped Hybrid Fee Provider. 2024-04-10 12:28:55.385 [8] INFO HostedServices.StopAllAsync (89) Stopped Round info updater. 2024-04-10 12:28:55.385 [6] INFO HostedServices.StopAllAsync (89) Stopped CoinJoin Manager. 2024-04-10 12:28:55.385 [17] INFO HostedServices.StopAllAsync (89) Stopped Sleep Inhibitor. 2024-04-10 12:28:55.385 [18] INFO HostedServices.StopAllAsync (89) Stopped BuyAnythingManager. 2024-04-10 12:28:55.702 [17] INFO HostedServices.StopAllAsync (89) Stopped Bitcoin P2P Network. 2024-04-10 12:28:55.703 [17] INFO HostedServices.Dispose (148) Disposed Wasabi Synchronizer. 2024-04-10 12:28:55.703 [17] INFO HostedServices.Dispose (148) Disposed Software Update Checker. 2024-04-10 12:28:55.703 [17] INFO HostedServices.Dispose (148) Disposed Bitcoin P2P Network. 2024-04-10 12:28:55.703 [17] INFO HostedServices.Dispose (148) Disposed Blockstream.info Fee Provider. 2024-04-10 12:28:55.703 [17] INFO HostedServices.Dispose (148) Disposed Third Party Fee Provider. 2024-04-10 12:28:55.703 [17] INFO HostedServices.Dispose (148) Disposed Round info updater. 2024-04-10 12:28:55.703 [17] INFO HostedServices.Dispose (148) Disposed CoinJoin Manager. 2024-04-10 12:28:55.703 [17] INFO HostedServices.Dispose (148) Disposed Sleep Inhibitor. 2024-04-10 12:28:55.703 [17] INFO HostedServices.Dispose (148) Disposed BuyAnythingManager. 2024-04-10 12:28:55.703 [17] INFO Global.DisposeAsync (486) Stopped background services. 2024-04-10 12:28:55.703 [17] INFO Global.DisposeAsync (490) Disposed RoundStateUpdaterCircuit. 2024-04-10 12:28:55.706 [18] INFO Global.DisposeAsync (495) HttpClientFactory is disposed. 2024-04-10 12:28:55.706 [17] INFO Global.DisposeAsync (499) CoordinatorHttpClientFactory is disposed. 2024-04-10 12:28:55.706 [17] INFO Global.DisposeAsync (516) TorStatusChecker is stopped. 2024-04-10 12:28:55.706 [17] INFO Global.DisposeAsync (547) Cache is disposed. 2024-04-10 12:28:55.707 [17] INFO Global.DisposeAsync (553) IndexStore is disposed. 2024-04-10 12:28:55.708 [17] INFO Global.DisposeAsync (556) AllTransactionStore is disposed. 2024-04-10 12:28:55.708 [1] INFO TerminateService.Terminate (184) Wasabi stopped gracefully (135250c7-7358-4f60-9d24-9115e9c98739). 2024-04-10 12:28:55.719 [1] INFO WasabiAppBuilder.BeforeStopping (105) Wasabi GUI stopped gracefully (135250c7-7358-4f60-9d24-9115e9c98739). ```
Szpoti commented 7 months ago

Couldn't reproduce on win11.

wieslawsoltes commented 7 months ago

@turbolay could you try with https://github.com/zkSNACKs/WalletWasabi/pull/12819 ?

turbolay commented 7 months ago

@turbolay could you try with https://github.com/zkSNACKs/WalletWasabi/pull/12819 ?

Didn't fix

wieslawsoltes commented 7 months ago

@turbolay could you try with #12819 ?

Didn't fix

I could not repro on my mac, can you post a video with repro ?

turbolay commented 7 months ago

Oh I've just realized while shooting the video that it only happens on Regtest, so far less important than I thought

https://github.com/zkSNACKs/WalletWasabi/assets/16029533/6d1f33d2-de10-496e-b4a1-41377c41f130

I will check what's happening on my end