Strange problem writing .ffs_tmp on a Synology NAS

Get help for specific problems
Posts: 5
Joined: 26 May 2004

mycr0ft

Hi,

I'm regularly experiencing the following issue, this started some time ago (with FFS 6.2 or so) and it's preventing me from using the software effectively.

I do a one-way synchronization of folders, manually started in the GUI, from a windows PC to a NAS (via samba).
What happens is that FFS starts creating a huge number of .ffs_tmp files on the network share; the exact behavior varies with FFS release: v6.8 for example creates thousands (even hundreds of thousands... until the NAS dies and I have to ssh in it and delete them from the shell...).
Apparently, FFS creates a 0-byte temporary file, then it tries to append data to it, but for some reason SOMETIMES (but quite often, indeed) this operation fails, so it retries with a different file.
FFS v6.9 fails after a few retries, but the error message is not really useful (it just says something like: failed to copy file xxx.ffs_tmp because it already exists).

Now, I've ruled out the most basic issues:
1) it's not a permission problem (my user can read/modify/write any file on the network share). additionally, FFS is able to compare all the folders by file contents (so I know for sure that it can read, and there's no read error on any side)
2) it's not an hardware error, e.g. network connection or drive failure
3) the issue happens systematically on the same folders/files, it's just unpredictable.
4) the issue happens ONLY TO FFS. In fact the way I've worked around the bug is: I simply synchronize the (sub) folder where the issue happens with a different utility (say XCOPY; I actually use jpsoft's TCC/LE free edition),
5) I've never seen the issue happen when I use FFS between two Windows machines (which I do, occasionally).


Any help would be appreciated.
I was thinking about trying to debug the software myself, but it's generally better to ask first if the issue is known.

MH
User avatar
Site Admin
Posts: 7052
Joined: 9 Dec 2007

Zenju

That's the problem discussed here:
viewtopic.php?t=1592
Posts: 5
Joined: 26 May 2004

mycr0ft

Thanks for the link. So the problem is still unsolved?
User avatar
Site Admin
Posts: 7052
Joined: 9 Dec 2007

Zenju

It's a fundamental bug occuring in combination with CopyFileEx. Windows Explorer gets around it by using their own reinvention of the (file copy-) wheel.
Posts: 5
Joined: 26 May 2004

mycr0ft

It's a fundamental bug occuring in combination with CopyFileEx. Windows Explorer gets around it by using their own reinvention of the (file copy-) wheel.Zenju
I didn't look at the code yet, and I may be wrong, but I would say that the bug should be easy to workaround: if CopyFileEx fails with error "file exists" && source file has size > 0 && destination file has size == 0, then retry the copy with some default file attributes.
Posts: 3
Joined: 3 Mar 2018

Zusan

Just for my interest: This issue is still unsolved, correct? I would like to sync my local files from a windows 10-based PC to a network-share on a Synology NAS and FFS keeps hanging.
User avatar
Site Admin
Posts: 7052
Joined: 9 Dec 2007

Zenju

The bug is/was not in FFS, but Microsoft code. It's quite possible it has been fixed in the meantime.
Posts: 3
Joined: 3 Mar 2018

Zusan

I did not say, that it is a bug within ffs. And maybe it is a Microsoft issue, but I thought that I understood some threads explaining a workaround that could be implemented in ffs.

Fact is, that ffs hangs when trying to do a sync to a network share on a synology NAS, so I dont think that this issue has been resolved by microsoft till now. So I hoped that you may have thought about implementing a solution in the last 4 years.
User avatar
Site Admin
Posts: 7052
Joined: 9 Dec 2007

Zenju

The symptoms as described in the first comment cannot happen anymore with the latest FreeFileSync release.
Posts: 3
Joined: 3 Mar 2018

Zusan

Oh, ok. Then I will have to investigate in this. What can I do to find out, why ffs hangs?