Skip to content

Syncthing v1.27.11 on desktop claims there are Local Additions for all folders from Android v1.27.10 #9677

Closed

Description

@mcexit

What happened?

After upgrading to Syncthing v1.27.11 on my desktop, it claims all my receive-only folders have Local Additions. These are being synced from Syncthing on Android v1.27.10. Reverting to v1.27.10 on desktop and disabling upgrades fixes the issue. Comparing hashes of the files shows that they never changed.

Syncthing version

v1.27.11

Platform & operating system

Windows x64

Browser version

No response

Relevant log output

No response

Activity

  1. added
    bug
    needs-triage
    on Sep 3, 2024
  2. changed the title [-]Symcthing v1.27.11 on desktop claims there are Local Additions for all folders from Android v1.27.10[/-] [+]Syncthing v1.27.11 on desktop claims there are Local Additions for all folders from Android v1.27.10[/+] on Sep 3, 2024
  3. Knaspin commented on Sep 3, 2024

    @Knaspin

    Having the same issue. Also checked hashes between files and they remained unchanged.

    In my case, it is only affecting Windows clients with 1.27.11. Other clients do not show "Local Additions" after syncing.

    Going back to 1.27.10 on the Windows machines (but keeping the Linux machines on 1.27.11) solves the issue.

  4. tomasz1986 commented on Sep 3, 2024

    @tomasz1986
    Member

    I can confirm the issue. It happens when using v1.27.11 on Windows. The Android side can still be on v1.27.10 (or older).

    I've compared a sample file. The left is Android, the right is Windows.

    image

    Edit: I can also confirm that downgrading to Syncthing v1.27.10 gets read of the "local additions".

    This is the same comparison as above but with v1.27.10. The left is Android, the right is Windows.

    image

  5. tomasz1986 commented on Sep 3, 2024

    @tomasz1986
    Member

    I've narrowed down the culprit to 7517d18.

  6. imsodin commented on Sep 4, 2024

    @imsodin
    Member

    The info from the mtimefs layer is missing in 1.27.11, resulting in truncated mtime and thus the difference.

    I've narrowed down the culprit to 7517d18.

    That certainly makes sense in that said PR touches the filesystem layer. However I have no clue yet what happens/goes wrong. Just in case there's an additional hint to be had there: What exactly did you do to narrow that down?

  7. imsodin commented on Sep 4, 2024

    @imsodin
    Member

    Also could you check the involved filenames on disk on devices - any case differences? E.g. the ".pdf" being ".PDF" somewhere else.

    I presume not, the case fs doesn't change names, it just ensures there's no conflicts, but I am grasping for any straws. Also if anyone disagrees that case fs doesn't change names, that would be helpful info too - then I could see how we lose mtimefs info.

    @tomasz1986 If you could provide debug logs with scanner and walkfs logs while reproducing the issue, that would be great too. If you can reproduce in isolation with a single file, that's of course best, but I'll also take huge dumps to sift through (privately if necessary). For reproducing I'd almost bet you need to set it up on 1.27.10 to get the file into the DB, and then upgrade - I would not be surprised if directly starting on 1.27.11 doesn't show the same problem.

  8. imsodin commented on Sep 4, 2024

    @imsodin
    Member

    The err: {} for mtime also looks suspicious - in other places that's err: null. Probably not relevant though: It's definitely an error type that gets marshalled, and that would result in a string if non-nil/empty.

  9. tomasz1986 commented on Sep 4, 2024

    @tomasz1986
    Member

    What exactly did you do to narrow that down?

    Sorry for being too brief (it was late at night 🙁). I just cherry-picked the commit on top of v1.27.10.

    Also could you check the involved filenames on disk on devices - any case differences? E.g. the ".pdf" being ".PDF" somewhere else.

    That's not it for sure. All files in my random test folder were marked as "local additions", with no exception.

    Just for the record, what I did specifically when testing was:

    1. Still at v1.27.10 on both sides, share the /sdcard/Download folder from Android to a Windows device.
    2. Accept the folder on Windows as Receive Only under a completely new path, and let it sync.
    3. At this point, the folder is "Up to Date" on both sides.
    4. Shut Syncthing down on Windows, upgrade it to v1.27.10+7517d18, then restart.
    5. All files in the folder are now marked "local additions".

    @tomasz1986 If you could provide debug logs with scanner and walkfs logs while reproducing the issue, that would be great too. If you can reproduce in isolation with a single file, that's of course best, but I'll also take huge dumps to sift through (privately if necessary). For reproducing I'd almost bet you need to set it up on 1.27.10 to get the file into the DB, and then upgrade - I would not be surprised if directly starting on 1.27.11 doesn't show the same problem.

    Will provide the logs soon 🙂.

  10. calmh commented on Sep 4, 2024

    @calmh
    Member

    I didn't look at the code yet, but I suspect this is a question of mtimefs wrapping. The loss of precision in the timestamp looks like we're now looking at the raw on-disk timestamp instead of the one returned by mtimefs.

  11. imsodin commented on Sep 4, 2024

    @imsodin
    Member

    Yep, indeed. I tried to write a reproducer based on that assumption but failed. Do you spot anything wrong with it? #9680

  12. calmh commented on Sep 4, 2024

    @calmh
    Member

    So a couple of things that may be relevant, the mtimefs has a case insensitivity option that I don't see that we ever set (?) and I wonder if the switcheroo makes a difference if we no longer case-sanitise the folder root for walking, making the existing mtimefs entries no longer match?

  13. tomasz1986 commented on Sep 4, 2024

    @tomasz1986
    Member

    This is a debug log from the Windows side:

    1. Initially, Android runs v1.27.11, Windows runs v1.27.10.
    2. Share a new folder from Android to Windows. Accept it on Windows as Receive Only.
    3. Add a new file on Android and let it sync to Windows.
    4. Exit Syncthing on Windows and upgrade it to v1.27.11.
    5. Start Syncthing on Windows. The file is now marked as "local addition".

    syncthing-windows.log

    Do you need the same from the Android side or is this enough? Asking because I forgot to enable debug logging there 😳, so I would have to repeat the process.

    Edit:

    Adding the Android non-debug log for context:

    syncthing-android.log

  14. imsodin commented on Sep 4, 2024

    @imsodin
    Member

    mtimefs has a case insensitivity option that I don't see that we ever set (?)

    That confused me too when I created the test. As far as I see it never was used except for tests. So I just ignored it.

    if we no longer case-sanitise the folder root for walking, making the existing mtimefs entries no longer match?

    mtimefs stores it's stuff by relative paths, so the root being sanitised or not shouldn't matter. And we anyway never case-resolve the root. Actually we never "resolve" a case ever, we only complain if there's a case conflict. We do not change the casing to the "correct one" in the case filesystem layer. That's why I fail to see how changing the order could lead to not finding entries in mtimefs. It very much looks like that's happening though. Then again if all files are affected, it might not even be directly related to case lookups but some other wrapping failure.

    @tomasz1986 Haven't yet have time to look at the logs - thanks for providing them. I don't think the android side is relevant at all except maybe for context, so no debug logging there should be fine.

  15. 10 remaining items

  16. added
    frozen-due-to-age
    on Jul 1, 2026
  17. locked and limited conversation to collaborators on Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugfrozen-due-to-age

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions