Wallet Restore Mess Gets Worse...Now Better

I see I’m not the only one having problems with the wallet restore. Big problems but I’ve got other computers to use while this sorts. That’s important because twice now I’ve launched an application (iMac with latest Mojave) it does not launch. The icon bounces for a few minutes then stops. If I click on it again…nothing. No bounce. If I go to the Force Qut Applications window there I see it listed as running, not “unresponsive”. If I select the app and click on Force Quit it asks me to confirm I do but nothing happens. If I launch Terminal and go into Top the apps are not listed which means they are not running but the apps are still listed in the Force Quit window. I’ve never seen anything like this.

What is this Daedalus app doing? I understand it’s not syncing with the block chain but is doing something with the data on my computer. Correct? It’s consuming a lot of resources. I’ve got most of my apps quit and I’m using 11 of 16GB of RAM. Cached files are at about 5GB. Swap file is at about 23%, never seen it so high.

What is going on and what actions can I take? Can I quit Daedalus? Can I restart the Cardano Node? Can I reboot my computer? I don’t want to screw the process up and corrupt any data. I certain don’t want to start over again. I’m more than 8 hours into it. I actually have work to do using the apps that will no longer even attempt to launch. I’m afraid to try to launch any more apps for fear the same thing will happen to them.

In your terminal on your Mac, you can type this and see all running processes:

ps aux


That command will show you a lot of text but on the right will be the name of all the processes running on your Mac. I don’t have the software on my Mac and I don’t plan to install so … this is an example but … say the wallet runs as a process with the string ‘dedaleus’ in the command. To see that process type this:

ps aux | grep -i dedaleus


This may or may not help but it’s basic unix command line stuff.

I haven’t used ps in a while. Mostly I use “glances” which I’ve installed for the command line. I can see that Daedalus is running. I’m content to let it run but I want to be able to use other applications. I’m afraid to use any other application for fear it will be “zombied” like 2 already have. Can’t be launched, can’t be killed with the kill command because there’s no PID.

I let the restore run all night and there was no change this morning. It’s been running about 20 hours. I don’t what it’s doing but it screwing with other apps that I need to use. For about 16 hours it was reporting that there was 1 hour, 39 minutes to complete. This morning I quit the app and relaunched. It picked up where it left off but reported there were 2 hour, 45 minutes to complete. Still the apps critical to my work were still in zombie state. I restarted my iMac and Dadaelus picked up the restoration again but it reported that there is now 8 hours, 5 seconds left to complete. My critical apps are available again.

One thing I did was I gave Dadaelus “full disk access” in System Preferences under the Security and Privacy settings.

It’s too soon to tell but there seems to be an improvement. Now the % complete is increasing continuously. Slow but it doing something. Before the steps I took it was stuck at 10%. The time remaining has gone from 8 hours down to less than 1 hour remaining. Lastly, in the Summary tab, I can see some of my transactions appearing. That never happened prior to the steps I took. All transaction reports were blank.

Just in the time it took to type this the % complete has increased, time remaining has reduced, and transactions are appearing in the reports.

Taking a wild guess here but what I think made the difference was giving Dadaelus “Full Disk Access” in System Preferences -> Security & Privacy. That’s on a Mac running the latest OS 10.14.2 Mojave. I think it might have been prevented from getting data it needed before. Just a wild guess.

If you have a backup of your recovery seed you can also just delete everything and download the whole blockchain again. On a fast internet connection this could be faster.

A pretty save way to do this is closing Daedalus and just renaming the folder in Terminal:
mv ~/Library/Application\ Support/Daedalus/ ~/Library/Application\ Support/Daedalus.backup

When opening Daedalus it will start download everything again. If something goes wrong you can just rename the folder again.

1 Like

Interesting. I don’t have a fast internet connection. I have the cheapest I can get. I hate giving them money.

Anyway…this is moving right along now. If it had run like this to start with I wouldn’t have complained. I’m at 56% complete and 24 minutes to go.

