Local changes in Receive Only folder

Hi. I have Syncthing 1.18.3. Receive computer is Linux, send computer is Windows, “Ignore permissions” used on both sides.

I have “Receive Only” folder, that displays “Locally Changed Items: 74 items”. I pressed “Revert Local Changes”, it hides differences, but after “Rescan” I see the same “Locally Changed Items: 74 items”.

Next try: I just removed these 74 items from disk, and after “Revert Local Changes”, they were restored. But after “Rescan” it displays “Locally Changed Items: 74 items” again.

Next try: I removed folder on the receive computer, then restarted Syncthing, then added folder again after send computer announced it. After reindexing, I have “Locally Changed Items: 74 items” again.

How to fix it or how to investigate details ?

Is this a freshly added folder, or an older one? Have you, by any chance, changed its type over time (e.g. from Send & Receive to Receive Only)? Are the locally changed items always the same, and if yes, are they files or directories? Screenshots would help greatly.

If this was Android, I would assume FAT moving timestamps, but you mentioned Windows and Linux only, so this is likely not it.

This folder exist ~2month. As I wrote, I deleted it from syncthing, then recreate on the receive computer. I didn’t change its type. Locally changed items are always the same files. I didn’t use Android for this folder.

image

Can I investigate it somehow ? By REST, or by reading .ldb using some script ?

What if you actually compare the files, e.g. by checking their hashes and mtimes? Are they really different, or is it only Syncthing that marks them as such?

Also, have all the locally changed files got Cyrillic characters in their names? If yes, then maybe there is a code page issue going on?

What is the file system on the server storage?

You can get debug infos on the affected items with the syncthing cli utility. If you have your config not in the default location, add --home <path> after syncthing cli. Then first enable debugging: syncthing cli config gui debugging set true. Then to get the actual info: syncthing cli debug file <folder-id> <relative-path>.

Thank you. Debug looks good. 3L6QRBS - remove “send only” computer, 6JYBQ7N - my “receive only” computer. 7777777 - I don’t have such remote device. I checked sha256 of my local and remote, and local after rewriting files - they are the same. Looks like I see the issue. My files stored in NAS, and there is mess of mtime. Looks like sender tries to set mtime to 2060 year, but NAS changed it into 1924.

=== on start =====================
  File: /media/d1/IM-Ar-Vnukovic-Archive/AIMEF23/023.013.002/ф.23_воп.13_спр.2/032M_600316_1820.MP3
  Size: 932049    	Blocks: 1824       IO Block: 1048576 regular file
Device: 34h/52d	Inode: 573709926   Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1000/    alex)   Gid: ( 1000/    alex)
Access: 2021-10-12 07:46:52.350000000 +0000
Modify: 1924-02-09 08:51:48.000000000 +0000
Change: 1924-02-09 08:51:48.000000000 +0000
 Birth: -
{
  "availability": [
    "3L6QRBS-O6NMQJB-3Q5MXFI-6NOZFEZ-VQHOZXI-HXTUDIJ-EGODQFQ-NWAAWAV"
  ],
  "global": {
    "deleted": false,
    "ignored": false,
    "invalid": false,
    "localFlags": 0,
    "modified": "2060-03-16T15:20:04Z",
    "modifiedBy": "3L6QRBS",
    "mustRescan": false,
    "name": "AIMEF23/023.013.002/ф.23_воп.13_спр.2/032M_600316_1820.MP3",
    "noPermissions": true,
    "numBlocks": 8,
    "sequence": 2046,
    "size": 932049,
    "type": "FILE_INFO_TYPE_FILE",
    "version": [
      "3L6QRBS:1632996774"
    ]
  },
  "globalVersions": "{{Version:{[{3L6QRBS 1632996774} {6JYBQ7N 1634024759}]}, Deleted:false, Devices:{}, Invalid:{7777777}}, {Version:{[{3L6QRBS 1632996774}]}, Deleted:false, Devices:{3L6QRBS}, Invalid:{}}}",
  "local": {
    "deleted": false,
    "ignored": false,
    "invalid": true,
    "localFlags": 8,
    "modified": "1924-02-09T08:51:48Z",
    "modifiedBy": "6JYBQ7N",
    "mustRescan": false,
    "name": "AIMEF23/023.013.002/ф.23_воп.13_спр.2/032M_600316_1820.MP3",
    "noPermissions": true,
    "numBlocks": 8,
    "sequence": 23462,
    "size": 932049,
    "type": "FILE_INFO_TYPE_FILE",
    "version": [
      "3L6QRBS:1632996774",
      "6JYBQ7N:1634024759"
    ]
  },
  "mtime": {
    "err": null,
    "value": {
      "real": "0001-01-01T00:00:00Z",
      "virtual": "0001-01-01T00:00:00Z"
    }
  }
}

=== after "Revert Local Changes" ======
===============
  File: /media/d1/IM-Ar-Vnukovic-Archive/AIMEF23/023.013.002/ф.23_воп.13_спр.2/032M_600316_1820.MP3
  Size: 932049    	Blocks: 1824       IO Block: 1048576 regular file
