Constant sync-conflicts when devices use different timezones

Hi all! Hope this post finds you well.

I have an issue with syncthing instances on different timezones. I am able to reproduce this issue all the times with my setup. I wasn’t able to find any similar issues online, and I apologize is this is a duplicate post.

Setup:

  • Syncthing docker v1.23.0 running in a VM for data backup. System running in UTC timezone
  • Syncthing running on laptop (windows, mac and linux clients). System running in US/Central timezone

After syncing the first version of the file, subsequent edits of that file on the local system will create conflicts.

I believe this is because the saved file in the VM for backup is setting the last modified timestamp in UTC and time the laptop is setting for the same file is in US/Central.

This causes constant conflicts when editing documents locally on my laptop.

Steps to reproduce

  • Create the setup mentioned above.
  • Create a text file on the client/laptop machine.
  • Sync - this sync is successful.
  • Open the text file and add some text.
  • Save the file and sync.
  • Observe the conflict file being created and synced across devices.

This is also getting in the way of deleting files. When a file is deleted on the laptop, upon a sync, the file will sync back from the server and reappear.

Let me know if I can provide other information and if I did something wrong with my setup.

Just to confirm, are all devices running v1.23.0? If not, are there perhaps any devices on v1.22.0 or v1.22.1? If yes, then please make sure to upgrade them to the newest version as those two had bugs that could trigger such conflicts.

Server is on v1.23.0, Linux Client is on v1.23.1-rc.1, Linux

Started my tests from the beginning making sure all is up to date (v1.23.0 or up)

Test State

  • Macos - Can’t reproduce anymore
  • Linux - Ext4 - Can’t reproduce anymore
  • Windows (SyncTrayzor) - Can reproduce
  • Linux - NTFS - Can reproduce

Windows and Linux NTFS tests are using the same disk and partition to store data. Dual boot device.

I also found out a post where you mention NTFS on linux. Looks like that might be the culprit, though the windows side is not working as well.

Here is a screenshot of the conflict details shown on windows

I would appreciate any ideas and guidance. Let me know if there is anything else I can provide to aid with this.

Also reproduced on a different Linux machine using another NTFS partition

Probably NTFS-on-Linux behaves insufficiently like a normal Linux filesystem, failing to retain some attribute Syncthing expects. I’d suggest setting ignore permissions and perhaps a mod time window of one second or so and see if that helps.

Are you using ntfs-3g or the new in-kernel ntfs? Afaik I am still using ntfs-3g and there I do set “ignore permissions” but not timestamp window is needed, that works as expected for me.

If you are running Synching on the same data from both OSes you also need to make sure Syncthing is using the same database in both instances. There are some nontrivial things to take care of to make this work properly, if ever.

1 Like

I am unsure if it’s using ntfs-3g or the new in-kernel ntfs. I do have the ntfs-3g packages installed.

Noted re the syncing same data from two different systems and will only rely on one to sync going forward.

I also updated the docker timezone to match and continued the tests and I am still able to reproduce. Tested with 10 seconds and 60 seconds set for mod time window (set on both the laptop and server) and it’s still reproducible.

After setting the ignore permissions, I am not able to reproduce anymore.

Thank you so much all!

2 Likes