It’s done. It took about 1 hour. I believe the solution was to grant Daedalus “Full Disk Access” on my Mac running OS 10.14.2. This is a new feature to this version of the OS which came out in October (I think). I believe Daedalus stalled because it could not get access to data it needed for the restore.

Once I did this it moved right along. The % complete moved along, time remaining decreased, and I could see transaction history appear. Fast enough and it wouldn’t have been a problem if I had done that to begin with.

3 Likes

Glad to hear it’s done. I can ensure full disk access is not needed and not recommended though.

This process level info is helpful to know. So, here’s my theory of why this is so slow after reading only various people reporting out on the issues and not actually running the software on my machine. What I think the fact pattern is roughly this:

  • it’s slow
  • it’s slow on mac, windows, linux (if it even runs on linux)
  • it seems to not use tons of disk (3-4 GB)
  • at least in v1.4 it seems to use TONS of files – 1.9M files in a screen shot I saw
  • it may use tons of processes or not – I have not seen data on this
  • it uses network connections, perhaps many thousands at once listening for events or responses

So, my take is that the slowness is one of two things:

  • too many open files (I saw a screen shot of 1.9 million files stored in the directory tree)
  • too many open processes

Most OS’s have a limit of several thousand open file handles per process up to many thousand. But there is a limit. If you hit that limit and code around it in odd ways. This could result in code that crawls.

And, if the software opens many network connections at once, this could result in a crawl.

In both cases, the CPU use would use would be low. I think we see this.

In the file open issue, other software could be impacted if the global OS file open limit is being hit. I think we see this.

And then the the Jr. software people working on the project just don’t know how to code for these issues yet and the Sr. people are not paying attention to these issues because they have some big fish to fry.

Just a guess based on very limited info. A look at ps would tell us about the process. I think any issues in ps would have been reported. So, it’s more likely to be a file count limit – a look at ulimit would tell about the files. Or a network connection issues and a look at netstat would tell us about the network issues:

netstat -an | wc -l

Just guesses. It’s low quality software. The issues are probably not deep. The fix therefore probably easy. It looks like Jr programmers at work.

The fact that v1.4 needed 1.9 M files and v 1.5 needs only 30K files SCREAMs Jr programmers at work.

Where did you learn that full disk access is not recommended?

Sorry for being brief in my last post. Not having "Full Disk Access" prevents applications to access folders with your most private data in it like mail data, iMessage data, browser data, Time Machine backups.

Why should Daedalus have access to those? It will store everything in it’s folder below Library/Applications Support, like it should.

If an application ever tries to access such a folder, macOS will force crash this application and you will notice this.

Usually there is no need to manually whitelist an application because applications will ask you to grant disk access if they need to, providing a good reason why they need this permission now.

2 Likes

Yes, did that but now don’t I have 2 copies of the blockchain taking up space on my Mac? How do you get rid of the one we renamed?

Yes you are right. If everything went fine you can delete the backup by pasting this into terminal window:
rm -rf ~/Library/Application\ Support/Daedalus.backup

1 Like

Thank you very much adatainment! This was the only solution that worked for me.

1 Like

I was thinking that I missed some documentation that specifically said something about Full Disk Access. So there’s no reference to a “recommendation” that you can point to?

My Daedalus wallet is money. I want the data somewhere that is protected. The more protected the better. Full Disk Access protects more than my email. I can’t imagine why IOHK would develop an app that would access my email. But yes, put the data in the same category of security as my personal information.

Keep in mind there are helper apps that are also part of the bundle. Those might also be part of the problem.

I think you misunderstood my point: this does not add a layer of protection to the data of Daedalus, it protects your (other) private data from Daedalus or any other application.

It does quite the opposite: granting full disk access to an application that does not need it, lowers the security of the whole system and is therefore not recommended to people who care about security.

1 Like

Thanks so much! This fixed my issue!! I’d also like to note the rm command takes quite a long time! Must be a nice , secure delete… Just for anybody else wondering , don’t close out of the terminal until the process is complete. You will see the available space increasing on your hard drive too. Thanks again!

1 Like

Glad it did help. This is not a secure delete, it takes so much time because there are so many files.

1 Like