-
Notifications
You must be signed in to change notification settings - Fork 46
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
app crashes while deleting a wallet #865
Comments
my wallet was fully synced, but seeing as deleting a wallet disconnects from the network, and then connects back to the network after deleting, it's possible that the sync/re-connection process has started when i tried deleting the second wallet, as i did both of them immediately after the other |
Hello, I got interested and looked into it a bit, can suggest the following explanation for why this happens (would like your feedback on it, obviously :), the issue is probably caused by accessing wallets map in un-sychronized way (without properly using mutexes/channels as is required by go memory model) from multiple different go-routines, once user deletes his wallet in UI (as I understand the code, it happens here) from, lets call it, go-routine-1),
while from view-point of go-routine-2 (where executes the code, mentioned by @Sirmorrison above) wallet object is still present in wallets map and The solution could be to synchronize access to the problematic map (and possibly badWallets map, because it likely suffers from the same issues) via a dedicated mutex, what do you think ? At any rate, it seems to me MultiWallet is not safe ( |
Thanks for sharing you idea, and also, tanks for painting a very vivid roadmap of your findings. From your 4th paragraph, a solution would be worked on soon. however, would you like to work on this? |
From what I figured out, this should resolve it: planetdecred/dcrlibwallet#252 or do you have a different solution in mind ? |
No activity. Marking as stale |
I encountered this error while deleting two wallets back to back.
I had 7 wallets, I then proceeded to delete one, which was successfully deleted, i then immediately proceeded to delete another one before the crash occurred
See log below:
The text was updated successfully, but these errors were encountered: