Skip to content
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

DCR native wallet sync stuck at 99.9% #3000

Open
norwnd opened this issue Sep 29, 2024 · 7 comments
Open

DCR native wallet sync stuck at 99.9% #3000

norwnd opened this issue Sep 29, 2024 · 7 comments

Comments

@norwnd
Copy link
Contributor

norwnd commented Sep 29, 2024

Likely duplicate of #2857, #2917

I've been running Bison Wallet 1.0.0 for several hours now and was gonna place a DCR/USDT trade but got an error dcr still syncing. progress = 99.90%:

image image

I have mostly decent network connection (and the rest of Bison Wallet functionality works fine), trading overall works fine so far. Not using any privacy or staking functionality of DCR native wallet either.

Restarting Bison Wallet helped immediately, no idea how to reproduce.

My guess would be:

  • perhaps my internet connection got dropped at some point and DCR native wallet couldn't properly recover from it once it got back up
  • or there is some kind of dead lock
@norwnd
Copy link
Contributor Author

norwnd commented Sep 29, 2024

@norwnd Have you tried restarting the Bison Wallet or checking your internet connection to see if that helps?

This is mentioned in issue description.

@decred decred deleted a comment Sep 30, 2024
@decred decred deleted a comment Sep 30, 2024
@JoeGruffins
Copy link
Member

JoeGruffins commented Oct 4, 2024

Possibly related to #2971, as that bug happens at the end of sync.

If you still have the logs, do you see anything (ERR) about a channel being blocked? Or are there logs like in #2857 ?

@norwnd
Copy link
Contributor Author

norwnd commented Oct 4, 2024

Possibly related to #2971, as that bug happens at the end of sync.

If you still have the logs, do you see anything (ERR) about a channel being blocked? Or are there logs like in #2857 ?

Yes I still have the logs, going over those I don't see any "suspicious" messages you posted in #2971 or #2857, in fact I don't see any errors related to DCR wallet except for this sequence of events:

2024-09-28 17:18:36.089 [DBG] CORE: Wallet synced for asset dcr
...
2024-09-29 10:03:44.741 [WRN] CORE: Wallet for asset dcr has zero network peers!
2024-09-29 10:03:44.748 [WRN] CORE: notify: |WARNING| (walletconfig) Wallet network issue - Decred wallet has no network peers!
...
2024-09-29 21:29:55.452 [ERR] WEB: error placing order: dcr still syncing. progress = 99.90%
...

That suggests to me: originally DCR wallet was successfully synced to 100% and then it lost peer connections (presumably due to my laptop sleeping or network dropping or both), and then nothing really happened as per my logs - I just couldn't place a DCR-related trade - it didn't recover from this until I restarted Bison wallet (even though in UI, as you can see on my screenshot, the Peer Count for DCR wallet always showed as 8 and I was able to place Polygon USDC/USDT trades just fine at all times).

Feels like 1 or 2 of these isn't working correctly for DCR SPV wallet:

  • handling peer-rediscovery(reconnect) after different kinds of failures (network outage / laptop sleep)
  • displaying correct number of active peer connections in UI

I don't have neutrino logs for this time period though (looks like only couple of days of those are stored by default).

@norwnd
Copy link
Contributor Author

norwnd commented Oct 11, 2024

Hey @JoeGruffins, I've encountered this again today,

  • like previously, there is nothing interesting in dexc logs related to this issue (as far as I can tell - if you want to check for yourself message me in Element I'll send these over to you)
  • in dcrwallet neutrino logs I also don't see any errors (or anything that would fully pin this issue down) - although there is quite a bit of spam related to inability to connect to peer(s) - here is the relevant part you might want to inspect - but what's interesting is seems like dcrwallet keeps receiving/connecting new blocks while dexc still shows 99.9% sync
  • at some point 99.9% dropped to 99.4%, and got back up to 99.9% again
  • in case it helps, I've also tried sending some DCR from my other wallet into dexc one (while sync is at 99.9%) and it didn't change anything for dexc DCR wallet (sync is still at 99.9% and incoming transaction didn't show up) even though in dcrwallet logs it did show up (with Inserting unconfirmed transaction ...)

Btw, after I killed Bison wallet process I've got 8 log lines with SPV: Lost peer in neutrino logs (which seems to additionally confirm that I was connected to 8 peers after all).

Update:

I was able to easily reproduce this by unplugging my internet cable and plugging it back in after 15 minutes.

Plus I've also have a go-routine dump
if you want to inspect that (I've been running Bison wallet with pprof).

@JoeGruffins
Copy link
Member

@norwnd thanks

#3005 fixes a bug that can happen at the end of sync that potentially blocks three separate mutexes. I'm hopefully optimistic that those changes also fix this bug. Please let me know if you encounter it on a build with those changes, that would be very helpful. Thanks again.

@norwnd
Copy link
Contributor Author

norwnd commented Oct 17, 2024

Cool, thank you!

Please let me know if you encounter it on a build with those changes, that would be very helpful.

Looking forward to the next Bison Wallet release, I'll post an update here if it fixes this issues or not.

It's pretty simple to reproduce too - by unplugging my internet cable and plugging it back in after 15 minutes - if you want to test for yourself (I just don't have my dev environment set up anymore to test against master).

@norwnd
Copy link
Contributor Author

norwnd commented Nov 19, 2024

Looking forward to the next Bison Wallet release, I'll post an update here if it fixes this issues or not.

Hey @JoeGruffins, the issue is still there with 1.0.2 release (easily reproducible by unplugging internet for ~30 minutes, and plugging it back in after) - DCR block sync stuck at 99.9$%

Update: don't even need to wait 30 minutes, just reproduced it with 1 minute network outage - this makes it very nasty issue because when it happens it pretty much stops from working all trading activity related to DCR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants