meganz / MEGAsync

Easy automated syncing between your computers and your MEGA Cloud Drive
Other
1.62k stars 279 forks source link

MEGAsync never finishes "Syncing..." even though no transfers are underway. #891

Open GH-A-CC opened 8 months ago

GH-A-CC commented 8 months ago

I have one folder sync configured in MEGASync, this folder appears on the surface to be full synchronised but MEGASync never exits the "Syncing..." state.

Operating System: Fedora release 39 (Thirty Nine) MEGAsync version: 4.11.0 (64 bit) (6d4c102) Internet connection: >1Gbps both upload and download Sync'd folder details: One folder ~1.4 TB in total, containing ~904,536 files in 29,368 subfolders Drive Details: Drive the sync folder is on: 3.8TB btrfs formatted NVMe

I have what I believe to be a fully Synchronised folder, yet the MEGASync app remains in a "Syncing..." state and the icon never changes to the plain "M" logo without the miniature two curved arrows over it.

I have twice tried using the "Settings -> Force a Full Scan" option where by the following behaviour occurs:

None of the files in the local or cloud based copy of the Sync'd folder are being changed.

In "Settings -> General" window the ".debris (local cache)", "SyncDebris (remote cache)", and "File versions" all show 0 bytes.

GH-A-CC commented 8 months ago

Comment to add:

This also happens on a different system set to synchronise the same folder - Fedora 38 this time, same folder sync settings and same MEGASync version.

Also, if I open the Transfer Manager window, it shows the green-tick icon in the bottom left with "Up to date" next to it.

FGD-Garuda commented 8 months ago

I'm facing the same issue, whether I use megasync-bin or megasync-git packages for Arch.

I think in my case it started when ICU package got updated to v74, some workarounds are required to run megasync until upstream fixes it.

Nevertheless, it always syncs non-stop and WRITES to my disk non-stop, even though nothing is synced. Constant disk I/O due to that.

I am considering moving over a different cloud storage solution...

GH-A-CC commented 8 months ago

it always syncs non-stop and WRITES to my disk non-stop, even though nothing is synced. Constant disk I/O due to that.

So, I don't see this problem with non-stop writes. Your issue sounds like a different one - although potentially related. For me, iotop reports no reads or writes from MEGAsync after its switched over from "Scanning..." to "Syncing...". I've also tested this by putting a sync on an obsolete non-SSD type drive mounted over USB, and I can observe the drive spins down and its power draw drops by 95%. Actually I'm not sure about this / CORRECTION: I do see MEGAsync doing writes but its only a 4KB/block every ~10 seconds or so. If my system's auto-flush to sync the writes to USB is something like 1M then the drive would not spin back up for 40 mins or so, hence what you're saying is entirely possible to be the same issue.

I have also recently tested if the file system format is relevant by rsync'ing the entire folder over to an NTFS formatted drive, deleting the sync pair in MEGAsync and re-creating it pointing to the new NTFS-backed folder copy. I observe the same behaviour: i.e., MEGAsync spends about 45 mins "Scanning..." then switches to "Syncing...", and hangs on that.

FGD-Garuda commented 8 months ago

Both issues started at the same time for me, there is a chance they aren't related, but I think there's a bigger chance they are.

I am under BTRFS filesystem and never experienced such constant I/Os from megasync for years. It's like every second, from 125kb to 500kb, most of the time in the 125-200kb range. I could dig down further and possibly find the files it's writing into but at the moment I don't see the advantage of investing such effort until someone who knows a lot better about these megasync issues ask me for troubleshooting data and knowing where he'd go with the result.

If it's a different issue I may open another bug for it, though. My point is I'd like that constant Syncing to be fixed and if it doesn't fix my constant I/Os then I open a bug specific for this.

cihe13375 commented 8 months ago

I also encounter this issue sometimes for no obvious reasons (on both windows and linux), and usually I solve it in the following way: 1) log out of the current account (settings - account - log out) 2) quit megasync and launch again 3) login (type in username and password) 4) go to settings - sync and enable all syncs (they are automatically disabled upon logout)

Generally, I found this procedure solving many issues probably caused by syncs going into a bad internal state, which sometimes cannot be fixed by "force a full scan" (for whatever reason). idk if it would work for you though, as I had switched to 5.0.x for a long time and had forgot how 4.x version behaves...

btw you probably also want to report it using the "issue report" feature within the client, which likely gives a higher chance to get official responses

FGD-Garuda commented 8 months ago

Yes that does help! Logging out and back in actually fixed another issue I had. Should have thought that but I guess it was too easy.

Tnx!

GH-A-CC commented 8 months ago

The proposed workaround from @cihe13375 that worked for @FGD-Garuda has NOT worked for me.

hugorn commented 6 months ago

After updating, this count never ends and the synchronization remains in an infinite loop. Windows 11 image