Device: 34h/52d	Inode: 573709926   Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1000/    alex)   Gid: ( 1000/    alex)
Access: 2060-03-16 15:20:04.000000000 +0000
Modify: 2060-03-16 15:20:04.000000000 +0000
Change: 2021-10-12 07:49:04.364533500 +0000
 Birth: -

{
  "availability": [
    "3L6QRBS-O6NMQJB-3Q5MXFI-6NOZFEZ-VQHOZXI-HXTUDIJ-EGODQFQ-NWAAWAV",
    "7777777-777777N-7777777-777777N-7777777-777777N-7777777-77777Q4"
  ],
  "global": {
    "deleted": false,
    "ignored": false,
    "invalid": false,
    "localFlags": 0,
    "modified": "2060-03-16T15:20:04Z",
    "modifiedBy": "3L6QRBS",
    "mustRescan": false,
    "name": "AIMEF23/023.013.002/ф.23_воп.13_спр.2/032M_600316_1820.MP3",
    "noPermissions": true,
    "numBlocks": 8,
    "sequence": 2046,
    "size": 932049,
    "type": "FILE_INFO_TYPE_FILE",
    "version": [
      "3L6QRBS:1632996774"
    ]
  },
  "globalVersions": "{{Version:{[{3L6QRBS 1632996774}]}, Deleted:false, Devices:{3L6QRBS, 7777777}, Invalid:{}}}",
  "local": {
    "deleted": false,
    "ignored": false,
    "invalid": false,
    "localFlags": 0,
    "modified": "2060-03-16T15:20:04Z",
    "modifiedBy": "3L6QRBS",
    "mustRescan": false,
    "name": "AIMEF23/023.013.002/ф.23_воп.13_спр.2/032M_600316_1820.MP3",
    "noPermissions": true,
    "numBlocks": 8,
    "sequence": 23591,
    "size": 932049,
    "type": "FILE_INFO_TYPE_FILE",
    "version": [
      "3L6QRBS:1632996774"
    ]
  },
  "mtime": {
    "err": null,
    "value": {
      "real": "0001-01-01T00:00:00Z",
      "virtual": "0001-01-01T00:00:00Z"
    }
  }
}

=== after "Rescan" =====================
  File: /media/d1/IM-Ar-Vnukovic-Archive/AIMEF23/023.013.002/ф.23_воп.13_спр.2/032M_600316_1820.MP3
  Size: 932049    	Blocks: 1824       IO Block: 1048576 regular file
Device: 34h/52d	Inode: 573709926   Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1000/    alex)   Gid: ( 1000/    alex)
Access: 2021-10-12 07:51:09.520000000 +0000
Modify: 1924-02-09 08:51:48.000000000 +0000
Change: 1924-02-09 08:51:48.000000000 +0000
 Birth: -
{
  "availability": [
    "3L6QRBS-O6NMQJB-3Q5MXFI-6NOZFEZ-VQHOZXI-HXTUDIJ-EGODQFQ-NWAAWAV"
  ],
  "global": {
    "deleted": false,
    "ignored": false,
    "invalid": false,
    "localFlags": 0,
    "modified": "2060-03-16T15:20:04Z",
    "modifiedBy": "3L6QRBS",
    "mustRescan": false,
    "name": "AIMEF23/023.013.002/ф.23_воп.13_спр.2/032M_600316_1820.MP3",
    "noPermissions": true,
    "numBlocks": 8,
    "sequence": 2046,
    "size": 932049,
    "type": "FILE_INFO_TYPE_FILE",
    "version": [
      "3L6QRBS:1632996774"
    ]
  },
  "globalVersions": "{{Version:{[{3L6QRBS 1632996774} {6JYBQ7N 1634025016}]}, Deleted:false, Devices:{}, Invalid:{7777777}}, {Version:{[{3L6QRBS 1632996774}]}, Deleted:false, Devices:{3L6QRBS}, Invalid:{}}}",
  "local": {
    "deleted": false,
    "ignored": false,
    "invalid": true,
    "localFlags": 8,
    "modified": "1924-02-09T08:51:48Z",
    "modifiedBy": "6JYBQ7N",
    "mustRescan": false,
    "name": "AIMEF23/023.013.002/ф.23_воп.13_спр.2/032M_600316_1820.MP3",
    "noPermissions": true,
    "numBlocks": 8,
    "sequence": 23712,
    "size": 932049,
    "type": "FILE_INFO_TYPE_FILE",
    "version": [
      "3L6QRBS:1632996774",
      "6JYBQ7N:1634025016"
    ]
  },
  "mtime": {
    "err": null,
    "value": {
      "real": "0001-01-01T00:00:00Z",
      "virtual": "0001-01-01T00:00:00Z"
    }
  }
}

Ha, I think I witnessed my first Y38 bug :slight_smile:

Between revert and scan your modification times flip-flops between 2060-03-16T15:20:04Z and 1924-02-09T08:51:48Z, whose difference in seconds is 2 * 2**31.

Setting the modification times to something sensible should get rid of the problem. And maybe you want to report this to whatever os/filesystem/… variant you run.

2 Likes

Yes, after setting mtime to current date, issue was gone. Thank you.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.