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

incorrectly transferred (fingerprint mismatch in file contents) #27

Closed
leocrawford opened this issue Jun 26, 2016 · 5 comments
Closed

Comments

@leocrawford
Copy link

leocrawford commented Jun 26, 2016

I'm trying to sync a directory mounted on acd_cli (https://github.com/yadayada/acd_cli) but every file fails with

incorrectly transferred  (fingerprint mismatch in file contents) -- temp file saved

All the files are being transferred to the acd mount (rather than from it). I believe that the inode, mtime and perms are used to fingerprint? (the file itself is identical, checked with diff)

I am running with perms=0 so hope that means it is only inode and mtime. These seem to both work and be sensible values on the mount.

Any ideas on what might be going wrong, or even how I might figure out why it is failing?

I'm running v2.48.3

@bcpierce00
Copy link
Owner

The file contents are also used as part of the fingerprint, though you can disable this behavior (with some loss in safety -- see the manual) by setting both the fastcheck and fastercheckUNSAFE options to true.

You might try running md5 on the local and acd-mounted copies of the file and see if it agrees with diff. Otherwise, running unison with -debug=verbose (on just a single file -- the output will be large) and looking for where it's making fingerprints might give a hint.

@leocrawford
Copy link
Author

Thanks for your ideas. I have checked the file contents using diff and md5sum, they are identical. The debug doesn't seem to give much away about what is being fingerprinted or when. Interestingly the code suggests that the exception should indicate at least whether it was contents or metadata that differ, but that doesn't seem to be shown in the debug trace.

I have tried /c/amazon/Pictures/nas9=true and the debug is quite different, but fails because of a mismatched fingerprint. I believe this is purely based on size? The files at both ends are the same size, and the four references in the debug all match the expected size.

Any further ideas?

@alkuzad
Copy link

alkuzad commented Jun 26, 2016

the best shot for you is to override os.reasonForFingerprintMismatch to output as debug also the content of both fpdata. Diff after the function was done may not show everything.

@leocrawford
Copy link
Author

Thanks for the hints. For anyone else's benefit after some debugging I found the cause of the problem was on the acd_cli side, as by default it runs commands asynchronously. This can be changed using the --single-threaded option, after which unison and acd_cli work well together

@bcpierce00
Copy link
Owner

Thanks for the follow-up!

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

3 participants